WSAUnadvertiseProvider function (ws2spi.h)

The WSAUnadvertiseProvider function makes a specific namespace version-2 provider no longer available for clients.

Syntax

INT WSAAPI WSAUnadvertiseProvider(
  [in] const GUID *puuidProviderId
);

Parameters

[in] puuidProviderId

A pointer to the provider ID of the namespace provider.

Return value

If no error occurs, WSAUnadvertiseProvider returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code is available by calling WSAGetLastError.

Error code Meaning
WSAEINVAL
A parameter was not valid. This error is returned if the puuidProviderId parameter was **NULL**.

Remarks

The WSAUnadvertiseProvider function is used as part of the namespace service provider version-2 (NSPv2) architecture available on Windows Vista and later.

On Windows Vista and Windows Server 2008, the WSAUnadvertiseProvider function can only be used for operations on NS_EMAIL namespace providers.

In general, NSPv2 providers are implemented in processes other than the calling applications. NSPv2 providers are not activated as result of client activity. Each provider hosting application decides when to make a specific provider available or unavailable by calling the WSAAdvertiseProvider and WSAUnadvertiseProvider functions. The client activity only results in attempts to contact the provider, when available (when the namespace provider is advertised).

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header ws2spi.h
Library Ws2_32.lib
DLL Ws2_32.dll

See also

NSPV2_ROUTINE

WSAAdvertiseProvider

WSAEnumNameSpaceProviders

WSAEnumNameSpaceProvidersEx

WSASetService