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:
maksw committed 2026-06-27 20:38:43 +02:00
1 parent 1f5477cf66
commit b7fcfce6f7
140 files changed
+7649 -3943

No files matched your search

+9 -9
View File
@@ -39,15 +39,15 @@ static uint32_t open_test_file(uint32_t* handleOut, const char** pathOut) {
SYS_FILE_FLAG_NONE,
&h);
uint32_t s = SysOpenFile(&req);
if (s == STATUS_SUCCESS) {
if (s == NTLSTATUS_SUCCESS) {
*handleOut = h;
if (pathOut)
*pathOut = paths[i];
return STATUS_SUCCESS;
return NTLSTATUS_SUCCESS;
}
}
return STATUS_NOT_FOUND;
return NTLSTATUS_NOT_FOUND;
}
// Prints hex8.
@@ -95,7 +95,7 @@ int main(void) {
print("async_apc: start\n");
uint32_t s = SysSetUserApcDispatcher((void*)SysUserApcDispatcher);
if (s != STATUS_SUCCESS) {
if (s != NTLSTATUS_SUCCESS) {
print("async_apc: dispatcher registration failed status=");
print_u64(s);
print("\n");
@@ -105,7 +105,7 @@ int main(void) {
uint32_t file = 0;
const char* openedPath = 0;
s = open_test_file(&file, &openedPath);
if (s != STATUS_SUCCESS) {
if (s != NTLSTATUS_SUCCESS) {
print("async_apc: open failed status=");
print_u64(s);
print("\n");
@@ -118,7 +118,7 @@ int main(void) {
uint32_t event = 0;
s = SysCreateEvent(EVENT_AUTO_RESET, 0, &event);
if (s != STATUS_SUCCESS) {
if (s != NTLSTATUS_SUCCESS) {
print("async_apc: event create failed status=");
print_u64(s);
print("\n");
@@ -151,7 +151,7 @@ int main(void) {
req.ApcContext = &state;
s = SysReadFileAsync(&req);
if (s != STATUS_PENDING) {
if (s != NTLSTATUS_PENDING) {
print("async_apc: submit failed status=");
print_u64(s);
print("\n");
@@ -163,7 +163,7 @@ int main(void) {
print("async_apc: alertable wait returned ");
print_u64(s);
print("\n");
if (s != STATUS_USER_APC && s != STATUS_SUCCESS && s != STATUS_PENDING)
if (s != NTLSTATUS_USER_APC && s != NTLSTATUS_SUCCESS && s != NTLSTATUS_PENDING)
break;
}
@@ -179,7 +179,7 @@ int main(void) {
print_hex8(buffer[2]); print(" ");
print_hex8(buffer[3]); print("\n");
uint32_t ok = (state.Delivered == 1 && state.Status == STATUS_SUCCESS &&
uint32_t ok = (state.Delivered == 1 && state.Status == NTLSTATUS_SUCCESS &&
state.Information == 512 && buffer[0] == 'M' && buffer[1] == 'Z');
SysCloseHandle(event);