Hi,
I have a WDM driver that supports two devices on WINDOWS 2000. One
is a serial port (a PC Card modem) and another is an alternate device, that
is an alternate interface to the serial port.
The driver creates 2 device objects during AddDevice - one for the primary
port which is enumerated by the Operating System and the other for my own
interface. The primary port device object is used by standard COM port
applications like Hyperterm etc and the second device object is used by my
own application. I obtain a reference to the primary device object using
ObReferenceObject call with the intention of preventing the driver from
getting unloaded during SURPRISE_REMOVAL. Is this assumption correct? The
ObReferenceObject call mentions that the device object is not deleted until
the reference count reaches zero. But I get a REMOVE_DEVICE IRP and the
driver gets unloaded when the device is removed from the system.
Another doubt is that when a device object gets deleted will the IO Manager
check for outstanding references on the same before deleting the device
objects? From my REMOVE_DEVICE IRP handler I delete the secondary device
object but still get IRPs from the application associated with this device
object. Won’t the I/O Manager fail such requests from the application since
the device object has already been deleted?
Thanks & Regards,
S.Balaji
***********************************************************************
Disclaimer:
This document is intended for transmission to the named recipient only. If
you are not that person, you should note that legal rights reside in this
document and you are not authorized to access, read, disclose, copy, use or
otherwise deal with it and any such actions are prohibited and may be
unlawful. The views expressed in this document are not necessarily those of
HCL Technologies Ltd. Notice is hereby given that no representation,
contract or other binding obligation shall be created by this e-mail, which
must be interpreted accordingly. Any representations, contractual rights or
obligations shall be separately communicated in writing and signed in the
original by a duly authorized officer of the relevant company.
***********************************************************************
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