Created
October 15, 2020 16:31
-
-
Save iljavs/3cc3205fe9a127431dfe2f4096e8ae0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ntddk.h> | |
#define SIMPLE_TAG 'pmis' | |
void* p; | |
void SimpleUnload(PDRIVER_OBJECT DriverObject) { | |
UNREFERENCED_PARAMETER(DriverObject); | |
DbgPrint("SimpleUnload called \n"); | |
if (p) { | |
ExFreePool(p); | |
} | |
} | |
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { | |
UNREFERENCED_PARAMETER(DriverObject); | |
DbgPrint("Simple DriverEntry called: %wZ\n", RegistryPath); | |
p = NULL; | |
DriverObject->DriverUnload = SimpleUnload; | |
p = ExAllocatePoolWithTag(PagedPool, 100, SIMPLE_TAG); | |
DbgPrint("Allocated pointer: 0x%p\n", p); | |
return STATUS_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment