Skip to content

Instantly share code, notes, and snippets.

@bbigras
Created September 9, 2013 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbigras/6500989 to your computer and use it in GitHub Desktop.
Save bbigras/6500989 to your computer and use it in GitHub Desktop.
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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment