This a test KMDF project. it's function is read and write registry.
Case1:
1.read a registry value and write a value to registry
2.Check registry in windows, value updated.
Case2:
1.read a registry value and write a value to registry, add exception at end. BSOD happens when boot windows
2.remove exception, boot windows, check registry, value is not updated.
These are the exception code i use.
void GoException()
{
PDRIVER_OBJECT obj = NULL;
obj->DeviceObject->CurrentIrp = NULL;
}
I have try two registry path.
HKEY_LOCAL_MACHINE\SOFTWARE\DELL\test (normal path)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TEST (service path)