mirror of
https://github.com/reactos/reactos.git
synced 2026-07-02 05:44:26 +08:00
[0.4.15][SHELL32] CM::InvokeCommand case-insensitive compare verb string (#7582)
CORE-18733
This is a backport of the following commit:
1faa571f3f [SHELL32] CM::InvokeCommand case-insensitive compare verb string (#7582)
This commit is contained in:
@@ -1200,7 +1200,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode)
|
||||
{
|
||||
/* The static verbs are ANSI, get a unicode version before doing the compare */
|
||||
SHAnsiToUnicode(g_StaticInvokeCmdMap[i].szStringVerb, UnicodeStr, MAX_VERB);
|
||||
if (!wcscmp(UnicodeStr, (LPWSTR)Verb))
|
||||
if (!_wcsicmp(UnicodeStr, (LPWSTR)Verb))
|
||||
{
|
||||
/* Return the Corresponding Id */
|
||||
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
||||
@@ -1209,7 +1209,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!strcmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb))
|
||||
if (!_stricmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb))
|
||||
{
|
||||
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
||||
return TRUE;
|
||||
@@ -1501,6 +1501,8 @@ CDefaultContextMenu::InvokeCommand(
|
||||
/* Get the ID which corresponds to this verb, and update our local copy */
|
||||
if (MapVerbToCmdId((LPVOID)LocalInvokeInfo.lpVerb, &CmdId, FALSE))
|
||||
LocalInvokeInfo.lpVerb = MAKEINTRESOURCEA(CmdId);
|
||||
else
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
CmdId = LOWORD(LocalInvokeInfo.lpVerb);
|
||||
|
||||
Reference in New Issue
Block a user