This topic has not yet been rated - Rate this topic

CsqInsertIrp routine

The CsqInsertIrp routine is used by the system to insert an IRP into a driver-implemented, cancel-safe IRP queue.

Syntax


IO_CSQ_INSERT_IRP CsqInsertIrp;

VOID CsqInsertIrp(
  _In_  struct _IO_CSQ *Csq,
  _In_  PIRP Irp
)
{ ... }

Parameters

Csq [in]

Pointer to the IO_CSQ structure for the cancel-safe IRP queue.

Irp [in]

Pointer to the IRP to insert into the IRP queue.

Return value

None

Remarks

The driver specifies the CsqInsertIrp routine for a cancel-safe IRP queue when it initializes the queue's IO_CSQ structure. The driver specifies the routine as the CsqInsertIrp parameter of IoCsqInitialize when it initializes IO_CSQ. For more information, see Cancel-Safe IRP Queues.

The IoCsqInsertIrp and IoCsqInsertIrpEx routines call CsqInsertIrp to insert the IRP into the queue.

Examples

To define a CsqInsertIrp callback routine that is named MyCsqInsertIrp, you must first provide a function declaration that Static Driver Verifier (SDV) and other verification tools require, as shown in the following code example:


IO_CSQ_INSERT_IRP MyCsqInsertIrp;

Then, implement your callback routine as follows:


VOID
 MyCsqInsertIrp(
    _In_ struct _IO_CSQ  *Csq,
    _In_ PIRP  Irp
    )
  {
      // Function body
  }

The IO_CSQ_INSERT_IRP function type is defined in the Wdm.h header file. For more information about SDV requirements for function declarations, see Declaring Functions Using Function Role Types for WDM Drivers.

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also

IO_CSQ
IoCsqInitialize
IoCsqInitializeEx
IoCsqInsertIrp
IoCsqInsertIrpEx
IoCsqRemoveIrp
IoCsqRemoveNextIrp
CsqAcquireLock
CsqCompleteCanceledIrp
CsqInsertIrpEx
CsqPeekNextIrp
CsqReleaseLock
CsqRemoveIrp

 

 

Send comments about this topic to Microsoft

Build date: 5/2/2013

© 2013 Microsoft. All rights reserved.