WSCInstallNameSpace

The WSCInstallNameSpace function installs a name space provider. For providers that are able to support multiple names spaces, this function must be called once for every name space supported, and a unique provider ID must be supplied each time.

int WSCInstallNameSpace (
  LPWSTR lpszIdentifier,   
  LPWSTR lpszPathName,   
  DWORD dwNameSpace,     
  DWORD dwVersion,       
  LPGUID lpProviderId    
);
 

Parameters

lpszIdentifier
[in] A pointer to string that identifies the provider for use in the GUI.
lpszPathName
[in] A pointer to a string that contains the path to the provider's DLL image. The string observes the usual rules for path resolution: this path can contain embedded environment strings (such as %SystemRoot%); and such environment strings are expanded whenever the WS2_32.DLL needs to subsequently load the provider DLL on behalf of an application. After any embedded environment strings are expanded, the WS2_32.DLL passes the resulting string into the LoadLibrary function to load the provider into memory. For more information, see LoadLibrary.
dwNameSpace
[in] A descriptor that specifies the name space supported by this provider.
dwVersion
[in] A descriptor that specifies the version number of the provider.
lpProviderId
[in] A unique identifier for this provider. This GUID should be generated by UUIDGEN.EXE.

Remarks

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 WSCInstallNameSpace will see the changes.

Return Values

If no error occurs, the WSCInstallNameSpace function returns NO_ERROR (zero). Otherwise, it returns SOCKET_ERROR if the function fails, and it must set the appropriate error code using SetLastError.

Error Codes

WSAEACCESS The calling routine does not have sufficient privileges to install a name space.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in ws2spi.h.
  Import Library: Link with ws2_32.lib.