26 typedef struct _GDI_HANDLES_CONTEXT
32 typedef struct _PH_GDI_HANDLE_ITEM
49 _In_ HWND ParentWindowHandle,
56 context.ProcessItem = ProcessItem;
67 for (i = 0; i < context.List->Count; i++)
71 if (gdiHandleItem->Information)
74 PhFree(context.List->Items[i]);
93 return L
"Client Object";
95 return L
"DIB Section";
103 return L
"Metafile DC";
105 return L
"Enhanced Metafile";
125 handle = (HGDIOBJ)Handle;
134 if (GetObject(handle,
sizeof(BITMAP), &bitmap))
137 L
"Width: %u, Height: %u, Depth: %u",
149 if (GetObject(handle,
sizeof(LOGBRUSH), &brush))
152 L
"Style: %u, Color: 0x%08x, Hatch: 0x%Ix",
154 _byteswap_ulong(brush.lbColor),
164 if (GetObject(handle,
sizeof(EXTLOGPEN), &pen))
167 L
"Style: 0x%x, Width: %u, Color: 0x%08x",
170 _byteswap_ulong(pen.elpColor)
179 if (GetObject(handle,
sizeof(LOGFONT), &font))
182 L
"Face: %s, Height: %d",
193 if (GetObject(handle,
sizeof(USHORT), &count))
206 if (GetObject(handle,
sizeof(LOGPEN), &pen))
209 L
"Style: %u, Width: %u, Color: 0x%08x",
212 _byteswap_ulong(pen.lopnColor)
234 lvHandle = GetDlgItem(hwndDlg,
IDC_LIST);
236 ListView_DeleteAllItems(lvHandle);
239 for (i = 0; i < Context->List->Count; i++)
241 gdiHandleItem = Context->List->Items[i];
243 if (gdiHandleItem->Information)
246 PhFree(Context->List->Items[i]);
252 processId = (USHORT)Context->ProcessItem->ProcessId;
260 handle = &gdiShared->
Handles[i];
271 gdiHandleItem->Entry = handle;
273 gdiHandleItem->Object = handle->
Object;
274 gdiHandleItem->TypeName = typeName;
278 lvItemIndex =
PhAddListViewItem(lvHandle, MAXINT, gdiHandleItem->TypeName, gdiHandleItem);
293 _In_opt_ PVOID Context
299 return uintcmp(item1->Handle, item2->Handle);
305 _In_opt_ PVOID Context
311 return uintptrcmp((ULONG_PTR)item1->Object, (ULONG_PTR)item2->Object);
330 lvHandle = GetDlgItem(hwndDlg,
IDC_LIST);
355 switch (LOWORD(wParam))
359 EndDialog(hwndDlg, IDOK);