WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT function

[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

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.

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

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

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft