Fixed NtQueryInformationProcess to return correct information and
error code for ProcessDebugPort when no debugger is attached.
This commit is contained in:
parent
0314a65a58
commit
b50a532aff
|
@ -116,15 +116,34 @@ NTSTATUS WINAPI NtQueryInformationProcess(
|
||||||
IN ULONG ProcessInformationLength,
|
IN ULONG ProcessInformationLength,
|
||||||
OUT PULONG ReturnLength)
|
OUT PULONG ReturnLength)
|
||||||
{
|
{
|
||||||
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
|
NTSTATUS ret = STATUS_SUCCESS;
|
||||||
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength,ReturnLength
|
ULONG len = 0;
|
||||||
);
|
|
||||||
/* "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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue