Share via


IWSDDeviceProxy::GetServiceProxyById (Compact 2013)

3/26/2014

This method retrieves a generic IWSDServiceProxy service proxy by service ID. Service IDs can be obtained by examining the service host metadata.

Syntax

HRESULT GetServiceProxyById(
  LPCWSTR pszServiceId,
  IWSDServiceProxy** ppServiceProxy
);

Parameters

  • pszServiceId
    [in] The service ID.
  • ppServiceProxy
    [out] Pointer to an IWSDServiceProxy object for the specified service proxy.

Return Value

The following table shows the possible error code return values.

Error code

Description

S_OK

This method completed successfully.

E_POINTER

ppServiceProxy is NULL.

E_INVALIDARG

The length in characters of pszServiceId exceeds WSD_MAX_TEXT_LENGTH (8192), or there is no metadata associated with the service specified by pszServiceId.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

E_FAIL

There is no endpoint associated with the service proxy.

Requirements

Header

wsdapi.h

Library

wsdapi.lib

See Also

Reference

IWSDDeviceProxy
Web Services on Devices Interfaces