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

Method OpenObjectDialog

WinArk/ProcessHelper.cpp:94–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int ProcessHelper::OpenObjectDialog(const WinSys::ProcessManager& pm, HANDLE hObject, const CString& type) {
95 if (type == L"Job") {
96 auto name = ObjectManager::GetObjectName(hObject, ObjectManager::GetType(type)->TypeIndex);
97 CJobPropertiesDlg dlg(pm, hObject, name.c_str());
98 dlg.DoModal();
99 }
100 else if (type == L"Token") {
101 CTokenPropertiesDlg dlg(hObject);
102 dlg.DoModal();
103 }
104 else if (type == L"Process") {
105 auto pi = pm.GetProcessById(::GetProcessId(hObject));
106 if (pi == nullptr)
107 return OpenObjectDialog(pm, nullptr, L"");
108 ProcessInfoEx px(pi.get());
109 //CResizablePropertySheet ps(L"Process");
110 //CPropertyPage<IDD_JOB> page;
111 //ps.AddPage(page);
112 //ps.DoModal();
113
114 CProcessPropertiesDlg dlg(pm, px);
115 dlg.SetModal(true);
116 dlg.DoModal();
117 }
118 else {
119 AtlMessageBox(nullptr, L"Object properties not available", IDS_TITLE, MB_ICONINFORMATION);
120 }
121 return 0;
122}

Callers

nothing calls this directly

Calls 2

SetModalMethod · 0.80
GetProcessByIdMethod · 0.45

Tested by

no test coverage detected