WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT function

[Applies to KMDF only]

The WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT function initializes a driver's WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure.

Syntax


VOID WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT(
  _Out_  PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY Policy,
  _In_   ULONG TotalForwardProgressRequests,
  _In_   PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS EvtIoWdmIrpForForwardProgress
);

Parameters

Policy [out]

A pointer to the driver's WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure.

TotalForwardProgressRequests [in]

The number of request objects that the framework will attempt to reserve for use in low-memory situations. This number must be greater than zero.

EvtIoWdmIrpForForwardProgress [in]

A pointer to the driver's EvtIoWdmIrpForForwardProgress callback function.

Return value

None.

Remarks

The WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT function zeros the specified WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure and sets its Size member. It also sets the structure's TotalForwardProgressRequests andForwardProgressReservePolicySettings.Policy.ExaminePolicy.EvtIoWdmIrpForForwardProgress members to the specified values, and it sets the ForwardProgressReservedPolicy member to WdfIoForwardProgressReservedPolicyUseExamine.

Examples

The following code example initializes a WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure and then calls WdfIoQueueAssignForwardProgressPolicy. In the example, the driver is specifying that the framework should allocate and reserve 10 request objects for low-memory situations, and that the framework should call the driver's MyIoForwardExamineIrpForForwardProgress callback function before using one of the reserved request objects.


#define MAX_RESERVED_REQUESTS 10

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY queueForwardProgressPolicy;
WDFQUEUE readQueue;
NTSTATUS status = STATUS_SUCCESS;

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT(
    &queueForwardProgressPolicy,
    MAX_RESERVED_REQUESTS,
    MyIoForwardExamineIrpForForwardProgress
    );
status = WdfIoQueueAssignForwardProgressPolicy(
    readQueue,
    &queueForwardProgressPolicy
    );

Requirements

Minimum KMDF version

1.9

Header

Wdfio.h (include Wdf.h)

See also

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT
WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_PAGINGIO_INIT
WdfIoQueueAssignForwardProgressPolicy

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft