Share via


IWSDServiceProxy::SubscribeToOperation (Compact 2013)

3/26/2014

This method subscribes to a notification or solicit/response event.

Syntax

HRESULT SubscribeToOperation(
  const WSD_OPERATION* pOperation,
  IUnknown* pUnknown,
  const WSDXML_ELEMENT* pAny,
  WSDXML_ELEMENT** ppAny
);

Parameters

  • pOperation
    [in] Reference to a WSD_OPERATION structure that specifies the operation to subscribe to.
  • pUnknown
    [in] Anonymous data passed to a client eventing callback function. This data is used to associate a client object with the subscription.
  • pAny
    [in] Extensible data to be added to the body of the subscription request. You can use the IWSDXML* interfaces to build the data. For details, see WSDXML_ELEMENT.
  • ppAny
    [out] Extensible data that the remote device can add to the subscription response. This allows services to provide additional customization of event subscriptions. When done, call WSDFreeLinkedMemory to free the memory. For details, see WSDXML_ELEMENT. Do not release this object.

Return Value

The following table shows the possible error code return values.

Error code

Description

S_OK

This method completed successfully.

E_INVALIDARG

The proxy has already subscribed to the operation specified by pOperation.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

E_FAIL

The method failed.

Remarks

This method is normally only called by generated proxy code.

Requirements

Header

wsdapi.h

Library

wsdapi.lib

See Also

Reference

IWSDServiceProxy
Web Services on Devices Interfaces