27 typedef struct _COMMON_PAGE_CONTEXT
42 _In_ LPPROPSHEETPAGE ppsp
68 HPROPSHEETPAGE page = NULL;
94 (objectProperties->
NumberOfPages - 1) *
sizeof(HPROPSHEETPAGE));
97 objectProperties->
Pages[1] = page;
109 HPROPSHEETPAGE propSheetPageHandle;
110 PROPSHEETPAGE propSheetPage;
115 pageContext->HandleItem = Context->HandleItem;
116 pageContext->ProcessId = Context->ProcessId;
118 memset(&propSheetPage, 0,
sizeof(PROPSHEETPAGE));
119 propSheetPage.dwSize =
sizeof(PROPSHEETPAGE);
120 propSheetPage.dwFlags = PSP_USECALLBACK;
122 propSheetPage.pszTemplate = Template;
123 propSheetPage.pfnDlgProc = DlgProc;
124 propSheetPage.lParam = (LPARAM)pageContext;
127 propSheetPageHandle = CreatePropertySheetPage(&propSheetPage);
130 return propSheetPageHandle;
136 _In_ LPPROPSHEETPAGE ppsp
143 if (uMsg == PSPCB_ADDREF)
145 else if (uMsg == PSPCB_RELEASE)
151 static NTSTATUS EtpDuplicateHandleFromProcess(
152 _Out_ PHANDLE Handle,
153 _In_ ACCESS_MASK DesiredAccess,
158 HANDLE processHandle;
169 Context->HandleItem->Handle,
176 NtClose(processHandle);
192 LPPROPSHEETPAGE propSheetPage = (LPPROPSHEETPAGE)lParam;
196 if (
NT_SUCCESS(EtpDuplicateHandleFromProcess(&portHandle, READ_CONTROL, context)))
232 static BOOLEAN NTAPI EnumGenericModulesCallback(
234 _In_opt_ PVOID Context
240 (ULONG64)Module->BaseAddress, Module->Size);
257 LPPROPSHEETPAGE propSheetPage = (LPPROPSHEETPAGE)lParam;
259 HANDLE workerFactoryHandle;
261 if (
NT_SUCCESS(EtpDuplicateHandleFromProcess(&workerFactoryHandle, WORKER_FACTORY_QUERY_INFORMATION, context)))
263 WORKER_FACTORY_BASIC_INFORMATION basicInfo;
265 if (
NT_SUCCESS(NtQueryInformationWorkerFactory(
267 WorkerFactoryBasicInformation,
269 sizeof(WORKER_FACTORY_BASIC_INFORMATION),
282 0, EnumGenericModulesCallback, symbolProvider);
285 NULL, NULL, NULL, NULL);
306 NtClose(workerFactoryHandle);