Fix OpenProcessToken pseudo-handle regression

This commit is contained in:
2025-10-05 18:16:15 -06:00
parent 0d76e541c1
commit ff04eb9f41
6 changed files with 31 additions and 25 deletions

View File

@@ -34,9 +34,7 @@ BOOL WIN_FUNC IsWow64Process(HANDLE hProcess, PBOOL Wow64Process) {
return FALSE;
}
uintptr_t rawHandle = reinterpret_cast<uintptr_t>(hProcess);
bool isPseudoHandle = rawHandle == kPseudoCurrentProcessHandleValue;
if (!isPseudoHandle) {
if (!isPseudoCurrentProcessHandle(hProcess)) {
if (!hProcess) {
wibo::lastError = ERROR_INVALID_HANDLE;
return FALSE;