CheckRemoteDebuggerPresent function kernel32

Win32Result<bool> CheckRemoteDebuggerPresent(
  1. HANDLE hProcess,
  2. Pointer<Int32> pbDebuggerPresent
)

Determines whether the specified process is being debugged.

To learn more, see learn.microsoft.com/windows/win32/api/debugapi/nf-debugapi-checkremotedebuggerpresent.

Implementation

Win32Result<bool> CheckRemoteDebuggerPresent(
  HANDLE hProcess,
  Pointer<Int32> pbDebuggerPresent,
) {
  resolveGetLastError();
  final result_ = _CheckRemoteDebuggerPresent(hProcess, pbDebuggerPresent);
  return .new(value: result_ != FALSE, error: GetLastError());
}