hi I completed a few very simple tutorials on driver development and wanted to start playing around with the kernel, i try to write a registry filter driver by using CmRegisterCallback
so i wanted to get someone to tell what i do wrong and thats it, this is probably very stupid problem
Code: Select all
i get bluescreen in virtual box with this#include <ntddk.h>
VOID DriverUnload(IN PDRIVER_OBJECT DriverObject);
EX_CALLBACK_FUNCTION RegistryCallback;
LARGE_INTEGER Cookie;
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
NTSTATUS status;
PDEVICE_OBJECT pDeviceObject = NULL;
UNICODE_STRING DeviceName, DosDeviceName;
RtlInitUnicodeString(&DeviceName, L"\Device\RegistryMonitor");
RtlInitUnicodeString(&DosDeviceName, L"\DosDevice\RegistryMonitor");
status = IoCreateDevice(DriverObject, 0, &DeviceName, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &pDeviceObject);
DriverObject->DriverUnload = DriverUnload;
status = CmRegisterCallback(&RegistryCallback, NULL, &Cookie);
if (status != STATUS_SUCCESS)
{
DbgPrint("Falhou com erro: ", status);
return status;
}
return STATUS_SUCCESS;
}
so i wanted to get someone to tell what i do wrong and thats it, this is probably very stupid problem