27 #define MSG_UPDATE (WM_APP + 1)
37 static VOID (NTAPI *UnregisterDialogFunction)(HWND);
41 _In_ HWND ParentWindowHandle,
42 _In_opt_
VOID (NTAPI *RegisterDialog)(HWND),
43 _In_opt_
VOID (NTAPI *UnregisterDialog)(HWND)
55 UnregisterDialogFunction = UnregisterDialog;
66 static VOID NTAPI ProcessesUpdatedCallback(
67 _In_opt_ PVOID Parameter,
68 _In_opt_ PVOID Context
74 static VOID PhpUpdateMemoryListInfo(
87 ULONG_PTR standbyPageCount;
88 ULONG_PTR repurposedPageCount;
92 repurposedPageCount = 0;
94 for (i = 0; i < 8; i++)
170 PhpUpdateMemoryListInfo(hwndDlg);
183 UnregisterDialogFunction(hwndDlg);
189 switch (LOWORD(wParam))
193 DestroyWindow(hwndDlg);
206 GetClientRect(GetDlgItem(hwndDlg,
IDC_EMPTY), &buttonRect);
208 point.y = buttonRect.bottom;
210 ClientToScreen(GetDlgItem(hwndDlg,
IDC_EMPTY), &point);
216 switch (selectedItem->
Id)
237 SetCursor(LoadCursor(NULL, IDC_WAIT));
238 status = NtSetSystemInformation(
243 SetCursor(LoadCursor(NULL, IDC_ARROW));
245 if (status == STATUS_PRIVILEGE_NOT_HELD)
251 SetCursor(LoadCursor(NULL, IDC_WAIT));
253 SetCursor(LoadCursor(NULL, IDC_ARROW));
259 status = STATUS_SUCCESS;
266 PhShowStatus(hwndDlg, L
"Unable to execute the memory list command", status, 0);
278 PhpUpdateMemoryListInfo(hwndDlg);