MCPcopy Create free account
hub / github.com/M2Team/NanaBox / GetShellProcessId

Function GetShellProcessId

NanaBox/MainWindowControl.cpp:11–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace
10{
11 DWORD GetShellProcessId()
12 {
13 HWND ShellWindowHandle = ::GetShellWindow();
14 if (!ShellWindowHandle)
15 {
16 return static_cast<DWORD>(-1);
17 }
18
19 DWORD ShellProcessId = static_cast<DWORD>(-1);
20 if (!::GetWindowThreadProcessId(ShellWindowHandle, &ShellProcessId))
21 {
22 return static_cast<DWORD>(-1);
23 }
24 return ShellProcessId;
25 }
26}
27
28namespace winrt

Callers 1

SponsorButtonClickMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected