IWSDAsyncResult::SetCallback method (wsdclient.h)

Specifies a callback interface to call when the asynchronous operation has completed.

Syntax

HRESULT SetCallback(
  [in] IWSDAsyncCallback *pCallback,
  [in] IUnknown          *pAsyncState
);

Parameters

[in] pCallback

Pointer to a IWSDAsyncCallback object that contains the callback implemented by the user.

[in] pAsyncState

User-defined state information to pass to the callback.

Return value

This method can return one of these values.

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

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pCallback is NULL.

Remarks

The IWSDAsyncCallback::AsyncOperationComplete method is passed the result object associated with the completing message and the state.

pCallback is released when the IWSDAsyncResult object is destroyed.

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

IWSDAsyncResult