// acxevents.h
NTSTATUS AcxEventCreate(
ACXOBJECT Object,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_EVENT_CONFIG Config,
ACXEVENT *Event
);
View the official Windows Driver Kit DDI referenceNo description available.
The AcxEventCreate function creates an ACX event.
ObjectAn ACXOBJECT that is described in Summary of ACX Objects.
AttributesAdditional Attributes defined using a WDF_OBJECT_ATTRIBUTES that are used to set the various object's values: cleanup and destroy callbacks, context type, and to specify its parent object.
ConfigAn ACX_EVENT_CONFIG structure that defines the ACX event configuration.
EventThe newly created ACXEVENT object (described in Summary of ACX Objects).
Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.
An ACXEVENT represents an asynchronous notification available at the driver level. Events can be added to ACXCIRCUITs, ACXSTREAMs, ACXELEMENTs and ACXPINs. Internally they are exposed as KS Events to upper layers. For more information about KS Events, see KS Events.
This example code snip, shows how ACX uses AcxEventCreate to create an audio jack change event.
NTSTATUS status = STATUS_SUCCESS;
PAGED_CODE();
ACX_EVENT_CALLBACKS eventCallbacks;
ACX_EVENT_CONFIG eventCfg;
AFX_PIN_EVENT_CONTEXT *eventCtx;
ACXEVENT jackEvent;
WDF_OBJECT_ATTRIBUTES attributes;
//
// Add jack info change event to this jack object
//
ACX_EVENT_CALLBACKS_INIT(&eventCallbacks);
eventCallbacks.EvtAcxEventEnable = &AfxPin::EvtJackEventEnableCallback;
eventCallbacks.EvtAcxEventDisable = &AfxPin::EvtJackEventDisableCallback;
ACX_EVENT_CONFIG_INIT(&eventCfg);
eventCfg.Set = &KSEVENTSETID_PinCapsChange;
eventCfg.Id = KSEVENT_PINCAPS_JACKINFOCHANGE;
eventCfg.Callbacks = &eventCallbacks;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, AFX_PIN_EVENT_CONTEXT);
attributes.ParentObject = GetObjectHandle();
status = AcxEventCreate(GetObjectHandle(), &attributes, &eventCfg, &jackEvent);
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.