Re: NdisOpenFile( ) gives blue screen by RonM
RonM
Tue Dec 07 12:47:56 CST 2004
Umer:
People are being patient with you. NdisOpenFile( ) is offered ONLY
to help initialize the driver by allowing loading of firmware, tables etc.
YOU are looking for a way to get data in and out of a running driver.
NdisOpenFile( ) is NOT provided for that.
Another bad idea is to have the driver spawn a worker thread and
that will run at passive level. It's a bad idea because if you can't kill this
new thread, NDIS will never call your HALT function. (Don't ask me
how I know this)
Better Ideas:
You can use WMI to get data in and out of the driver.
You can also write a protocol to handle those special packets.
You can also use the driver as intended and send data through it
by writing a socket application.
BOTTOM LINE.
NdisOpenFile( ) and other NDIS file I/O is for initialization ONLY.
Use the network driver like a network driver and run data through
it from a protocol or application. If you keep on about using
NdisOpenFile( ) after initialization Don or Walter might yell at you!
r
"Umer Khan" <umer.zafar@gmail.com> wrote in message
news:d11819d8.0412070322.4032124e@posting.google.com...
> Thanks a lot for quick responses.
> Firstly i am tracking some (specific) packets and bound to open
> file after exchange of those (specific) packets. In short, for me
> it is useless to open file in MiniportInitialize( ) so where else
> can i try NdisOpenFile( ) with IRQL=PASSIVE_LEVEL ? For me the
> ideal place was MPSend( ) where i was tracking packets but that
> place has IRQL=DISPATCH_LEVEL (as I have come to know).
>
> Secondly i am trying "KeGetCurrentIrql()" even ntddk.h (or wdm.h)
> is included. But my compiler is giving error "C4013, KeGetCurrentIrql undefined"
>
> Recommedation required
> With Thanks
> Umer