Hello, I have a problem when using 'NdisMRegisterDevice()' in my NDIS driver.
I use this call to create a standalone device object so that my application
can communicate with my driver. Using this, I can communicate with my driver
fine from my app. However, the file handle that my application creates to
talk to my driver does NOT get notified when I register to receive device
notifications using 'RegisterDeviceNotification'. However, if I create a
handle using the REAL device name (obtained by using the SetupDixxx
functions), my app properly receives the notifications. I can't use this
handle tho', 'cuz NDIS owns it and my driver won't received Irps sent to it.

The basic problem I'm trying to solve is this: if the device is unplugged
WHILE the app is running, the app needs to close the handle to allow the
driver to unload.

Thx,
Rick

Re: problem using a standalone device object with NDIS by Maxim

Maxim
Tue Aug 17 17:04:37 CDT 2004

Try using WMI instead of NdisMRegisterDevice.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"Rick Farrington" <Rick Farrington@discussions.microsoft.com> wrote in message
news:66B0C0AD-E461-4A9E-B3FB-18B3CF7A07EF@microsoft.com...
> Hello, I have a problem when using 'NdisMRegisterDevice()' in my NDIS driver.
> I use this call to create a standalone device object so that my application
> can communicate with my driver. Using this, I can communicate with my driver
> fine from my app. However, the file handle that my application creates to
> talk to my driver does NOT get notified when I register to receive device
> notifications using 'RegisterDeviceNotification'. However, if I create a
> handle using the REAL device name (obtained by using the SetupDixxx
> functions), my app properly receives the notifications. I can't use this
> handle tho', 'cuz NDIS owns it and my driver won't received Irps sent to it.
>
> The basic problem I'm trying to solve is this: if the device is unplugged
> WHILE the app is running, the app needs to close the handle to allow the
> driver to unload.
>
> Thx,
> Rick