mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 10:12:58 +00:00
[SHELL32] CM::InvokeCommand case-insensitive compare verb string (#7582)
CORE-18733
This commit is contained in:
parent
1fec01561d
commit
1faa571f3f
1 changed files with 4 additions and 2 deletions
|
@ -1214,7 +1214,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode)
|
||||||
{
|
{
|
||||||
/* The static verbs are ANSI, get a unicode version before doing the compare */
|
/* The static verbs are ANSI, get a unicode version before doing the compare */
|
||||||
SHAnsiToUnicode(g_StaticInvokeCmdMap[i].szStringVerb, UnicodeStr, MAX_VERB);
|
SHAnsiToUnicode(g_StaticInvokeCmdMap[i].szStringVerb, UnicodeStr, MAX_VERB);
|
||||||
if (!wcscmp(UnicodeStr, (LPWSTR)Verb))
|
if (!_wcsicmp(UnicodeStr, (LPWSTR)Verb))
|
||||||
{
|
{
|
||||||
/* Return the Corresponding Id */
|
/* Return the Corresponding Id */
|
||||||
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
||||||
|
@ -1223,7 +1223,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!strcmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb))
|
if (!_stricmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb))
|
||||||
{
|
{
|
||||||
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
*idCmd = g_StaticInvokeCmdMap[i].IntVerb;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1527,6 +1527,8 @@ CDefaultContextMenu::InvokeCommand(
|
||||||
/* Get the ID which corresponds to this verb, and update our local copy */
|
/* Get the ID which corresponds to this verb, and update our local copy */
|
||||||
if (MapVerbToCmdId((LPVOID)LocalInvokeInfo.lpVerb, &CmdId, FALSE))
|
if (MapVerbToCmdId((LPVOID)LocalInvokeInfo.lpVerb, &CmdId, FALSE))
|
||||||
LocalInvokeInfo.lpVerb = MAKEINTRESOURCEA(CmdId);
|
LocalInvokeInfo.lpVerb = MAKEINTRESOURCEA(CmdId);
|
||||||
|
else
|
||||||
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
CmdId = LOWORD(LocalInvokeInfo.lpVerb);
|
CmdId = LOWORD(LocalInvokeInfo.lpVerb);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue