My driver creates a named event called L"\BaseNamedObjects\TestEvent"
using IoCreateNotificationEvent in its start routine.
If I install my driver, it is started and IoCreateNotificationEvent is
successfull. But when I restart windows 2000, my driver is started and
IoCreateNotificationEvent fails (it returns a null PKEVENT).
There is no mention of this in the DDK. There is no mention that you need
to prefix the name with L"\BaseNamedObjects\", if you want the event to
be usable at user-mode either!
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
It depends on where you are creating the named event.
BaseNamedObjects must exist, or you get the NULL pKevent as well as an
invalid handle returned. Now you mention 2000, so I’m assuming that this is
a WDM driver, which means that it is at the mercy of the PnP manager when it
is loading. That means that your driver is loaded when PnP is ready, and not
when you are, and BaseNamedObjects does not exist if you are attempting to
do this when your driver gets IRP_MN_START_DEVICE. When you install your
driver, it exists, but when you reboot and PnP sends it the start device
query it doesn’t exist.
(Do an !object \BaseNamedObjects in WinDbg before you call
IoCreateNotificationEvent to confirm that.)
My solution was to create the event in the dispatch create function.
Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com
-----Original Message-----
From: xxxxx@matrox.com [mailto:xxxxx@matrox.com]
Sent: Wednesday, October 17, 2001 6:00 PM
To: NT Developers Interest List
Subject: [ntdev] problems with IoCreateNotificationEvent
My driver creates a named event called L"\BaseNamedObjects\TestEvent"
using IoCreateNotificationEvent in its start routine.
If I install my driver, it is started and IoCreateNotificationEvent is
successfull. But when I restart windows 2000, my driver is started and
IoCreateNotificationEvent fails (it returns a null PKEVENT).
There is no mention of this in the DDK. There is no mention that you need
to prefix the name with L"\BaseNamedObjects\", if you want the event to
be usable at user-mode either!
You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Basenamedobjects I not available yet. It is created by win32 subsystem
You must delay the creation of this event object.
Jamey
xxxxx@storagecraft.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@matrox.com
Sent: Thursday, October 18, 2001 4:00 PM
To: NT Developers Interest List
Subject: [ntdev] problems with IoCreateNotificationEvent
My driver creates a named event called L"\BaseNamedObjects\TestEvent"
using IoCreateNotificationEvent in its start routine.
If I install my driver, it is started and IoCreateNotificationEvent is
successfull. But when I restart windows 2000, my driver is started and
IoCreateNotificationEvent fails (it returns a null PKEVENT). There is no
mention of this in the DDK. There is no mention that you need
to prefix the name with L"\BaseNamedObjects\", if you want the event
to
be usable at user-mode either!
You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com