Created
September 9, 2013 20:24
-
-
Save bbigras/6500989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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