mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 04:13:18 +00:00

kernel32.dll - Unlock files shared with Wine - Unlock stubs - Add programmers name into file header svn path=/trunk/; revision=22026
147 lines
2.4 KiB
C
147 lines
2.4 KiB
C
/* $Id$
|
|
*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS system libraries
|
|
* FILE: lib/kernel32/debug/debugger.c
|
|
* PURPOSE: Win32 Debugger API
|
|
* PROGRAMMER: Thomas Weidenmueller
|
|
* KJK::Hyperion
|
|
*/
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
#include <k32.h>
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
BOOL WINAPI
|
|
CheckRemoteDebuggerPresent (
|
|
HANDLE hProcess,
|
|
PBOOL pbDebuggerPresent
|
|
)
|
|
{
|
|
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;
|
|
}
|
|
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
BOOL WINAPI
|
|
ContinueDebugEvent (
|
|
DWORD dwProcessId,
|
|
DWORD dwThreadId,
|
|
DWORD dwContinueStatus
|
|
)
|
|
{
|
|
CLIENT_ID ClientId;
|
|
NTSTATUS Status;
|
|
|
|
ClientId.UniqueProcess = (HANDLE)dwProcessId;
|
|
ClientId.UniqueThread = (HANDLE)dwThreadId;
|
|
|
|
Status = DbgUiContinue(&ClientId, dwContinueStatus);
|
|
if (!NT_SUCCESS(Status))
|
|
{
|
|
SetLastErrorByStatus(Status);
|
|
return FALSE;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/*
|
|
* NOTE: I'm not sure if the function is complete.
|
|
*
|
|
* @unimplemented
|
|
*/
|
|
BOOL
|
|
WINAPI
|
|
DebugActiveProcess(
|
|
DWORD dwProcessId
|
|
)
|
|
{
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
/*
|
|
* @unimplemented
|
|
*/
|
|
BOOL
|
|
WINAPI
|
|
DebugActiveProcessStop (
|
|
DWORD dwProcessId
|
|
)
|
|
{
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
/*
|
|
* @unimplemented
|
|
*/
|
|
BOOL
|
|
WINAPI
|
|
DebugSetProcessKillOnExit (
|
|
BOOL KillOnExit
|
|
)
|
|
{
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
BOOL
|
|
WINAPI
|
|
IsDebuggerPresent (VOID)
|
|
{
|
|
return (BOOL)NtCurrentPeb()->BeingDebugged;
|
|
}
|
|
|
|
|
|
/*
|
|
* @unimplemented
|
|
*/
|
|
BOOL
|
|
WINAPI
|
|
WaitForDebugEvent (
|
|
LPDEBUG_EVENT lpDebugEvent,
|
|
DWORD dwMilliseconds
|
|
)
|
|
{
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
return FALSE;
|
|
}
|
|
|
|
/* EOF */
|