January 1, 2005

WinTask - CheckRemoteDebuggerPresent

'
' CheckRemoteDebuggerPresent
'
' Windows XP and above
'
' Author: Joe Strazzere
'

Dim hWnd as unsigned
Dim PID as unsigned
hWnd=External("user32","GetForegroundWindow")
PID=External("user32.dll","GetWindowThreadProcessId",hWnd, 0)
'MsgBox(PID)
ret=External("kernel32.dll","CheckRemoteDebuggerPresent",0)
msgbox(ret)