Free field in IrpStack

I need to store data specific to an Irp. Is there a field in the IrpStack
that I can write to that only my driver will access?

Daniel

If your not using StartIO and managing your own queues, you can use
Irp.Tail.Overlay.Drivercontext.

-----Original Message-----
From: Nemiroff, Daniel [mailto:xxxxx@intel.com]
Sent: Friday, June 02, 2000 1:12 PM
To: NT Developers Interest List
Subject: [ntdev] Free field in IrpStack

I need to store data specific to an Irp. Is there a field
in the IrpStack
that I can write to that only my driver will access?

Daniel


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)

Unfortunately, I am managing my own queues.

Any other place?

Daniel

-----Original Message-----
From: Gary Little [mailto:xxxxx@delphieng.com]
Sent: Friday, June 02, 2000 1:15 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Free field in IrpStack

If your not using StartIO and managing your own queues, you can use
Irp.Tail.Overlay.Drivercontext.

-----Original Message-----
From: Nemiroff, Daniel [mailto:xxxxx@intel.com]
Sent: Friday, June 02, 2000 1:12 PM
To: NT Developers Interest List
Subject: [ntdev] Free field in IrpStack

I need to store data specific to an Irp. Is there a field
in the IrpStack
that I can write to that only my driver will access?

Daniel


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

If your not using StartIO, then those 4 DWORDs should be available to you
-----Original Message-----
From: Nemiroff, Daniel [mailto:xxxxx@intel.com]
Sent: Friday, June 02, 2000 1:23 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Free field in IrpStack

Unfortunately, I am managing my own queues.

Any other place?

Daniel

-----Original Message-----
From: Gary Little [mailto:xxxxx@delphieng.com]
Sent: Friday, June 02, 2000 1:15 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Free field in IrpStack

If your not using StartIO and managing your own queues, you
can use
Irp.Tail.Overlay.Drivercontext.

-----Original Message-----
From: Nemiroff, Daniel
[mailto:xxxxx@intel.com]
Sent: Friday, June 02, 2000 1:12 PM
To: NT Developers Interest List
Subject: [ntdev] Free field in
IrpStack

I need to store data specific to an Irp. Is
there a field
in the IrpStack
that I can write to that only my driver will
access?

Daniel


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)


You are currently subscribed to ntdev as:
xxxxx@intel.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)


You are currently subscribed to ntdev as:
xxxxx@delphieng.com
To unsubscribe send a blank email to
$subst(‘Email.Unsub’)

From: “Nemiroff, Daniel”
Sent: Friday, June 02, 2000 4:11 PM

> I need to store data specific to an Irp. Is there a field in the IrpStack
> that I can write to that only my driver will access?

While your driver owns a non-queued IRP, it can store whatever it wants in
the IRP’s ‘Tail.Overlay.DriverContext’ member. Indeed, that’s what it’s
for.

By “non-queued”, I mean while the IRP’s ‘Tail.Overlay.DeviceQueueEntry’
member isn’t in use (the IRP isn’t contained in any queue), which of course
overlays ‘DriverContext’.

Note that the system implicitly makes use of ‘DeviceQueueEntry’ whenever
your driver uses the standard StartIO() method of IRP handling.

If on other hand you’re performing your own queuing, only you can know
when ‘DriverContext’ is available (that is, when/if your driver isn’t making
custom use of ‘DeviceQueueEntry’, etc.). If your driver doesn’t use
‘DeviceQueueEntry’ (or just doesn’t do any queuing at all), then you can use
‘DriverContext’ any time your driver is in possession of the IRP.

One caveat to watch for: If you pass the IRP on to another driver and then
later capture it a completion routine, don’t assume that the contents of
‘DriverContext’ will remain intact (the other driver(s) may have queued the
IRP using the standard method, made custom use of ‘DeviceQueueEntry’, or
even used ‘DriverContext’ themselves while handling the IRP).

- Matt