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

另請參閱