// acxelements.h
NTSTATUS AcxKeywordSpotterCreate(
ACXCIRCUIT Object,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_KEYWORDSPOTTER_CONFIG Config,
ACXKEYWORDSPOTTER *KeywordSpotter
);
View the official Windows Driver Kit DDI referenceNo description available.
The AcxKeywordSpotterCreate function is used to create an ACX keyword spotter object that that will be associated with a circuit device object parent.
ObjectA WDFDEVICE object (described in Summary of Framework Objects) that will be associated with the circuit.
AttributesAdditional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various values and to associate the KeywordSpotter object with the parent WDF device object.
ConfigAn initialized ACX_KEYWORDSPOTTER_CONFIG structure that describes the configuration of the keyword spotter.
KeywordSpotterA pointer to a location that receives the handle to the newly created ACXKEYWORDSPOTTER object. For more information about ACX objects, see 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.
Example usage is shown below.
ACX_KEYWORDSPOTTER_CALLBACKS_INIT(&keywordSpotterCallbacks);
keywordSpotterCallbacks.EvtAcxKeywordSpotterRetrieveArm = CodecC_EvtAcxKeywordSpotterRetrieveArm;
keywordSpotterCallbacks.EvtAcxKeywordSpotterAssignArm = CodecC_EvtAcxKeywordSpotterAssignArm;
keywordSpotterCallbacks.EvtAcxKeywordSpotterAssignPatterns = CodecC_EvtAcxKeywordSpotterAssignPatterns;
keywordSpotterCallbacks.EvtAcxKeywordSpotterAssignReset = CodecC_EvtAcxKeywordSpotterAssignReset;
ACX_KEYWORDSPOTTER_CONFIG_INIT(&keywordSpotterCfg);
keywordSpotterCfg.Pattern = &CONTOSO_KEYWORDCONFIGURATION_IDENTIFIER2;
keywordSpotterCfg.Callbacks = &keywordSpotterCallbacks;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_KEYWORDSPOTTER_CONTEXT);
attributes.ParentObject = Circuit;
status = AcxKeywordSpotterCreate(Circuit, &attributes, &keywordSpotterCfg, Element);
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.