HI,
Can I start another application from a driver code? The code is written in C and compiled with DDK.
From stackoverflow
-
I don't think so. Instead:
- You can have a service which sends down a DeviceIoControl to the device.
- The device then keeps (doesn't complete) the associated IOCTL
- When the device wants to launch the application, then it completes the IOCTL
- When the service notices that its DeviceIoControl has been completed, then it starts the other application
A service could launch an application but I don't know whether it can launch it on the user's desktop. If you want the launched application to interact with the logged-in end-user user then, instead of having a service as described above, it would be better to put the DeviceIoControl functionality in a (visible or invisible) application, which is started automatically in the user's workstation when the user logs in.
If you do this then beware assuming that there is only one logged-in user (there may be many, on a Citrix/terminal server).
casperOne : For the most part, I agree with this, except for the last point. It won't work on Vista if it has to interact with the user's desktop and it's a bad practice in general. Instead, have a program that runs when the user logs in that interacts with the service through IPC.ChrisW : Thanks, I'll edit my answerRBerteig : There also may be more than one user via fast user switching.
0 comments:
Post a Comment