AcxElementCreate function (acxelements.h)

The AcxElementCreate function is used to create an ACXELEMENT object that that will be associated with a circuit or stream device object parent.

Syntax

NTSTATUS AcxElementCreate(
  ACXOBJECT              Object,
  PWDF_OBJECT_ATTRIBUTES Attributes,
  PACX_ELEMENT_CONFIG    Config,
  ACXELEMENT             *Element
);

Parameters

Object

A WDFDEVICE object (described in Summary of Framework Objects) that that will be associated with the stream or circuit.

Attributes

Additional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various values and to associate the ACX element with the parent stream or circuit object.

Config

An initialized ACX_ELEMENT_CONFIG structure that describes the configuration of the element.

Element

A pointer to a location that receives the handle to the newly created ACXELEMENT object. For more information about ACX objects, see Summary of ACX Objects.

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.

    NTSTATUS                        status;
    WDF_OBJECT_ATTRIBUTES           attributes;

    ACXSTREAM                       stream;

    ACXELEMENT                      elements[2] = {0};
    ACX_ELEMENT_CONFIG              elementCfg;
    CODEC_ELEMENT_CONTEXT *         elementCtx;

    ACX_ELEMENT_CONFIG_INIT(&elementCfg);
    WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_ELEMENT_CONTEXT);
    attributes.ParentObject = stream;

    status = AcxElementCreate(stream, &attributes, &elementCfg, &elements[0]);

ACX requirements

Minimum ACX version: 1.0

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

Requirements

Requirement Value
Header acxelements.h
IRQL PASSIVE_LEVEL

See also