acxStreamAddConnections 函式 (acxstreams.h)

AcxStreamAddConnections 函式會在 EvtAcxCircuitCreateStream 期間,將明確連線新增至新的 ACX 數據流

語法

NTSTATUS AcxStreamAddConnections(
  ACXSTREAM       Stream,
  PACX_CONNECTION Connections,
  ULONG           ConnectionsCount
);

參數

Stream

現有的 ACXSTREAM 數據流物件。 如需詳細資訊,請參閱 ACX - ACX 物件的摘要

Connections

ACX_CONNECTION結構,其中包含要新增數據流之連線的相關信息。

ConnectionsCount

數據流中的連線數目。 這是以 1 為基礎的計數。

傳回值

如果呼叫成功,則傳 STATUS_SUCCESS 回 。 否則,它會傳回適當的錯誤碼。 如需詳細資訊,請參閱 使用NTSTATUS值

備註

如果驅動程式在 EvtAcxCircuitCreateStream 期間未呼叫 AcxStreamAddConnections,ACX 架構會自動指派新增至 ACXSTREAM 的任何 ACXELEMENT 對象之間的連線。

範例

範例使用方式如下所示。

    //
    // Explicitly connect the elements of the stream. Note that the driver doesn't 
    // need to perform this step when elements are connected in the same order
    // as they were added to the stream.
    //

    const int numElements = 2;
    const int numConnections = numElements + 1;

    ACXSTREAM                      Stream;

    ACX_CONNECTION connections[numConnections];
    ACX_CONNECTION_INIT(&connections[0], Stream, Elements[ElementCount - 2]);
    ACX_CONNECTION_INIT(&connections[1], Elements[ElementCount - 2], Elements[ElementCount - 1]);
    ACX_CONNECTION_INIT(&connections[2], Elements[ElementCount - 1], Stream);

    //
    // Add the connections linking stream to elements.
    //
    status = AcxStreamAddConnections(Stream, connections, SIZEOF_ARRAY(connections));

ACX 需求

最小 ACX 版本: 1.0

如需 ACX 版本的詳細資訊,請參閱 ACX 版本概觀

規格需求

需求
標頭 acxstreams.h
IRQL PASSIVE_LEVEL

另請參閱