Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceService::Open method

The Open method opens a connection to the service.

Syntax


HRESULT STDMETHODCALLTYPE Open(
  [in] LPCWSTR               pszPnPServiceID,
  [in] IPortableDeviceValues *pClientInfo
);

Parameters

pszPnPServiceID [in]

The Plug and Play (PnP) identifier for the service, which is the same identifier that is retrieved by the GetPnPServiceId method.

pClientInfo [in]

The IPortableDeviceValues interface specifying the client information.

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_INVALIDARG

The PnP identifier specified by the pszPnPServiceID parameter is invalid.

E_POINTER

A NULL parameter was specified.

E_WPD_SERVICE_ALREADY_OPENED

This method has already been called for the service.

 

Examples

For an example of how to use this method, see Opening a Service.

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
Opening a Service

 

 

Community Additions

Show:
© 2017 Microsoft