Accessing data in IRP_MJ_READ and IRP_MJ_WRITE

Hi,

This is my first driver project (novice alert).

I am writing an upper filter driver for a serial port which will be
installed dynamically as part of the associated application, which is a
serial port monitor. I have succesfully attached the driver to the device
stack and I can see the various IRPs going down the stack.

When I receive either an IRP_MJ_READ or IRP_MJ_WRITE I want to be able to
examine the data buffers to see what was written to or read from the serial
port, but I don’t seem to be able to see how to do this. The Irp->Flags say
DO_DIRECT_IO but the Irp->MdlAddress is NULL.

Any suggestions would be gratefully received.

Thanks

Alasdair

NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.