Created
August 1, 2014 00:22
-
-
Save rdp/16c967ac24a6fe0ebf94 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 | |
// doesn't work, unfortunately :| | |
// #include <windows.h> | |
// #include <psapi.h> | |
import "C" | |
import "unsafe" | |
import "fmt" | |
import "syscall" | |
func main() { | |
//cs := C.CString("Hello from stdio\n") | |
var MB_YESNOCANCEL = 0x00000003 | |
ret := C.MessageBoxW((*C.struct_HWND__)(unsafe.Pointer(uintptr(0))), | |
( *C.WCHAR)(unsafe.Pointer(syscall.StringToUTF16Ptr("Done Title"))), | |
( *C.WCHAR)(unsafe.Pointer(syscall.StringToUTF16Ptr("This test is Done."))), | |
(C.UINT)(MB_YESNOCANCEL)); | |
fmt.Printf("Return: %d\n", ret) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment