MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / OnShowToken

Method OnShowToken

WinArk/ProcessPropertiesDlg.cpp:110–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110LRESULT CProcessPropertiesDlg::OnShowToken(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
111 HANDLE hToken = nullptr;
112 auto hProcess = DriverHelper::OpenProcess(m_px.GetProcessInfo()->Id, PROCESS_QUERY_INFORMATION);
113 if (hProcess) {
114 ::OpenProcessToken(hProcess, TOKEN_QUERY, &hToken);
115 ::CloseHandle(hProcess);
116 }
117 if (!hToken) {
118 AtlMessageBox(*this, L"Failed to open process token", IDS_TITLE, MB_ICONERROR);
119 return 0;
120 }
121 CTokenPropertiesDlg dlg(hToken);
122 dlg.DoModal();
123
124 return 0;
125}
126
127LRESULT CProcessPropertiesDlg::OnShowJob(WORD, WORD wID, HWND, BOOL&) {
128 ObjectManager mgr;

Callers

nothing calls this directly

Calls 1

GetProcessInfoMethod · 0.45

Tested by

no test coverage detected