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 |