Search code examples
kernelwindows-kernelkernel-modekmdfusermode

How to start a user mode program from kernel mode in windows


I have a driver (kernel mode)(KMDF) and i have a user preferences form. i need to start the activity from the driver code and get the preferences. so how do i start that user mode program from kernel in windows operating system ?


Solution

  • The best way to get a driver to do something in user mode is to have it communicate with a user mode component that can do the work. So you do something like have a user mode service, that opens a channel to the driver, then when the driver needs to do something (e.g., launch a process), it can send a message to the service.

    Search osronline for the inverted call model for more information, or look at the FltSendMessage API documentation if you're building a mini-filter.

    As other posters have noted, doing this in DriverEntry is probably not going to work since there is likely not even a user session to communicate to.