IPart::GetLocalId method (devicetopology.h)

The GetLocalId method gets the local ID of this part.

Syntax

HRESULT GetLocalId(
  [out] UINT *pnId
);

Parameters

[out] pnId

Pointer to a UINT variable into which the method writes the local ID of this part.

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
E_POINTER
Pointer pnId is NULL.

Remarks

When you have a pointer to a part object, you can call this method to get the local ID of the part. A local ID is a number that uniquely identifies a part among all parts in a device topology.

The IAudioInputSelector::GetSelection and IAudioOutputSelector::GetSelection methods retrieve the local ID of a connected part. The IAudioInputSelector::SetSelection and IAudioOutputSelector::SetSelection methods select the input or output that is connected to a part that is identified by its local ID. The IDeviceTopology::GetPartById method gets a part that is identified by its local ID.

For code examples that use the GetLocalId method, see the following topics:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header devicetopology.h

See also

IAudioInputSelector::GetSelection

IAudioInputSelector::SetSelection

IAudioOutputSelector::GetSelection

IAudioOutputSelector::SetSelection

IDeviceTopology::GetPartById

IPart Interface