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
@@ -148,7 +148,7 @@ static uint32_t resolve_address(const char* text, SYS_SOCKET_ADDRESS* out) {
|
||||
out->Size = sizeof(*out);
|
||||
out->Family = SYS_AF_INET;
|
||||
memcpy(out->Address, ip, 4);
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SYS_RESOLVE_HOST_REQUEST req;
|
||||
@@ -161,8 +161,8 @@ static uint32_t resolve_address(const char* text, SYS_SOCKET_ADDRESS* out) {
|
||||
req.AddressSizeInOut = &addressSize;
|
||||
|
||||
uint32_t status = SysResolveHost(&req);
|
||||
if (status == STATUS_SUCCESS)
|
||||
return STATUS_SUCCESS;
|
||||
if (status == NTLSTATUS_SUCCESS)
|
||||
return NTLSTATUS_SUCCESS;
|
||||
|
||||
addressSize = sizeof(*out);
|
||||
memset(out, 0, sizeof(*out));
|
||||
@@ -179,7 +179,7 @@ static int run_send(const char* cmd) {
|
||||
cmd = next_token(cmd, tok, sizeof(tok));
|
||||
if (!tok[0]) { usage(); return 1; }
|
||||
uint32_t status = resolve_address(tok, &remote);
|
||||
if (status != STATUS_SUCCESS) { print("udp: resolve failed "); print_u64(status); print("\n"); return 1; }
|
||||
if (status != NTLSTATUS_SUCCESS) { print("udp: resolve failed "); print_u64(status); print("\n"); return 1; }
|
||||
cmd = next_token(cmd, tok, sizeof(tok));
|
||||
if (!tok[0] || !parse_port(tok, &port)) { usage(); return 1; }
|
||||
|
||||
@@ -197,7 +197,7 @@ static int run_send(const char* cmd) {
|
||||
|
||||
uint32_t sock = 0;
|
||||
uint32_t st = SysCreateSocket(remote.Family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysCreateSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ static int run_send(const char* cmd) {
|
||||
|
||||
st = SysSendToSocket(sock, &req);
|
||||
SysCloseHandle(sock);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysSendToSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ static int run_listen(const char* cmd) {
|
||||
|
||||
uint32_t sock = 0;
|
||||
uint32_t st = SysCreateSocket(family, SYS_SOCK_DGRAM, SYS_IPPROTO_UDP, &sock);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysCreateSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ static int run_listen(const char* cmd) {
|
||||
bindAddr.Port = port;
|
||||
|
||||
st = SysBindSocket(sock, &bindAddr, sizeof(bindAddr));
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysBindSocket failed "); print_u64(st); print("\n");
|
||||
SysCloseHandle(sock);
|
||||
return 1;
|
||||
@@ -278,7 +278,7 @@ static int run_listen(const char* cmd) {
|
||||
|
||||
st = SysRecvFromSocket(sock, &req);
|
||||
SysCloseHandle(sock);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("udp: SysRecvFromSocket failed "); print_u64(st); print("\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user