Well my device manager has no option to ‘remove the driver’. It has an
uninstall button and a disable (device) button. I assume that you used the
uninstall button, right? These buttons actually work on device objects, not
drivers. If for example your driver has several FDOs then you have to
uninstall all of them in order to unload your driver.
I also have a hard time believing that your driver’s unload entry was
actually called. Did you put a breakpoint in this routine or use a debug
print to verify that you got to the unload? As far as I know you will NOT
get called at your unload routine as long as your driver has any open
references to any of its device objects, pnp or non-pnp inclusive. This is
an NT system, right? If we are talking about some windos9x-Me variant, all
bets are off.
The additional device object should not matter - the OS is checking that all
of the devices linked to your driver object have a zero reference count in
order to decide that unload should be called. In your case your open handle
from your application to your device will prevent unload from being invoked
when you uninstall the pnp device. However the uninstall (of the device, not
the driver!) should work just fine - perhaps that is your confusion?
-----Original Message-----
From: San Wind [mailto:xxxxx@hotpop.com]
Sent: Wednesday, October 24, 2001 12:23 AM
To: NT Developers Interest List
Subject: [ntdev] Device Object Deletion
Hi
Small change in my earlier query. In the driver I am creating an additional
device object. Without attaching to the device stack. Win32 Application is
opening this secondary device object. ________________________________ I
have a very peculiar situation.
I opened my driver using symbolic link in a Win 32
Application. I put a
break point in my Win32 program after opening the
driver. Then I when to
deivice manager and removed the driver. The unloading
of the driver went
smoothly. I went back to my Win32 program , and
continued to issue IOCTL
calls, and other calls like CloseHandle(). All these
calls I received in my
driver program.
How I am still able to recive the calls from Win32
application, after
unloading the driver…?
Could anybody please explain this behaviour…? I want
the answer, how this
is happening…!
Thanks,
San Wind
You are currently subscribed to ntdev as: xxxxx@stratus.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