Permalink
Browse files

add IOCTL_CE_ENABLE_DRM

  • Loading branch information...
1 parent fe19861 commit a98b7bc0ef2b495bc67aa32eb1be48b7b7ba6370 @cheat-engine committed Jan 11, 2017
View
@@ -387,9 +387,8 @@ Return Value:
//Processlist init
#ifndef CETC
-
ProcessEventCount=0;
- KeInitializeSpinLock(&ProcesslistSL);
+ ExInitializeResourceLite(&ProcesslistR);
#endif
CreateProcessNotifyRoutineEnabled=FALSE;
@@ -673,7 +672,15 @@ void UnloadDriver(PDRIVER_OBJECT DriverObject)
if (CreateProcessNotifyRoutineEnabled)
{
+ DbgPrint("Removing process watch");
+#if (NTDDI_VERSION >= NTDDI_VISTASP1)
+ PsSetCreateProcessNotifyRoutineEx(CreateProcessNotifyRoutineEx,TRUE);
+#else
PsSetCreateProcessNotifyRoutine(CreateProcessNotifyRoutine,TRUE);
+#endif
+
+
+ DbgPrint("Removing thread watch");
PsRemoveCreateThreadNotifyRoutine2(CreateThreadNotifyRoutine);
}
@@ -700,4 +707,16 @@ void UnloadDriver(PDRIVER_OBJECT DriverObject)
ExFreePool(BufDeviceString);
#endif
+ CleanProcessList();
+
+ ExDeleteResourceLite(&ProcesslistR);
+
+ RtlZeroMemory(&ProcesslistR, sizeof(ProcesslistR));
+
+ if (DRMHandle)
+ {
+ DbgPrint("Unregistering DRM handle");
+ ObUnRegisterCallbacks(DRMHandle);
+ DRMHandle = NULL;
+ }
}
View
@@ -3,7 +3,7 @@
-#define dbkversion 2000021
+#define dbkversion 2000022
View
@@ -2,6 +2,9 @@
#define DBKFUNC_H
#include "ntifs.h"
+//#include <ntifs.h>
+#include <ntstrsafe.h>
+
#include <windef.h>
#include "interruptHook.h"
Oops, something went wrong.

0 comments on commit a98b7bc

Please sign in to comment.