IPortableDeviceService::GetPnPServiceID method

The GetPnPServiceID method retrieves a Plug and Play (PnP) identifier for the service.

Syntax


HRESULT STDMETHODCALLTYPE GetPnPServiceID(
  [out] LPWSTR *ppszPnPServiceID
);

Parameters

ppszPnPServiceID [out]

The retrieved PnP identifier, which is the same identifier that was passed to the Open method.

Return value

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

Return codeDescription
S_OK

The method succeeded.

E_POINTER

A NULL parameter was specified.

E_WPD_SERVICE_NOT_OPEN

The Open method has not yet been called for the service.

 

Remarks

The Open method must be called on the service before a PnP identifier can be retrieved.

When an application no longer needs the PnP identifier, it should call the CoTaskMemFree function to free the identifier memory.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

Header

PortableDeviceAPI.h

IDL

PortableDeviceAPI.idl

See also

IPortableDeviceService Interface

 

 

Community Additions

ADD
Show: