MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / GetProcessName

Method GetProcessName

DebugView++Lib/ProcessInfo.cpp:55–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55std::wstring ProcessInfo::GetProcessName(HANDLE handle)
56{
57 std::array<wchar_t, MAX_PATH> buf;
58 auto rc = GetProcessImageFileName(handle, buf.data(), buf.size());
59 if (rc == 0)
60 return L"";
61
62 const wchar_t* name = buf.data();
63 for (auto it = buf.data(); *it; ++it)
64 {
65 if (*it == '\\')
66 name = it + 1;
67 }
68 return name;
69}
70
71std::wstring ProcessInfo::GetProcessInfo(HANDLE handle)
72{

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected