implemented CheckRemoteDebuggerPresent() (only kernel32 part)

svn path=/trunk/; revision=11995
This commit is contained in:
Thomas Bluemel 2004-12-09 19:03:33 +00:00
parent e6bc6ec79d
commit 865bf755ca

View file

@ -1,4 +1,4 @@
/* $Id: debugger.c,v 1.4 2004/01/23 17:12:54 ekohl Exp $
/* $Id: debugger.c,v 1.5 2004/12/09 19:03:33 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -14,11 +14,35 @@
/* FUNCTIONS *****************************************************************/
/*
* @unimplemented
* @implemented
*/
BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPresent)
BOOL WINAPI
CheckRemoteDebuggerPresent (
HANDLE hProcess,
PBOOL pbDebuggerPresent
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
HANDLE DebugPort;
NTSTATUS Status;
if(pbDebuggerPresent == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
Status = NtQueryInformationProcess(hProcess,
ProcessDebugPort,
(PVOID)&DebugPort,
sizeof(HANDLE),
NULL);
if(NT_SUCCESS(Status))
{
*pbDebuggerPresent = ((DebugPort != NULL) ? TRUE : FALSE);
return TRUE;
}
SetLastErrorByStatus(Status);
return FALSE;
}
@ -26,8 +50,8 @@ BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPresent)
/*
* @implemented
*/
BOOL WINAPI ContinueDebugEvent
(
BOOL WINAPI
ContinueDebugEvent (
DWORD dwProcessId,
DWORD dwThreadId,
DWORD dwContinueStatus
@ -54,7 +78,11 @@ BOOL WINAPI ContinueDebugEvent
/*
* @unimplemented
*/
BOOL WINAPI DebugActiveProcess(DWORD dwProcessId)
BOOL
WINAPI
DebugActiveProcess (
DWORD dwProcessId
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@ -64,7 +92,11 @@ BOOL WINAPI DebugActiveProcess(DWORD dwProcessId)
/*
* @unimplemented
*/
BOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId)
BOOL
WINAPI
DebugActiveProcessStop (
DWORD dwProcessId
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@ -74,7 +106,11 @@ BOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId)
/*
* @unimplemented
*/
BOOL WINAPI DebugSetProcessKillOnExit(BOOL KillOnExit)
BOOL
WINAPI
DebugSetProcessKillOnExit (
BOOL KillOnExit
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
@ -84,7 +120,9 @@ BOOL WINAPI DebugSetProcessKillOnExit(BOOL KillOnExit)
/*
* @implemented
*/
BOOL WINAPI IsDebuggerPresent(VOID)
BOOL
WINAPI
IsDebuggerPresent (VOID)
{
return (BOOL)NtCurrentPeb()->BeingDebugged;
}
@ -93,7 +131,12 @@ BOOL WINAPI IsDebuggerPresent(VOID)
/*
* @unimplemented
*/
BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent, DWORD dwMilliseconds)
BOOL
WINAPI
WaitForDebugEvent (
LPDEBUG_EVENT lpDebugEvent,
DWORD dwMilliseconds
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;