Create CheckRemoteDebuggerPresentAlt.c

This commit is contained in:
vxunderground 2021-06-29 23:38:59 -05:00 committed by GitHub
parent 18f2ee824e
commit dd0fd4a909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,14 @@
BOOL CheckRemoteDebuggerPresentAlt(HANDLE hProcess, PBOOL IsDebuggerPresent)
{
NTSTATUS Status = ERROR_SUCCESS;
HANDLE Port = NULL;
Status = NtQueryInformationProcess(hProcess, ProcessDebugPort, &Port, sizeof(Port), NULL);
if (NT_SUCCESS(Status))
{
*IsDebuggerPresent = Port != NULL;
return TRUE;
}
return FALSE;
}