WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP function (wdfrequest.h)
[Applies to KMDF and UMDF]
The WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP function sets a new IRP in a driver's WDF_REQUEST_REUSE_PARAMS structure.
Syntax
void WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP(
[in, out] PWDF_REQUEST_REUSE_PARAMS Params,
[in] PIRP NewIrp
);
Parameters
[in, out] Params
A pointer to a caller-supplied WDF_REQUEST_REUSE_PARAMS structure.
[in] NewIrp
A pointer to a caller-supplied IRP structure.
Return value
None
Remarks
If a driver's call to WdfRequestReuse specifies a new IRP structure, the driver must first call WDF_REQUEST_REUSE_PARAMS_INIT and then call WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP to initialize a WDF_REQUEST_REUSE_PARAMS structure.
The WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP function sets the structure's NewIrp member to the specified IRP pointer. It also sets the WDF_REQUEST_REUSE_SET_NEW_IRP flag in the structure's Flag member.
Examples
The following code example initializes a WDF_REQUEST_REUSE_PARAMS structure, provides a new IRP structure for the I/O request, and then calls WdfRequestReuse.
WDF_REQUEST_REUSE_PARAMS params;
NTSTATUS status;
PIRP myIrp;
...
WDF_REQUEST_REUSE_PARAMS_INIT(
¶ms,
WDF_REQUEST_REUSE_NO_FLAGS,
STATUS_SUCCESS
);
WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP(
¶ms,
myIrp
);
status = WdfRequestReuse(
Request,
¶ms
);
...
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfrequest.h (include Wdf.h) |