mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 19:43:04 +00:00
[SHELL32] Invoke the ItemIDList of shortcuts (#7152)
Invoking the IDList as if the target was double-clicked in Explorer fixes shortcuts to control panel items (both .cpl and ShellFolder types). CORE-19690
This commit is contained in:
parent
a45d375f60
commit
f6a25d48d5
4 changed files with 52 additions and 24 deletions
|
@ -110,6 +110,21 @@ static int FindVerbInDefaultVerbList(LPCWSTR List, LPCWSTR Verb)
|
|||
return -1;
|
||||
}
|
||||
|
||||
EXTERN_C HRESULT SHELL32_EnumDefaultVerbList(LPCWSTR List, UINT Index, LPWSTR Verb, SIZE_T cchMax)
|
||||
{
|
||||
for (UINT i = 0; *List; ++i)
|
||||
{
|
||||
while (IsVerbListSeparator(*List))
|
||||
List++;
|
||||
LPCWSTR Start = List;
|
||||
while (*List && !IsVerbListSeparator(*List))
|
||||
List++;
|
||||
if (List > Start && i == Index)
|
||||
return StringCchCopyNW(Verb, cchMax, Start, List - Start);
|
||||
}
|
||||
return HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS);
|
||||
}
|
||||
|
||||
class CDefaultContextMenu :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IContextMenu3,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue