Platform SDK: Windows Sockets |
The WSCEnableNSProvider function changes the state of a given name-space provider. It is intended to give the end user the ability to change the state of the name-space providers through Control Panel.
int WSCEnableNSProvider ( LPGUID lpProviderId, BOOL fEnable );
If no error occurs, the WSCEnableNSProvider function returns NO_ERROR (zero). Otherwise, it returns SOCKET_ERROR and must set the appropriate error code using SetLastError.
The name space configuration functions do not affect applications that are already running. Newly installed name-space providers will not be visible to applications nor will the changes in a name-space provider's activation state. Applications launched after the call to WSCEnableNSProvider will see the changes.
The WSCEnableNSProvider function is intended to be used by the Control Panel to change the state of the providers. An ISV should not just blindly de-activate another ISV's provider in order to activate its own. The choice should be left to the user.
Error code | Meaning |
---|---|
WSAEINVAL | The specified name-space–provider identifier is invalid. |
Version: Requires Windows Sockets 2.0.
Header: Declared in Ws2spi.h.
Library: Use Ws2_32.lib.