Partager via


IPart::GetLocalId

Previous Next

IPart::GetLocalId

The GetLocalId method gets the local ID of this part.

HRESULT GetLocalId(
  UINT  *pnId
);

Parameters

pnId

[out]  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

Client: Windows Vista

Header: Include Devicetopology.h.

See Also

Previous Next