26 typedef struct _MEMORY_PROTECT_CONTEXT
40 _In_ HWND ParentWindowHandle,
47 context.ProcessItem = ProcessItem;
48 context.MemoryItem = MemoryItem;
73 L
"Possible values:\r\n"
75 L
"0x01 - PAGE_NOACCESS\r\n"
76 L
"0x02 - PAGE_READONLY\r\n"
77 L
"0x04 - PAGE_READWRITE\r\n"
78 L
"0x08 - PAGE_WRITECOPY\r\n"
79 L
"0x10 - PAGE_EXECUTE\r\n"
80 L
"0x20 - PAGE_EXECUTE_READ\r\n"
81 L
"0x40 - PAGE_EXECUTE_READWRITE\r\n"
82 L
"0x80 - PAGE_EXECUTE_WRITECOPY\r\n"
84 L
"0x100 - PAGE_GUARD\r\n"
85 L
"0x200 - PAGE_NOCACHE\r\n"
86 L
"0x400 - PAGE_WRITECOMBINE\r\n"
89 SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hwndDlg,
IDC_VALUE),
TRUE);
99 switch (LOWORD(wParam))
102 EndDialog(hwndDlg, IDCANCEL);
108 HANDLE processHandle;
116 context->ProcessItem->ProcessId
123 baseAddress = context->MemoryItem->BaseAddress;
124 regionSize = context->MemoryItem->RegionSize;
135 context->MemoryItem->Protect = (ULONG)protect;
140 EndDialog(hwndDlg, IDOK);
144 PhShowStatus(hwndDlg, L
"Unable to change memory protection", status, 0);
145 SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hwndDlg,
IDC_VALUE),
TRUE);
146 Edit_SetSel(GetDlgItem(hwndDlg,
IDC_VALUE), 0, -1);