Driver: Minor fixes

This commit is contained in:
Nodir Temirkhodjaev 2022-01-29 16:58:33 +03:00
parent fdc8141b5f
commit eb3b478eb4
2 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@
#if defined(FORT_DRIVER)
# define LOG(...) DbgPrintEx(DPFLTR_SYSTEM_ID, DPFLTR_ERROR_LEVEL, "FORT: " __VA_ARGS__)
#else
# define LOG(...) (__VA_ARGS__)
# define LOG(...)
#endif
#ifndef NT_SUCCESS

View File

@ -149,7 +149,6 @@ static void NTAPI fort_pstree_notify(
UNUSED(process);
const DWORD pid = (DWORD) (ptrdiff_t) processId;
const DWORD ppid = (DWORD) (ptrdiff_t) createInfo->ParentProcessId;
if (createInfo == NULL) {
#ifdef FORT_DEBUG
@ -161,6 +160,8 @@ static void NTAPI fort_pstree_notify(
if (createInfo->ImageFileName == NULL || createInfo->CommandLine == NULL)
return;
const DWORD ppid = (DWORD) (ptrdiff_t) createInfo->ParentProcessId;
#ifdef FORT_DEBUG
LOG("PsTree: pid=%d ppid=%d IMG=[%wZ] CMD=[%wZ]\n", pid, ppid,
createInfo->ImageFileName, createInfo->CommandLine);