Fix std.os.windows.user32.messageBoxW

Arguments to `selectSymbol` were passed in the wrong order.
This commit is contained in:
Manuel Floruß 2021-04-15 14:10:07 +02:00 committed by Andrew Kelley
parent 235aa8c078
commit 2cd49d20e8

View File

@ -663,7 +663,7 @@ pub fn messageBoxA(hWnd: ?HWND, lpText: [*:0]const u8, lpCaption: [*:0]const u8,
pub extern "user32" fn MessageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: ?[*:0]const u16, uType: UINT) callconv(WINAPI) i32;
pub var pfnMessageBoxW: @TypeOf(MessageBoxW) = undefined;
pub fn messageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: [*:0]const u16, uType: u32) !i32 {
const function = selectSymbol(pfnMessageBoxW, MessageBoxW, .win2k);
const function = selectSymbol(MessageBoxW, pfnMessageBoxW, .win2k);
const value = function(hWnd, lpText, lpCaption, uType);
if (value != 0) return value;
switch (GetLastError()) {