implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -54,18 +54,18 @@ static void fail_status(const char* operation, uint32_t status) {
|
||||
static void verify_protected_process(const SYS_PROCESS_INFO* process) {
|
||||
uint32_t handle = 0;
|
||||
uint32_t status = SysOpenProcess(process->ProcessId, &handle);
|
||||
if (status != STATUS_SUCCESS)
|
||||
if (status != NTLSTATUS_SUCCESS)
|
||||
fail_status("open protected process", status);
|
||||
|
||||
status = SysKillProcess(handle, (int32_t)STATUS_PROCESS_KILLED);
|
||||
if (status != STATUS_ACCESS_DENIED) {
|
||||
status = SysKillProcess(handle, (int32_t)NTLSTATUS_PROCESS_KILLED);
|
||||
if (status != NTLSTATUS_ACCESS_DENIED) {
|
||||
SysCloseHandle(handle);
|
||||
fail_status("kill protected process", status);
|
||||
}
|
||||
|
||||
status = SysWaitSingle(handle, SYS_WAIT_FLAG_NONE, 0);
|
||||
SysCloseHandle(handle);
|
||||
if (status != STATUS_TIMEOUT)
|
||||
if (status != NTLSTATUS_TIMEOUT)
|
||||
fail_status("protected process remained signaled", status);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void main(void) {
|
||||
SYS_PROCESS_INFO processes[MAX_PROCESSES];
|
||||
size_t count = 0;
|
||||
uint32_t status = SysGetProcessList(processes, MAX_PROCESSES, &count);
|
||||
if (status != STATUS_SUCCESS)
|
||||
if (status != NTLSTATUS_SUCCESS)
|
||||
fail_status("query process list", status);
|
||||
|
||||
int sawIdle = 0;
|
||||
|
||||
Reference in new issue
Block a user