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 code | Description |
|---|---|
|
The method succeeded. |
|
A NULL parameter was specified. |
|
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 |
|
|
IDL |
|
See also