Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
Declare Function CheckRemoteDebuggerPresent Lib "kernel32.dll"
(ByVal hProcess As Long, ByVal fResult As Boolean) As Boolean
Boo Signature:
[DllImport("kernel32.dll", SetLastError : true)]
def CheckRemoteDebuggerPresent(hProcess as IntPtr, ref DebuggerPresent as bool) as bool:
pass
Return Value:
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.
Notes:
Checks for RemoteDebugger on the 'hProcess'. The "remote" in CheckRemoteDebuggerPresent does not imply that the debugger necessarily resides on a different computer; instead, it indicates that the debugger resides in a separate and parallel process. Use the IsDebuggerPresent function to detect whether the calling process is running under the debugger.
You may need to have the SE_DEBUG_NAME privilege on the specified process or you will receive ERROR_ACCESS_DENIED (0x5)
'For VB.NET
Public Class Form1
Declare Function CheckRemoteDebuggerPresent Lib "kernel32.dll" _
(ByVal hProcess As Long, ByVal fResult As Boolean) As Boolean
Dim bool As Boolean
Dim proc As Process = Process.GetCurrentProcess()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Debug.Print(CStr(CheckRemoteDebuggerPresent(proc.Handle, bool)))
End Sub
End Class
TODO - a short description
9/11/2009 10:45:00 PM - anonymous
This function determines whether the specified process is being debugged.
11/16/2020 1:58:58 PM - -186.136.223.176
The IsDebuggerPresent API
11/16/2020 2:00:43 PM - -186.136.223.176
The IsDebuggerPresent API
11/16/2020 2:00:43 PM - -186.136.223.176
Stops the debugger from debugging the specified process.
3/29/2020 4:58:18 AM - -78.3.84.133
The ContinueDebugEvent API
11/30/2018 12:53:27 AM - linz-183.239.240.48
Causes a breakpoint exception to occur in the specified process. This allows the calling thread to signal the debugger to handle the exception.
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).