Skip to content

Commit

Permalink
add IOCTL_CE_ENABLE_DRM
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Jan 11, 2017
1 parent fe19861 commit a98b7bc
Show file tree
Hide file tree
Showing 13 changed files with 649 additions and 310 deletions.
23 changes: 21 additions & 2 deletions DBKKernel/DBKDrvr.c
Expand Up @@ -387,9 +387,8 @@ Return Value:

//Processlist init
#ifndef CETC

ProcessEventCount=0;
KeInitializeSpinLock(&ProcesslistSL);
ExInitializeResourceLite(&ProcesslistR);
#endif

CreateProcessNotifyRoutineEnabled=FALSE;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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;
}
}
2 changes: 1 addition & 1 deletion DBKKernel/DBKDrvr.h
Expand Up @@ -3,7 +3,7 @@



#define dbkversion 2000021
#define dbkversion 2000022



Expand Down
3 changes: 3 additions & 0 deletions DBKKernel/DBKFunc.h
Expand Up @@ -2,6 +2,9 @@
#define DBKFUNC_H

#include "ntifs.h"
//#include <ntifs.h>
#include <ntstrsafe.h>

#include <windef.h>

#include "interruptHook.h"
Expand Down

0 comments on commit a98b7bc

Please sign in to comment.