Share via


IWSDiscoveryProvider::Attach (Compact 2013)

3/26/2014

This method attaches a callback interface to the discovery provider.

Syntax

HRESULT Attach(
  IWSDiscoveryProviderNotify* pSink
);

Parameters

  • pSink
    [in] 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

The following table shows the possible error code return values.

Error code

Description

S_OK

This method completed successfully.

E_POINTER

pSink is NULL.

E_ABORT

A callback interface has already been attached to the provider.

Remarks

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

Requirements

Header

wsdapi.h

Library

wsdapi.lib

See Also

Reference

IWSDiscoveryProvider
Web Services on Devices Interfaces