Reputation: 2646
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 ?
Upvotes: 0
Views: 2229
Reputation: 1306
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.
Upvotes: 3
Reputation: 58
Simply you can't unless you use weird undocumented tricks like APC, that could cause many many incompatibility problems; just place your application as automatic startup (CurrentVersion\Run for example) and send an IRP to the driver with the data you need to send.
Upvotes: 1