> sdk's windbg already work, so why no VC++ debugger ? Then we'll probably have to implement NtQueryInformationProcess completely for ProcessDebugPort. Does anyone know what it should return ? The debugger process handle ?
> btw, your patch will not compile (ret/retv) Sorry, I sent the wrong file. Here's the correct version. Laurent Pinchart
--- nt.c 9 Mar 2002 23:39:09 -0000 1.38 +++ nt.c 2 Apr 2002 21:59:41 -0000 @@ -116,15 +116,34 @@ 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); + NTSTATUS ret = STATUS_SUCCESS; + ULONG len = 0; - 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; } /******************************************************************************