Skip to content

Commit

Permalink
for the top context menu, 'ClassicCom' is required since 'WinRtClassi…
Browse files Browse the repository at this point in the history
…cComMix' will lead to IOleWindow->GetWindow(&hWnd) to return a null hwnd
  • Loading branch information
stefankueng committed Jun 22, 2024
1 parent caec0f2 commit f4eefe2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ExplorerCommandVerb/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ std::wstring GetModuleDir(HMODULE hMod /*= nullptr*/)
return GetParentDirectory(GetModulePath(hMod));
}

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

path = L"/searchpath:\"" + path + L"\"";
path = L"/searchpath:\"" + path + L"\"";

// try to launch the exe with the explorer instance:
// try to launch the exe with the explorer instance:
// this avoids that the exe is started with the identity of this dll,
// starting it as if it was started the normal way.
bool execSucceeded = false;
Expand Down

0 comments on commit f4eefe2

Please sign in to comment.