Skip to content

Commit f4eefe2

Browse files
committed
for the top context menu, 'ClassicCom' is required since 'WinRtClassicComMix' will lead to IOleWindow->GetWindow(&hWnd) to return a null hwnd
1 parent caec0f2 commit f4eefe2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ExplorerCommandVerb/dllmain.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ std::wstring GetModuleDir(HMODULE hMod /*= nullptr*/)
127127
return GetParentDirectory(GetModulePath(hMod));
128128
}
129129

130-
class ExplorerCommandBase : public RuntimeClass<RuntimeClassFlags<WinRtClassicComMix | InhibitRoOriginateError>, IExplorerCommand, IObjectWithSite>
130+
// note: for the top context menu, 'ClassicCom' is required since 'WinRtClassicComMix' will lead to
131+
// IOleWindow->GetWindow(&hWnd) to return a null hwnd.
132+
class ExplorerCommandBase : public RuntimeClass<RuntimeClassFlags<ClassicCom | InhibitRoOriginateError>, IExplorerCommand, IObjectWithSite>
131133
{
132134
public:
133135
virtual const wchar_t* Title(IShellItemArray* items) = 0;
@@ -291,9 +293,9 @@ class __declspec(uuid("3C557AFF-6181-4BBC-937D-E2FE8844DD49")) GrepWinExplorerCo
291293
}
292294
}
293295

294-
path = L"/searchpath:\"" + path + L"\"";
296+
path = L"/searchpath:\"" + path + L"\"";
295297

296-
// try to launch the exe with the explorer instance:
298+
// try to launch the exe with the explorer instance:
297299
// this avoids that the exe is started with the identity of this dll,
298300
// starting it as if it was started the normal way.
299301
bool execSucceeded = false;

0 commit comments

Comments
 (0)