Namespace Provider Configuration and Installation

As mentioned previously, the installation application for a namespace provider must call WSCInstallNameSpace or WSCInstallNameSpaceEx to register with the Ws2_32.dll and supply static configuration information. To install into the 32-bit catalog on a 64-bit platform, the namespace provider must call WSCInstallNameSpace32 or WSCInstallNameSpaceEx32. The Ws2_32.dll uses this information to accomplish its routing function and in its implementation of WSAEnumNameSpaceProviders and WSAEnumNameSpaceProvidersEx. The WSCUnInstallNameSpace function is used to remove a namespace provider from the registry, and the WSCEnableNSProvider function is used to toggle a provider between the active and inactive states.

On a 64-bit platform, WSCUnInstallNameSpace32 and WSCEnableNSProvider32 are similar functions to deal with the 32-bit catalog.

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 namespace providers within a single DLL, however each such provider must have a unique namespace provider identifier (GUID) allocated, and a separate call to WSCInstallNameSpace or WSCInstallNameSpaceEx must occur for each instantiation (On 64-bit platforms, the functions for the 32-bit catalog are WSCInstallNameSpace32 and WSCInstallNameSpaceEx32). Such a provider can determine which instantiation is being invoked because the namespace provider (NSP) identifier appears as a parameter in every NSP function.