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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -14,11 +14,35 @@
/* FUNCTIONS *****************************************************************/ /* 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; return FALSE;
} }
@ -26,12 +50,12 @@ BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess, PBOOL pbDebuggerPresent)
/* /*
* @implemented * @implemented
*/ */
BOOL WINAPI ContinueDebugEvent BOOL WINAPI
( ContinueDebugEvent (
DWORD dwProcessId, DWORD dwProcessId,
DWORD dwThreadId, DWORD dwThreadId,
DWORD dwContinueStatus DWORD dwContinueStatus
) )
{ {
CLIENT_ID ClientId; CLIENT_ID ClientId;
NTSTATUS Status; NTSTATUS Status;
@ -54,7 +78,11 @@ BOOL WINAPI ContinueDebugEvent
/* /*
* @unimplemented * @unimplemented
*/ */
BOOL WINAPI DebugActiveProcess(DWORD dwProcessId) BOOL
WINAPI
DebugActiveProcess (
DWORD dwProcessId
)
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -64,7 +92,11 @@ BOOL WINAPI DebugActiveProcess(DWORD dwProcessId)
/* /*
* @unimplemented * @unimplemented
*/ */
BOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId) BOOL
WINAPI
DebugActiveProcessStop (
DWORD dwProcessId
)
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -74,7 +106,11 @@ BOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId)
/* /*
* @unimplemented * @unimplemented
*/ */
BOOL WINAPI DebugSetProcessKillOnExit(BOOL KillOnExit) BOOL
WINAPI
DebugSetProcessKillOnExit (
BOOL KillOnExit
)
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
@ -84,7 +120,9 @@ BOOL WINAPI DebugSetProcessKillOnExit(BOOL KillOnExit)
/* /*
* @implemented * @implemented
*/ */
BOOL WINAPI IsDebuggerPresent(VOID) BOOL
WINAPI
IsDebuggerPresent (VOID)
{ {
return (BOOL)NtCurrentPeb()->BeingDebugged; return (BOOL)NtCurrentPeb()->BeingDebugged;
} }
@ -93,7 +131,12 @@ BOOL WINAPI IsDebuggerPresent(VOID)
/* /*
* @unimplemented * @unimplemented
*/ */
BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent, DWORD dwMilliseconds) BOOL
WINAPI
WaitForDebugEvent (
LPDEBUG_EVENT lpDebugEvent,
DWORD dwMilliseconds
)
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;