Bewerken

Delen via


AcxCircuitInitAssignAcxCreateStreamCallback function (acxcircuit.h)

The AcxCircuitInitAssignAcxCreateStreamCallback function is used to assign an ACX create stream callback.

Syntax

NTSTATUS AcxCircuitInitAssignAcxCreateStreamCallback(
  PACXCIRCUIT_INIT              CircuitInit,
  PFN_ACX_CIRCUIT_CREATE_STREAM EvtCircuitCreateStream
);

Parameters

CircuitInit

The ACXCIRCUIT_INIT structure that defines the circuit initialization. ACXCIRCUIT_INIT is an opaque object used for circuit initialization. Use AcxCircuitInitAllocate to initialize the ACXCIRCUIT_INIT structure.

EvtCircuitCreateStream

A pointer to a EVT_ACX_CIRCUIT_CREATE_STREAM callback.

Return value

Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.

Remarks

Example

Example usage is shown below.


    //
    // Get a CircuitInit structure.
    //
    circuitInit = AcxCircuitInitAllocate(Device);

    //
    // Assign the circuit's pnp-power callbacks.
    //
    ACX_CIRCUIT_PNPPOWER_CALLBACKS_INIT(&powerCallbacks);
    powerCallbacks.EvtAcxCircuitPowerUp = CodecC_EvtCircuitPowerUp;
    powerCallbacks.EvtAcxCircuitPowerDown = CodecC_EvtCircuitPowerDown;
    AcxCircuitInitSetAcxCircuitPnpPowerCallbacks(circuitInit, &powerCallbacks);

    //
    // Set circuit-callbacks.
    //
    status = AcxCircuitInitAssignAcxRequestPreprocessCallback(
                                            circuitInit, 
                                            CodecC_EvtCircuitRequestPreprocess,
                                            (ACXCONTEXT)AcxRequestTypeAny, // dbg only
                                            AcxRequestTypeAny,
                                            NULL, 
                                            AcxItemIdNone);

    status = AcxCircuitInitAssignAcxCreateStreamCallback(
                                            circuitInit, 
                                            CodecC_EvtCircuitCreateStream);

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

Requirements

Requirement Value
Header acxcircuit.h
IRQL PASSIVE_LEVEL

See also