SERVICE_DEMAND_START and hardware driver

Hi,

I thought that I was pretty much done with my driver by now, but since I
created a .inf file and installed I keep getting failures during system
start (I’m creating an event using
IoCreateNotificationEvent(L"\BaseNamedObjects\Xxx", …), but it always
returns NULL when driver is initialized at this point).

The driver in question is a NT4 style driver that (now) is running under w2k
sp1. I’d really like the driver to be loaded only on explicit request (using
SCM interface or ‘net start mydriver’), but it seems like it is always being
loaded during the startup process - why?

I definitely knows that the Start value under
HKLM\System\CurrentControlSet\Services'mydriver’ is set to
SERVICE_DEMAND_START, so why is this happening? Is there any way of
preventing this?

Regards // Johan

  1. If you install your NT4.0 style driver using an INF file, it gets
    root-enumerated and loaded by the PnP manager automatically during system
    drivers load phase.

  2. Boot or system start drivers cannot use IoCreateNotificationEvent on
    Win2K as the BaseNamedObjects directory is not available at that point. This
    directory object is created when the win32 subsystem loads. You have to
    modify your driver to use some other notification technique. Some folks
    tried to create the directory object themselves before creating the event
    and they told me that it didn’t work. System locks up later on. I haven’t
    tried myself so I cannot say that would work for you. In general, I dislike
    the idea of creating a named event in kernel-mode for notification purposes.
    Check this article for more info
    http://support.microsoft.com/support/kb/articles/q228/7/85.asp.

-Eliyas

-----Original Message-----
From: xxxxx@esrange.ssc.se [mailto:xxxxx@esrange.ssc.se]
Sent: Wednesday, December 06, 2000 2:12 AM
To: NT Developers Interest List
Subject: [ntdev] SERVICE_DEMAND_START and hardware driver

Hi,

I thought that I was pretty much done with my driver by now, but since I
created a .inf file and installed I keep getting failures during system
start (I’m creating an event using
IoCreateNotificationEvent(L"\BaseNamedObjects\Xxx", …), but it always
returns NULL when driver is initialized at this point).

The driver in question is a NT4 style driver that (now) is running under w2k
sp1. I’d really like the driver to be loaded only on explicit request (using
SCM interface or ‘net start mydriver’), but it seems like it is always being
loaded during the startup process - why?

I definitely knows that the Start value under
HKLM\System\CurrentControlSet\Services'mydriver’ is set to
SERVICE_DEMAND_START, so why is this happening? Is there any way of
preventing this?

Regards // Johan


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