Commit b50a532a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Alexandre Julliard

Fixed NtQueryInformationProcess to return correct information and

error code for ProcessDebugPort when no debugger is attached.
parent 0314a65a
......@@ -116,15 +116,34 @@ NTSTATUS WINAPI NtQueryInformationProcess(
IN ULONG ProcessInformationLength,
OUT PULONG ReturnLength)
{
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength,ReturnLength
);
/* "These are not the debuggers you are looking for." */
if (ProcessInformationClass == ProcessDebugPort)
/* set it to 0 aka "no debugger" to satisfy copy protections */
memset(ProcessInformation,0,ProcessInformationLength);
return 0;
NTSTATUS ret = STATUS_SUCCESS;
ULONG len = 0;
switch (ProcessInformationClass) {
case ProcessDebugPort:
/* "These are not the debuggers you are looking for." */
/* set it to 0 aka "no debugger" to satisfy copy protections */
if (ProcessInformationLength == 4)
{
memset(ProcessInformation,0,ProcessInformationLength);
len = 4;
}
else
ret = STATUS_INFO_LENGTH_MISMATCH;
break;
default:
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
ProcessHandle,ProcessInformationClass,
ProcessInformation,ProcessInformationLength,
ReturnLength
);
break;
}
if (ReturnLength)
*ReturnLength = len;
return ret;
}
/******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment