Question about Irp

Hi all,

Can someone please tell me the size in bytes of an IO_REQUEST_PACKET. I
know an Irp has two parts: fixed part and I/O stack locations.
I want to know the offset from the beginning of the Irp to the IoStatus
member so that I can set a breakpoint on access whenever the
IoStatus.Status is updated as the Irp travels down the stack.

Thanks

Peter Trinh

Would (&Irp.IoStatus.Status - &Irp) work for you? Or for that matter,
just &Irp.IoStatus.Status? Or am I missing something?

Peter Trinh wrote:

Hi all,

Can someone please tell me the size in bytes of an IO_REQUEST_PACKET. I
know an Irp has two parts: fixed part and I/O stack locations.
I want to know the offset from the beginning of the Irp to the IoStatus
member so that I can set a breakpoint on access whenever the
IoStatus.Status is updated as the Irp travels down the stack.

Thanks

Peter Trinh


…/ray..

ULONG offset = FIELD_OFFSET(struct _IRP, IoStatus.Status);

In the debugger,

dt nt!_IRP will also give you the offset.

D

This posting is provided “AS IS” with no warranties, and confers no
rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ray Trent
Sent: Tuesday, September 23, 2003 4:46 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Question about Irp

Would (&Irp.IoStatus.Status - &Irp) work for you? Or for that matter,
just &Irp.IoStatus.Status? Or am I missing something?

Peter Trinh wrote:

Hi all,

Can someone please tell me the size in bytes of an IO_REQUEST_PACKET.
I
know an Irp has two parts: fixed part and I/O stack locations.
I want to know the offset from the beginning of the Irp to the
IoStatus
member so that I can set a breakpoint on access whenever the
IoStatus.Status is updated as the Irp travels down the stack.

Thanks

Peter Trinh


…/ray..


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

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

Thanks all. I really appreciate your help.

Peter