| 92 | } |
| 93 | |
| 94 | int 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 | } |
nothing calls this directly
no test coverage detected