IPart::GetLocalId method

The GetLocalId method gets the local ID of this part.

Syntax


HRESULT GetLocalId(
  [out]  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 codeDescription
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Devicetopology.h

See also

IAudioInputSelector::GetSelection
IAudioInputSelector::SetSelection
IAudioOutputSelector::GetSelection
IAudioOutputSelector::SetSelection
IDeviceTopology::GetPartById
IPart Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft