IWSDiscoveryProvider::Attach method (wsddisco.h)

Attaches a callback interface to the discovery provider.

Syntax

HRESULT Attach(
  [in] IWSDiscoveryProviderNotify *pSink
);

Parameters

[in] pSink

Interface to receive callback notifications. Search results as well as the Hello and Bye messages are communicated to this interface via the callbacks.

Return value

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

Return code Description
S_OK
Method completed successfully.
E_POINTER
pSink is NULL.
E_ABORT
A callback interface has already been attached to the provider.

Remarks

Note  Attach must be called before any other IWSDiscoveryProvider method is used, except for SetAddressFamily.
 

Requirements

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

See also

IWSDiscoveryProvider