launching a user-mode program

In all the discussions I’ve been reading about communicating between kernel
drivers and user-mode programs, the assumption has always been that the
user-mode program is already running. I’ve got a situation where my driver
monitors for a specific condition and when that condition occurs, needs to
start a user-mode program to perform some actions. These actions do not
require user input but they are too complex to be moved down into the
driver. There is no communication between the driver and the user program
once the program is running. It is NOT acceptable in my situation for the
user-mode program to be running all the time and simply waiting for an
event signal from the driver. I used the _shell_ShellExecute function in my
Windows 95 version of this system, but I cannot find any equivalent in
Windows NT. So … how do I launch my user program once my driver detects
its condition?

Any and all suggestions on how to solve this problem are greatly
appreciated.

Judy Labovitz

xxxxx@itt.com

The normal approach for something like this is a small service that
you run all the time that invokes the application as needed.

Don Burn

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, March 15, 2000 12:21 PM
Subject: [ntdev] launching a user-mode program

> In all the discussions I’ve been reading about communicating between
kernel
> drivers and user-mode programs, the assumption has always been that the
> user-mode program is already running. I’ve got a situation where my driver
> monitors for a specific condition and when that condition occurs, needs to
> start a user-mode program to perform some actions. These actions do not
> require user input but they are too complex to be moved down into the
> driver. There is no communication between the driver and the user program
> once the program is running. It is NOT acceptable in my situation for the
> user-mode program to be running all the time and simply waiting for an
> event signal from the driver. I used the _shell_ShellExecute function in
my
> Windows 95 version of this system, but I cannot find any equivalent in
> Windows NT. So … how do I launch my user program once my driver detects
> its condition?
>
> Any and all suggestions on how to solve this problem are greatly
> appreciated.
>
> Judy Labovitz
>
> xxxxx@itt.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

How about a tiny user-mode program that starts the “real”
one?

The canonical answer would seem to be an APC into some other
pre-existing program to force that to fire up your “real”
one.

-----Original Message-----
From: xxxxx@itt.com [mailto:xxxxx@itt.com]
Sent: Wednesday, March 15, 2000 7:21 AM
To: NT Developers Interest List
Subject: [ntdev] launching a user-mode program

In all the discussions I’ve been reading about communicating between kernel
drivers and user-mode programs, the assumption has always been that the
user-mode program is already running. I’ve got a situation where my driver
monitors for a specific condition and when that condition occurs, needs to
start a user-mode program to perform some actions. These actions do not
require user input but they are too complex to be moved down into the
driver. There is no communication between the driver and the user program
once the program is running. It is NOT acceptable in my situation for the
user-mode program to be running all the time and simply waiting for an
event signal from the driver. I used the _shell_ShellExecute function in my
Windows 95 version of this system, but I cannot find any equivalent in
Windows NT. So … how do I launch my user program once my driver detects
its condition?

Any and all suggestions on how to solve this problem are greatly
appreciated.

Judy Labovitz

xxxxx@itt.com


You are currently subscribed to ntdev as: xxxxx@FirstUSA.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Judy,

Walter Oney’s WDM programming book, “Programming the Microsoft Windows
Driver Model” (Microsoft Press), has an example of this in Chapter 12. Look
for the stuff about “AutoLaunch”. It illustrates how to accomplish this
task from a WDM driver on Windows 2000 and Windows 98 (although I suppose
there’s no reason why a WDM driver running on 98 can’t just call the
SHELL_ShellExecute() service).

If you don’t have or don’t want to buy Walter’s book, you might also search
around on the Internet for a copy of his white paper, “Launching a
Device-Specific Application”, which was the basis for the book’s AutoLaunch
stuff. Walter no longer makes the old paper available on his Website since
he of course would like you to buy his book now instead.

Regards,

Matt Arnold
Professional Music Products
Mark of the Unicorn, Inc.
http://www.motu.com

From:
Sent: Wednesday, March 15, 2000 12:21 PM

[snip]

> I used the _shell_ShellExecute function in my
> Windows 95 version of this system, but I cannot find any equivalent in
> Windows NT. So … how do I launch my user program once my driver detects
> its condition?
>
> Any and all suggestions on how to solve this problem are greatly
> appreciated.

[snip]

> Windows NT. So … how do I launch my user program once my driver detects

its condition?

Use an auxiliary service to do this - the simplest way.

Max