WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT function (wdfio.h)

[Applies to KMDF only]

The WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT function initializes a driver's WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure.

Syntax

void WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT(
  [out] PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY Policy,
  [in]  ULONG                                 TotalForwardProgressRequests
);

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.

Return value

None

Remarks

The WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT function zeros the specified WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY structure and sets its Size member. It also sets the structure's TotalForwardProgressRequests member to the specified value and sets the ForwardProgressReservedPolicy member to WdfIoForwardProgressReservedPolicyAlwaysUseReservedRequest.

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.

#define MAX_RESERVED_REQUESTS 10

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY queueForwardProgressPolicy;
WDFQUEUE readQueue;
NTSTATUS status = STATUS_SUCCESS;

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT(
                                                  &queueForwardProgressPolicy,
                                                  MAX_RESERVED_REQUESTS
                                                  );
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_EXAMINE_INIT

WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_PAGINGIO_INIT

WdfIoQueueAssignForwardProgressPolicy