Minor cleanups

This commit is contained in:
2025-11-11 22:56:02 -07:00
parent 31bc1cd013
commit 5cc8d239dc
6 changed files with 28 additions and 24 deletions

View File

@@ -18,6 +18,7 @@ BOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, H
(void)dwDesiredAccess;
(void)dwOptions;
if (!lpTargetHandle) {
DEBUG_LOG("-> ERROR_INVALID_PARAMETER\n");
setLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
@@ -53,9 +54,11 @@ BOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle, HANDLE hSourceHandle, H
}
if (!handles.duplicateTo(hSourceHandle, handles, *lpTargetHandle, dwDesiredAccess, bInheritHandle, dwOptions)) {
DEBUG_LOG("-> ERROR_INVALID_HANDLE\n");
setLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
DEBUG_LOG("-> %p\n", *lpTargetHandle);
return TRUE;
}