The WSCEnableNSProvider function changes the state of a given name space provider. It is intended give the end-user the ability to change the state of the name space providers with the control panel applet.
int WSCEnableNSProvider (
LPGUID lpProviderId,
BOOL fEnable
);
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 applet 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.
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.
WSAEINVAL | The specified name space provider ID is invalid. |
Windows NT: Yes
Windows: Yes
Windows CE: Unsupported.
Header: Declared in ws2spi.h.
Import Library: Link with ws2_32.lib.