JustKernel

Ray Of Hope

Extension of Desktop Win/Windows 7/Vista – Series 5

There have been lot of queries regarding how to load the lower driver driver, which registry entries are required and some sample code.

So here I will answer your queries and will also provide some sample code.

Note: Its been long time since I worked on this project, so please forgive my memory 🙂

I want my lowerfilter driver to be loaded first and register it self as virtual miniport driver before dxgkernel gets loaded. For this I used the the simpl,e http://www.codeproject.com/Articles/34067/Simple-WDM-LoopBack-Driver , loopback driver and catched registry events there. Now with registry events like RegNtPostOpenKeyEx. RegNtPreOpenKeyEx, I load my driver and dxgkernel.sys.

NTSTATUS RegistryCallback(IN PVOID CallbackContext,
IN PVOID Argument1,
IN PVOID Argument2)

{
case RegNtPreOpenKeyEx:

status = ZwLoadDriver(&HidriverPath);

status = ZwLoadDriver(&driverPath);

status = ZwLoadDriver(&UpperFilterPath);
if(NT_SUCCESS(status))
{
DbgPrint(“Driverload success\n”);
}
//
}
if (RtlCompareUnicodeString(openKey->CompleteName,&dxgPath,TRUE)==0)
{
DbgPrint(“Loading dxgkernel \n”);
status = ZwLoadDriver(&driverPath);
}

}

 

And another query was” What is the value of #define IOCTL_VIDEO_CREATE_CHILD” . \
Ans. What I have used is #define IOCTL_VIDEO_CREATE_CHILD \
CTL_CODE( FILE_DEVICE_VIDEO, 0x0F, METHOD_NEITHER, FILE_ANY_ACCESS

Please let me know if you require any further assistance.

Thanks

Anshul Makkar

mail: anshul_makkar@justkernel.com

 


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.