// acxtargets.h
NTSTATUS AcxTargetElementFormatRequestForMethod(
ACXTARGETELEMENT TargetElement,
WDFREQUEST Request,
PACX_REQUEST_PARAMETERS Params
);
View the official Windows Driver Kit DDI referenceNo description available.
The AcxTargetElementFormatRequestForMethod function formats a WDFREQUEST as an ACX method request to be used on specified element target.
TargetElementAn ACXTARGETELEMENT handle. For more information about ACX objects, see Summary of ACX Objects.
RequestA WDFREQUEST handle described in Summary of Framework Objects. For general information about WDF requests, see Creating Framework Request Objects.
ParamsAn initialized ACX_REQUEST_PARAMETERS structure that is used to store method request parameter information.
Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.
A WDFREQUEST is a driver created I/O requests. Framework-based drivers process each I/O request by calling framework request object methods. For more information, see Framework Request Objects.
This sample code shows the use of the AcxTargetElementFormatRequestForMethod.
{
ACXTARGETELEMENT targetElement = NULL;
ULONG targetElementId = 0;
ULONG targetElementsCount = AcxTargetCircuitGetElementsCount(TargetCircuit);
arg = elementArg;
result = 0;
targetElement = AcxTargetCircuitGetTargetElement(TargetCircuit, targetElementId);
ACX_REQUEST_PARAMETERS_INIT_METHOD(
¶ms,
KSMETHODSETID_AcxTestMethod,
KSMETHOD_ACXELEMENT_TEST_IN2OUT,
AcxMethodVerbSend,
AcxItemTypeElement,
targetElementId,
&arg, sizeof(arg), // Value & size
&result, sizeof(result) // Control & size
);
//
// Format a WDF request as an ACX method request for the ACX element target.
//
status = AcxTargetElementFormatRequestForMethod(targetElement, req, ¶ms);
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.