IPortableDeviceConnector::GetPnPID method (portabledeviceconnectapi.h)

The GetPnPID method retrieves the connector's Plug and Play (PnP) device identifier.

Syntax

HRESULT GetPnPID(
  LPWSTR *ppwszPnPID
);

Parameters

ppwszPnPID

The PnP device identifier.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

The identifier retrieved by this method corresponds to a handle to the MTP/Bluetooth Bus Enumerator device node that receives connect and disconnect IOCTL requests for a paired MTP/Bluetooth device. Applications can use this identifier with the SetupAPI functions to access the device node.

Once the application no longer needs the identifier specified by the ppwszPnPID parameter, it must call the CoTaskMemAlloc function to free the identifier.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header portabledeviceconnectapi.h
Library PortableDeviceGuids.lib

See also

IPortableDeviceConnector