Determining the Controlling Pin of a Node
Unlike filters and pins, nodes do not have an associated file handle by which applications in Ring 3 can access them. Because nodes are internal components within a filter, they exist somewhere between the filter's input and output pins. The network provider must determine which filter pin to use, then use the pin to access a node. This filter pin is called the controlling pin for that node. To determine the controlling pin for each node in the BDA template connection list of a filter, the network provider queries the KSPROPERTY_BDA_CONTROLLING_PIN_ID property of the KSPROPSETID_BdaTopology property set. The BDA minidriver in turn calls the BdaPropertyGetControllingPinId support function for each node. In this call, the minidriver passes a pointer to a KSP_BDA_NODE_PIN structure. This structure identifies the property request to retrieve the controlling pin for a specific node type and a pair of the filter's input and output pins. The BDA support library returns the identifier of the controlling pin for the node type.
A BDA minidriver does not typically intercept the KSPROPERTY_BDA_CONTROLLING_PIN_ID property. The minidriver automatically dispatches the BdaPropertyGetControllingPinId support function from the KSPROPSETID_BdaTopology property set. See Determining BDA Device Topology for more information.
The support library is able to do all the work of determining the identifier of the controlling pin because the BDA minidriver provided the support library with a pointer to the BDA_FILTER_TEMPLATE structure when the BDA minidriver started operating. See Starting a BDA Minidriver for more information. A BDA minidriver informs the BDA support library how to determine controlling pins through information contained in BDA_FILTER_TEMPLATE. This information includes:
An array of connections. This array is a KSTOPOLOGY_CONNECTION array that provides a representation of all the possible connections between node and pin types that can be made within a filter or between a filter and adjoining filters. See Mapping Connection Topology For more information about the KSTOPOLOGY_CONNECTION array.
An array of joint values. A joint is a point in the topology where one input splits into one or more paths to different outputs, or one or more inputs join into a single output path. The value given to a joint corresponds to the index of an element in the KSTOPOLOGY_CONNECTION array. Most topologies will have only one joint.
An array of BDA_PIN_PAIRING structures. These structures identify input and output pin types, the maximum number of input-type instances that can be created on the filter, and the maximum number of output-type instances that can be created on the filter. These structures also contain a pointer to the array of joint values between the input and output pins. See Starting a BDA Minidriver For more information about the BDA_PIN_PAIRING array.
The following figure shows how the support library determines the filter pin that controls a specific node: