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
@@ -160,7 +160,7 @@ static uint32_t resolve_host(const char* host, SYS_SOCKET_ADDRESS* address) {
|
||||
address->Size = sizeof(*address);
|
||||
address->Family = SYS_AF_INET;
|
||||
memcpy(address->Address, ip, 4);
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
size_t resolvedSize = sizeof(*address);
|
||||
@@ -173,8 +173,8 @@ static uint32_t resolve_host(const char* host, SYS_SOCKET_ADDRESS* address) {
|
||||
req.AddressSizeInOut = &resolvedSize;
|
||||
|
||||
uint32_t st = SysResolveHost(&req);
|
||||
if (st == STATUS_SUCCESS)
|
||||
return STATUS_SUCCESS;
|
||||
if (st == NTLSTATUS_SUCCESS)
|
||||
return NTLSTATUS_SUCCESS;
|
||||
|
||||
resolvedSize = sizeof(*address);
|
||||
memset(address, 0, sizeof(*address));
|
||||
@@ -224,7 +224,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
uint32_t st = resolve_host(host, &addr);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("httpget: resolve failed "); print_u64(st); print(" for "); print(host); print("\n");
|
||||
usage();
|
||||
SysExitProcess(1);
|
||||
@@ -242,7 +242,7 @@ int main(void) {
|
||||
|
||||
uint32_t sock = 0;
|
||||
st = SysCreateSocket(addr.Family, SYS_SOCK_STREAM, SYS_IPPROTO_TCP, &sock);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("httpget: SysCreateSocket failed "); print_u64(st); print("\n");
|
||||
SysExitProcess(1);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ int main(void) {
|
||||
addr.Port = 80;
|
||||
|
||||
st = SysConnectSocket(sock, &addr, sizeof(addr));
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("httpget: SysConnectSocket failed "); print_u64(st); print("\n");
|
||||
SysCloseHandle(sock);
|
||||
SysExitProcess(1);
|
||||
@@ -269,7 +269,7 @@ int main(void) {
|
||||
while (totalSent < off) {
|
||||
size_t sent = 0;
|
||||
st = SysSendSocket(sock, request + totalSent, off - totalSent, 0, &sent);
|
||||
if (st != STATUS_SUCCESS || sent == 0) {
|
||||
if (st != NTLSTATUS_SUCCESS || sent == 0) {
|
||||
print("httpget: SysSendSocket failed "); print_u64(st); print(" sent="); print_u64(sent); print("\n");
|
||||
SysCloseHandle(sock);
|
||||
SysExitProcess(1);
|
||||
@@ -282,7 +282,7 @@ int main(void) {
|
||||
for (;;) {
|
||||
size_t got = 0;
|
||||
st = SysRecvSocket(sock, buf, sizeof(buf) - 1, 0, &got);
|
||||
if (st != STATUS_SUCCESS) {
|
||||
if (st != NTLSTATUS_SUCCESS) {
|
||||
print("\nhttpget: SysRecvSocket failed "); print_u64(st); print(" after "); print_u64(total); print(" bytes\n");
|
||||
SysCloseHandle(sock);
|
||||
SysExitProcess(1);
|
||||
|
||||
Reference in new issue
Block a user