Skip to content

Instantly share code, notes, and snippets.

@emekoi
Created May 25, 2019 01:06
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 emekoi/d3fd0581ae93e0b4f7695789cf42ad7b to your computer and use it in GitHub Desktop.
Save emekoi/d3fd0581ae93e0b4f7695789cf42ad7b to your computer and use it in GitHub Desktop.
// use @import("std").os.windows;
pub const HANDLE = *c_void;
pub const LPCTSTR = [*]const u8;
pub const UINT = c_uint;
pub const HINSTANCE = *@OpaqueType();
pub const PWSTR = [*]u16;
pub const INT = c_int;
extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) c_int;
export fn WinMain(hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: PWSTR, nCmdShow: INT) INT {
_ = MessageBoxA(null, c"hello", c"title", 0);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment