AcxVolumeCreate function (acxelements.h)
The AcxVolumeCreate function is used to create an ACX volume object that that will be associated with a circuit object parent.
Syntax
NTSTATUS AcxVolumeCreate(
ACXOBJECT Object,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_VOLUME_CONFIG Config,
ACXVOLUME *Volume
);
Parameters
Object
A WDFDEVICE object (described in Summary of Framework Objects) that will be associated with the circuit.
Attributes
Additional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various values and to associate the volume object with the parent circuit object.
Config
An initialized ACX_VOLUME_CONFIG structure that describes the configuration of the volume object.
Volume
A pointer to a location that receives the handle to the newly created ACXVOLUME 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;
ACX_VOLUME_CALLBACKS volumeCallbacks;
ACX_VOLUME_CONFIG volumeCfg;
CODEC_VOLUME_ELEMENT_CONTEXT * volumeCtx;
ACX_VOLUME_CONFIG_INIT(&volumeCfg);
volumeCfg.ChannelsCount = MAX_CHANNELS;
volumeCfg.Minimum = VOLUME_LEVEL_MINIMUM;
volumeCfg.Maximum = VOLUME_LEVEL_MAXIMUM;
volumeCfg.SteppingDelta = VOLUME_STEPPING;
volumeCfg.Callbacks = &volumeCallbacks;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_VOLUME_ELEMENT_CONTEXT);
attributes.ParentObject = Circuit;
status = AcxVolumeCreate(Circuit, &attributes, &volumeCfg, Element);
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 |