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

ADD
Show: