WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT function (wdfio.h)

[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

[out] Policy

A pointer to the driver's WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure.

[in] TotalForwardProgressRequests

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.

[in] EvtIoWdmIrpForForwardProgress

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

Requirement Value
Target Platform Universal
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