AcxCircuitAddElements 函式 (acxcircuit.h)
AcxCircuitAddElements 函式會將元素新增至 ACXCIRCUIT。
語法
NTSTATUS AcxCircuitAddElements(
ACXCIRCUIT Circuit,
ACXELEMENT *Elements,
ULONG ElementsCount
);
參數
Circuit
現有的 ACXCIRCUIT 物件。 如需 ACX 物件的詳細資訊,請參閱 ACX 物件的 摘要。
Elements
將新增至線路的一或多個 ACXELEMENT 物件。
ElementsCount
將新增至線路的項目數目。 這是一個以計數為基礎的計數。
傳回值
如果呼叫成功,則傳回 STATUS_SUCCESS
。 否則,它會傳回適當的錯誤碼。 如需詳細資訊,請參閱使用NTSTATUS值 。
言論
驅動程式只能在將線路新增至裝置之前,將元素新增至線路。 驅動程式無法在運行時間變更線路的專案。
例
範例使用方式如下所示。
//
// Add a second element.
//
ACX_ELEMENT_CONFIG_INIT(&elementCfg);
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_ELEMENT_CONTEXT);
attributes.ParentObject = circuit;
status = AcxElementCreate(circuit, &attributes, &elementCfg, &elements[1]);
//
// Add the elements to the circuit.
//
status = AcxCircuitAddElements(circuit, elements, SIZEOF_ARRAY(elements));
ACX 需求
ACX 最低版本: 1.0
如需 ACX 版本的詳細資訊,請參閱 ACX 版本概觀。
要求
要求 | 價值 |
---|---|
標頭 | acxcircuit.h |
IRQL | PASSIVE_LEVEL |