CheckRemoteDebuggerPresent (kernel32)
Last changed: -186.136.223.176

.
Summary
TODO - a short description

C# Signature:

[DllImport("Kernel32.dll", SetLastError = true, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool CheckRemoteDebuggerPresent(SafeProcessHandle hProcess, [MarshalAs(UnmanagedType.Bool)]ref bool isDebuggerPresent);

VB Signature:

Declare Function CheckRemoteDebuggerPresent Lib "kernel32.dll" (ByVal hProcess As Long, ByVal fResult As Boolean) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Checks for RemoteDebugger on the 'hProcess'.

Tips & Tricks:

Please add some!

Sample Code:

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

Documentation