Windows C++ / CheckRemoteDebuggerPresent
Author | Glacius |
Platform | Windows |
Language | C++ |
Technique | CheckRemoteDebuggerPresent |
Code
#include "windows.h"
int main(void)
{
BOOL HasDebugPort = FALSE;
if (CheckRemoteDebuggerPresent(GetCurrentProcess(), &HasDebugPort))
{
ExitProcess(0); // Running in ring-3 debugger
}
// Running outside ring-3 debugger
return 0;
Created
September 26, 2020
Last Revised
April 22, 2024