| ... | ... | @@ -354,13 +354,14 @@ pub fn callMain() u8 { |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | pub fn call_wWinMain() std.os.windows.INT { |
| 357 | | const hInstance = @ptrCast(std.os.windows.HINSTANCE, std.os.windows.kernel32.GetModuleHandleW(null).?); |
| 358 | | const hPrevInstance: ?std.os.windows.HINSTANCE = null; // MSDN: "This parameter is always NULL" |
| 357 | const MAIN_HINSTANCE = @typeInfo(@TypeOf(root.wWinMain)).Fn.args[0].arg_type.?; |
| 358 | const hInstance = @ptrCast(MAIN_HINSTANCE, std.os.windows.kernel32.GetModuleHandleW(null).?); |
| 359 | 359 | const lpCmdLine = std.os.windows.kernel32.GetCommandLineW(); |
| 360 | 360 | |
| 361 | 361 | // There's no (documented) way to get the nCmdShow parameter, so we're |
| 362 | 362 | // using this fairly standard default. |
| 363 | 363 | const nCmdShow = std.os.windows.user32.SW_SHOW; |
| 364 | 364 | |
| 365 | | return root.wWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow); |
| 365 | // second parameter hPrevInstance, MSDN: "This parameter is always NULL" |
| 366 | return root.wWinMain(hInstance, null, lpCmdLine, nCmdShow); |
| 366 | 367 | } |