IWSDServiceProxy::SubscribeToOperation method (wsdclient.h)

Subscribes to a notification or solicit/response event.

Syntax

HRESULT SubscribeToOperation(
  [in]  const WSD_OPERATION  *pOperation,
  [in]  IUnknown             *pUnknown,
  [in]  const WSDXML_ELEMENT *pAny,
  [out] WSDXML_ELEMENT       **ppAny
);

Parameters

[in] pOperation

Reference to a WSD_OPERATION structure that specifies the operation to subscribe to.

[in] pUnknown

Anonymous data passed to a client eventing callback function. This data is used to associate a client object with the subscription.

[in] pAny

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.

[out] ppAny

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

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
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

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsdclient.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDServiceProxy