Platform SDK: Windows Sockets

Name Space Provider Configuration and Installation

As mentioned previously, the installation application for a name space provider must call WSCInstallNameSpace to register with the Ws2_32.dll and supply static configuration information. The Ws2_32.dll uses this information to accomplish its routing function and in its implementation of WSAEnumNameSpaceProviders. The WSCUnInstallNameSpace function is used to remove a name space provider from the registry, and the WSCEnableNSProvider function is used to toggle a provider between the active and inactive states.

The results of these three operations are not visible to applications that are currently loaded and running. Only applications that begin executing after these operations have occurred will be affected by them.

This architecture explicitly supports the instantiation of multiple name space providers within a single DLL, however each such provider must have a unique name space provider identifier (GUID) allocated, and a separate call to WSCInstallNameSpace must occur for each instantiation. Such a provider can determine which instantiation is being invoked because the name space provider (NSP) identifier appears as a parameter in every NSP function.