26 typedef struct _UNLOADED_DLLS_CONTEXT
30 PVOID CapturedEventTrace;
41 _In_ HWND ParentWindowHandle,
47 context.ProcessItem = ProcessItem;
48 context.CapturedEventTrace = NULL;
58 if (context.CapturedEventTrace)
59 PhFree(context.CapturedEventTrace);
71 HANDLE processHandle = NULL;
73 ULONG capturedElementSize;
74 ULONG capturedElementCount;
75 PVOID capturedEventTracePointer;
76 PVOID capturedEventTrace = NULL;
81 lvHandle = GetDlgItem(hwndDlg,
IDC_LIST);
82 ListView_DeleteAllItems(lvHandle);
105 &capturedElementCount,
114 &capturedEventTracePointer,
120 if (!capturedEventTracePointer)
123 if (capturedElementCount > 0x4000)
124 capturedElementCount = 0x4000;
126 eventTraceSize = capturedElementSize * capturedElementCount;
130 if (!capturedEventTrace)
132 status = STATUS_NO_MEMORY;
138 capturedEventTracePointer,
145 currentEvent = capturedEventTrace;
149 for (i = 0; i < capturedElementCount; i++)
156 SYSTEMTIME systemTime;
166 buffer,
sizeof(buffer) /
sizeof(WCHAR), NULL))
197 if (Context->CapturedEventTrace)
198 PhFree(Context->CapturedEventTrace);
200 Context->CapturedEventTrace = capturedEventTrace;
205 NtClose(processHandle);
213 PhShowStatus(hwndDlg, L
"Unable to retrieve unload event trace information", status, 0);
218 static INT NTAPI EtpNumberCompareFunction(
221 _In_opt_ PVOID Context
230 static INT NTAPI EtpBaseAddressCompareFunction(
233 _In_opt_ PVOID Context
242 static INT NTAPI EtpSizeCompareFunction(
245 _In_opt_ PVOID Context
254 static INT NTAPI EtpTimeStampCompareFunction(
257 _In_opt_ PVOID Context
266 static INT NTAPI EtpCheckSumCompareFunction(
269 _In_opt_ PVOID Context
287 if (uMsg == WM_INITDIALOG)
290 SetProp(hwndDlg, L
"Context", (HANDLE)context);
296 if (uMsg == WM_DESTROY)
297 RemoveProp(hwndDlg, L
"Context");
311 context->ListViewHandle = lvHandle = GetDlgItem(hwndDlg,
IDC_LIST);
331 EndDialog(hwndDlg, IDCANCEL);
338 switch (LOWORD(wParam))
342 EndDialog(hwndDlg, IDOK);