I got input.ki undefined (type C.INPUT has no field or method ki)
.
I tried using the 'union_' prefix but without any luck.
Any ideas?
package main
// #include <windows.h>
// #include <winuser.h>
import "C"
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
// typedef struct tagINPUT {
// DWORD type;
// union {
// MOUSEINPUT mi;
// KEYBDINPUT ki;
// HARDWAREINPUT hi;
// };
// } INPUT, *PINPUT;
func main() {
var input C.INPUT
var keybdinput C.KEYBDINPUT
input._type = 1 // ok!
// input.ki = keybdinput // input.ki undefined (type C.INPUT has no field or method ki)
// input.union_ki = keybdinput // input.union_ki undefined (type C.INPUT has no field or method union_ki)
}