PVOID* SystemArgument1,
PVOID* SystemArguemnt2)
{
- DPRINT1("PsExitSpecialApc called: 0x%x (proc: 0x%x, '%.16s')\n",
- PsGetCurrentThread(), PsGetCurrentProcess(), PsGetCurrentProcess()->ImageFileName);
+ DPRINT("PsExitSpecialApc called: 0x%x (proc: 0x%x, '%.16s')\n",
+ PsGetCurrentThread(), PsGetCurrentProcess(), PsGetCurrentProcess()->ImageFileName);
/* Don't do anything unless we are in User-Mode */
if (Apc->SystemArgument2)
PETHREAD Thread = PsGetCurrentThread();
NTSTATUS ExitStatus;
- DPRINT1("PspExitNormalApc called: 0x%x (proc: 0x%x, '%.16s')\n",
- PsGetCurrentThread(), PsGetCurrentProcess(), PsGetCurrentProcess()->ImageFileName);
+ DPRINT("PspExitNormalApc called: 0x%x (proc: 0x%x, '%.16s')\n",
+ PsGetCurrentThread(), PsGetCurrentProcess(), PsGetCurrentProcess()->ImageFileName);
/* This should never happen */
ASSERT(!SystemArgument2);
}
/* If we're here, this is not a System Thread, so kill it from User-Mode */
- DPRINT1("Initializing User-Mode APC\n");
+ DPRINT("Initializing User-Mode APC\n");
KeInitializeApc(Apc,
&Thread->Tcb,
OriginalApcEnvironment,
ObKillProcess(Process);
KeSetProcess(&Process->Pcb, IO_NO_INCREMENT);
+
+ /* release the keep-alive reference of the process object */
+ ObDereferenceObject(Process);
return(STATUS_SUCCESS);
}