mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
Revert accidential changes.
svn path=/trunk/; revision=13123
This commit is contained in:
parent
fafbe81db6
commit
b924c1f528
1 changed files with 7 additions and 39 deletions
|
@ -79,46 +79,14 @@ ContinueDebugEvent (
|
||||||
*
|
*
|
||||||
* @unmplemented
|
* @unmplemented
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI
|
BOOL
|
||||||
DebugActiveProcess(DWORD dwProcessId)
|
WINAPI
|
||||||
|
DebugActiveProcess(
|
||||||
|
DWORD dwProcessId
|
||||||
|
)
|
||||||
{
|
{
|
||||||
CSRSS_API_REQUEST Request;
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
CSRSS_API_REPLY Reply;
|
|
||||||
HANDLE hProcess;
|
|
||||||
NTSTATUS Status;
|
|
||||||
|
|
||||||
hProcess = OpenProcess(PROCESS_ALL_ACCESS,
|
|
||||||
FALSE,
|
|
||||||
dwProcessId);
|
|
||||||
if (hProcess == NULL)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Notify CSRSS */
|
|
||||||
Request.Type = CSRSS_DEBUG_PROCESS;
|
|
||||||
Request.Data.DebugProcessRequest.DebuggeeProcessId = dwProcessId;
|
|
||||||
Request.Data.DebugProcessRequest.DebuggerProcessId = GetCurrentProcessId();
|
|
||||||
Request.Data.DebugProcessRequest.DebuggerThreadId = GetCurrentThreadId();
|
|
||||||
Status = CsrClientCallServer(&Request,
|
|
||||||
&Reply,
|
|
||||||
sizeof(CSRSS_API_REQUEST),
|
|
||||||
sizeof(CSRSS_API_REPLY));
|
|
||||||
if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Reply.Status))
|
|
||||||
{
|
|
||||||
SetLastError(ERROR_ACCESS_DENIED);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
CloseHandle(hProcess);
|
|
||||||
|
|
||||||
/* Connect the current process (debugger) to the debug subsystem */
|
|
||||||
Status = DbgUiConnectToDbg();
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
SetLastErrorByStatus(Status);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue