msvcrt: Clean up __wgetmainargs, _wdupenv_s, _wgetenv_s; add __getmainargs

This commit is contained in:
2025-09-26 11:40:36 -06:00
parent 104e9e869d
commit b5da26aa48
3 changed files with 251 additions and 145 deletions

View File

@@ -1907,25 +1907,6 @@ namespace kernel32 {
DEBUG_LOG("-> %p\n", result);
return result;
}
// DEBUG_LOG("VirtualAlloc %p %u %u %u\n",lpAddress, dwSize, flAllocationType, flProtect);
// if (flAllocationType & 0x2000 || lpAddress == NULL) { // MEM_RESERVE
// // do this for now...
// assert(lpAddress == NULL);
// void *mem = 0;
// posix_memalign(&mem, 0x1000, dwSize);
// memset(mem, 0, dwSize);
// // Windows only fences off the lower 2GB of the 32-bit address space for the private use of processes.
// assert(mem < (void*)0x80000000);
// DEBUG_LOG("-> %p\n", mem);
// return mem;
// } else {
// assert(lpAddress != NULL);
// return lpAddress;
// }
}
unsigned int WIN_FUNC VirtualFree(void *lpAddress, unsigned int dwSize, int dwFreeType) {