mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 13:37:12 +00:00
- Working with Michael Martin to fix the LoadMenu callback bug. MenuName is a variable string buffer and not a pointer. The minimum size is always four bytes. Initialization of the structure, zero out the memory, allowing Intersource check to function as it should. To make it Intersource, use the first word character in the buffer.
svn path=/trunk/; revision=43101
This commit is contained in:
parent
bd6fba2037
commit
1ebd555855
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue