Opening the driver

Home Forums Discussions Support Portal Opening the driver

This topic contains 0 replies, has 1 voice, and was last updated by  bk 13 years, 7 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4847

    bk
    Participant

    Hi, what’s the correct sequence to open the NDISRD driver and close it when finished using? At the moment my sequence is:

    1) Get the file and device pointers using IoGetDeviceObjectPointer()
    2) I get a reference on the device object with ObReferenceObject() since I use it.
    3) I dereference the file object since i don’t need it with ObDereferenceObject()

    4) I use the deviceObject..

    5) When finished using, i dereference the deviceObject using ObDereferenceObject()

    The problem is that I can open the device only one time. The second time I try the same sequence, I can’t open the device.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.