다음을 통해 공유


IPart Interface

Previous Next

IPart Interface

The IPart interface represents a part (connector or subunit) of a device topology. A client obtains a reference to an IPart interface by calling the IDeviceTopology::GetPartById or IPartsList::GetPart method, or by calling the QueryInterface method of the IConnector or ISubunit interface on a part object and setting the method's iid parameter to REFIID IID_IPart.

An object with an IPart interface can encapsulate one of the following device topology parts:

  • Connector. This is a part that connects to another device to form a data path for transmitting an audio stream between devices.
  • Subunit. This is a part that processes an audio stream (for example, volume control).

The IPart interface of a connector or subunit object represents the generic functions that are common to all parts, and the object's IConnector or ISubunit interface represents the functions that are specific to a connector or subunit. In addition, a part might support one or more control interfaces for controlling or monitoring the function of the part. For example, the client controls a volume-control subunit through its IAudioVolumeLevel interface.

The IPart interface provides methods for getting the name, local ID, global ID, and part type of a connector or subunit. In addition, IPart can activate a control interface on a connector or subunit.

For code examples that use the IPart interface, see the implementations of the GetHardwareDeviceTopology and SelectCaptureDevice functions in Device Topologies.

IPart inherits from the IUnknown interface. In addition to the methods inherited from IUnknown, IPart supports the following methods.

Method Description
Activate Activates an interface on a connector or subunit.
EnumPartsIncoming Retrieves a list of all the parts that reside on data paths that are upstream from this part.
EnumPartsOutgoing Retrieves a list of all the parts that reside on data paths that are downstream from this part.
GetControlInterface Gets a reference to the specified control interface, if this part supports it.
GetControlInterfaceCount Gets the number of control interfaces that this part supports.
GetGlobalId Gets the global ID of this part.
GetLocalId Gets the local ID of this part.
GetName Gets the friendly name of this part.
GetPartType Gets the part type of this part.
GetSubType Gets the part subtype of this part.
GetTopologyObject Gets a reference to the IDeviceTopology interface of the device-topology object that contains this part.
RegisterControlChangeCallback Registers the IControlChangeNotify interface, which the client implements to receive notifications of status changes in this part.
UnregisterControlChangeCallback Removes the registration of an IControlChangeNotify interface that the client previously registered by a call to the IPart::RegisterControlChangeCallback method.

Requirements

Client: Windows Vista

Header: Include Devicetopology.h.

See Also

Previous Next