asynchronous I/O operations

Hai All,

I am implementing IRP_MJ_READ dispatch routine which marks the IRP as
pending and returns STATUS_PENDING and then process the IRP later. My
driver does not have any StartIO routine. How do I process and complete
the pending IRP.

So if I want to support asynchronous I/O operations in my driver is it
enough to return STATUS_PENDING after calling IoMarkIrpPending() for the
actual request and then complete the actual IRP(request) by
IoCompleteRequest(Irp,IO_NO_INCREMENT) in other thread. Does I need to do
anything else.

Any information would be helpful.

Thanx in advance.
Kedar…

Yeah that’s right.If you want to pass IRP down the stack,register a
completion routine for your IRP and then compete the IRP in your completion
routine

Regs,
Sai


From: kedar[SMTP:xxxxx@hotmail.com]
Reply To: NT Developers Interest List
Sent: Tuesday, May 28, 2002 4:39 PM
To: NT Developers Interest List
Subject: [ntdev] asynchronous I/O operations

Hai All,

I am implementing IRP_MJ_READ dispatch routine which marks the IRP as
pending and returns STATUS_PENDING and then process the IRP later. My
driver does not have any StartIO routine. How do I process and complete
the pending IRP.

So if I want to support asynchronous I/O operations in my driver is it
enough to return STATUS_PENDING after calling IoMarkIrpPending() for the
actual request and then complete the actual IRP(request) by
IoCompleteRequest(Irp,IO_NO_INCREMENT) in other thread. Does I need to do
anything else.

Any information would be helpful.

Thanx in advance.
Kedar…


You are currently subscribed to ntdev as: xxxxx@bla.satyam.com
To unsubscribe send a blank email to %%email.unsub%%

**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

Before you call IoCompleteRequest, you probably want to set

Irp.Status = return code (such as STATUS_SUCCESS)
Irp.IoStatus.Information = number of bytes returned in output buffer

  • Dennis

Dennis Merrill
Embedded Systems Engineer
Thermo Electron Corporation
Spectroscopy Division

-----Original Message-----
From: kedar [mailto:xxxxx@hotmail.com]
Sent: Tuesday, May 28, 2002 6:09 AM
To: NT Developers Interest List
Subject: [ntdev] asynchronous I/O operations

Hai All,

I am implementing IRP_MJ_READ dispatch routine which marks the IRP as
pending and returns STATUS_PENDING and then process the IRP later. My
driver does not have any StartIO routine. How do I process and complete
the pending IRP.

So if I want to support asynchronous I/O operations in my driver is it
enough to return STATUS_PENDING after calling IoMarkIrpPending() for the
actual request and then complete the actual IRP(request) by
IoCompleteRequest(Irp,IO_NO_INCREMENT) in other thread. Does I need to do
anything else.

Any information would be helpful.

Thanx in advance.
Kedar…


You are currently subscribed to ntdev as: xxxxx@thermonicolet.com
To unsubscribe send a blank email to %%email.unsub%%