diff --git a/reactos/dll/win32/user32/windows/menu.c b/reactos/dll/win32/user32/windows/menu.c index 169a9c8c4ce..7b37f9f6ec4 100644 --- a/reactos/dll/win32/user32/windows/menu.c +++ b/reactos/dll/win32/user32/windows/menu.c @@ -3967,7 +3967,10 @@ User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength) Common = (PLOADMENU_CALLBACK_ARGUMENTS) Arguments; - Result = (LRESULT)LoadMenuW(Common->hModule, IS_INTRESOURCE(Common->MenuName) ? Common->MenuName : (LPCWSTR)&Common->MenuName); + Result = (LRESULT)LoadMenuW( Common->hModule, + IS_INTRESOURCE(Common->MenuName) ? + MAKEINTRESOURCE(Common->MenuName[0]) : + (LPCWSTR)&Common->MenuName); return ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS); } diff --git a/reactos/subsystems/win32/win32k/ntuser/callback.c b/reactos/subsystems/win32/win32k/ntuser/callback.c index 6fbf4235613..efd390a1f60 100644 --- a/reactos/subsystems/win32/win32k/ntuser/callback.c +++ b/reactos/subsystems/win32/win32k/ntuser/callback.c @@ -662,11 +662,13 @@ co_IntCallLoadMenu( HINSTANCE hModule, Argument = IntCbAllocateMemory(ArgumentLength); if (NULL == Argument) { - DPRINT1("EventProc callback failed: out of memory\n"); + DPRINT1("LoadMenu callback failed: out of memory\n"); return 0; } Common = (PLOADMENU_CALLBACK_ARGUMENTS) Argument; + // Help Intersource check and MenuName is now 4 bytes + so zero it. + RtlZeroMemory(Common, ArgumentLength); Common->hModule = hModule; if (pMenuName->Length)