WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfio.h

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
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfio-wdf_io_queue_forward_progress_policy_examine_init)

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT function

Description

[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.

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.

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
    );

See also

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_PAGINGIO_INIT

WdfIoQueueAssignForwardProgressPolicy