25 typedef struct _HANDLE_STATISTICS_ENTRY
31 typedef struct _HANDLE_STATISTICS_CONTEXT
48 _In_ HWND ParentWindowHandle,
60 &context.ProcessHandle,
65 PhShowStatus(ParentWindowHandle, L
"Unable to open the process", status, 0);
71 context.ProcessHandle,
78 NtClose(context.ProcessHandle);
79 PhShowStatus(ParentWindowHandle, L
"Unable to enumerate process handles", status, 0);
83 memset(&context.Entries, 0,
sizeof(context.Entries));
95 if (context.Entries[i].Name)
100 NtClose(context.ProcessHandle);
103 static INT NTAPI PhpTypeCountCompareFunction(
106 _In_opt_ PVOID Context
112 return uintcmp(entry1->Count, entry2->Count);
131 processId = context->ProcessId;
133 for (i = 0; i < context->Handles->NumberOfHandles; i++)
139 handleInfo = &context->Handles->Handles[i];
152 context->ProcessHandle,
160 entry->Name = typeName;
166 lvHandle = GetDlgItem(hwndDlg,
IDC_LIST);
182 entry = &context->Entries[i];
184 if (entry->Count == 0)
197 entry->Name ? entry->Name->Buffer : unknownType->
Buffer,
218 switch (LOWORD(wParam))
222 EndDialog(hwndDlg, IDOK);