questions about IoGetDeviceObjectPointer

I am writing a driver based on a lower usb slave device.I used
IoGetDeviceObjectPointer to get the respect FileObject and DeviceObject and
then do some iocontrol test and readwrite test. I have following questions:

  1. How can I use IoGetDeviceObjectPointer to do an synchronous
    IRP_MN_CREATE? I trace the code and find it seems the function always does a
    nonoverlapped create.

  2. In this case, after a successful IoGetDeviceObjectPointer call, I build
    my own irp and fill the irp FileObject with the above created FileObject,
    and pass it downto the lower usb device. All iocontrols tests are
    successful, while readwrite operations failed.Should I use zwReadFile to
    read from the lower usb device instead of building my own irp?

  3. If a lower usb device driver can use security options? I wonder the lower
    usb device refuse my read write operation because I didn’t have the right
    privillage or security create option, is it possible?

  4. If it is possible, how can I modify the create security option before the
    "IoGetDeviceObjectPointer " deliver an IRP_MN_CREATE to the lower usb
    device?

Who wrote the usb driver you are talking to? Or are you communicating
diretly with a USB enumerated PDO? Are you a part of the usb device’s
stack?

  1. IoGetDeviceObjectPointer is synchronous, there is no mechanism to
    notify you of an asynchronous action. Does the driver you are talking
    to expect a file object?
  2. are reads or writes supported by the driver you are talking to? Are
    you setting up the buffer properly with respect to the device object
    flags for the right type of buffer (PVOID or PMDL)? What status code
    are you getting back?
  3. it can, but I think your problem is something else (like a
    formatting error)
  4. you can’t

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of armtech@zj.com
Sent: Monday, November 07, 2005 8:49 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] questions about IoGetDeviceObjectPointer

I am writing a driver based on a lower usb slave device.I used
IoGetDeviceObjectPointer to get the respect FileObject and DeviceObject
and
then do some iocontrol test and readwrite test. I have following
questions:

  1. How can I use IoGetDeviceObjectPointer to do an synchronous
    IRP_MN_CREATE? I trace the code and find it seems the function always
    does a
    nonoverlapped create.

  2. In this case, after a successful IoGetDeviceObjectPointer call, I
    build
    my own irp and fill the irp FileObject with the above created
    FileObject,
    and pass it downto the lower usb device. All iocontrols tests are
    successful, while readwrite operations failed.Should I use zwReadFile to
    read from the lower usb device instead of building my own irp?

  3. If a lower usb device driver can use security options? I wonder the
    lower
    usb device refuse my read write operation because I didn’t have the
    right
    privillage or security create option, is it possible?

  4. If it is possible, how can I modify the create security option before
    the
    "IoGetDeviceObjectPointer " deliver an IRP_MN_CREATE to the lower usb
    device?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com