Fixing return values

This commit is contained in:
Jonathan Johnson
2023-07-06 13:39:21 -05:00
parent a3cd065a3e
commit e8b7ab783c
4 changed files with 2 additions and 5 deletions
Binary file not shown.
+2 -5
View File
@@ -20,7 +20,7 @@ struct TargetProcess {
int main(int argc, const char* argv[]) {
if (argc < 3) {
printf("Usage: SuspendThreadDriver.exe <PID> <TID>\n");
return 0;
return 1;
}
@@ -31,13 +31,11 @@ int main(int argc, const char* argv[]) {
hDevice = CreateFileW(L"\\\\.\\gmer64", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hDevice == INVALID_HANDLE_VALUE || hDevice == NULL) {
printf("[-] Failed to get a handle to the device object. Error: %d\n", GetLastError());
return 0;
return 1;
}
printf("[+] Successfully got a handle to the device object.\n");
DWORD bytes;
TargetProcess data;
data.ProcessId = atoi(argv[1]);
@@ -78,6 +76,5 @@ Exit:
CloseHandle(hDevice);
}
return 0;
}