Skip to main content
WSCInstallNameSpace32 function

The WSCInstallNameSpace32 function installs a specified 32-bit namespace provider. For providers that are able to support multiple namespaces, this function must be called for each namespace supported, and a unique provider identifier must be supplied each time.

Note  This call is a strictly 32-bit version of WSCInstallNameSpace for use on 64-bit platforms. It is provided to allow 64-bit processes to access the 32-bit catalogs.

Syntax


int WSAAPI WSCInstallNamespace32(
  _In_  LPWSTR lpszIdentifier,
  _In_  LPWSTR lpszPathName,
  _In_  DWORD dwNameSpace,
  _In_  DWORD dwVersion,
  _In_  LPGUID lpProviderId
);

Parameters

lpszIdentifier [in]

A pointer to a string that identifies the provider associated with the globally unique identifier (GUID) passed in the lpProviderId parameter.

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%). Such environment strings are expanded whenever the WS2_32.DLL must 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 namespace 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.

Return value

If no error occurs, the WSCInstallNameSpace32 function returns NO_ERROR (zero). Otherwise, it returns SOCKET_ERROR if the function fails, and you must retrieve the appropriate error code using the WSAGetLastError function.

Error codeMeaning
WSAEACCES

The calling routine does not have sufficient privileges to install a namespace.

WSAEINVAL

One or more of the arguments are invalid.

WSANO_RECOVERY

A nonrecoverable error occurred. This error is returned under several conditions including the following: the provider is already installed, the user lacks the administrative privileges required to write to the Winsock registry, or a failure occurred when creating or installing a catalog entry.

WSASYSCALLFAILURE

A system call that should never fail has failed.

WSA_NOT_ENOUGH_MEMORY

Insufficient memory was available. This error is returned when there is insufficient memory to allocate a new catalog entry.

 

Remarks

WSCInstallNameSpace32 is a strictly 32-bit version of WSCInstallNameSpace. On a 64-bit computer, all calls not specifically 32-bit (for example, all functions that do not end in "32") operate on the native 64-bit catalog. Processes that execute on a 64-bit computer must use the specific 32-bit function calls to operate on a strictly 32-bit catalog and preserve compatibility. The definitions and semantics of the specific 32-bit calls are the same as their native counterparts.

The namespace configuration functions do not affect applications that are already running. Newly installed namespace providers will not be visible to applications nor will the changes in a namespace provider's activation state. Applications launched after the call to WSCInstallNameSpace32 will recognize the changes.

The WSCInstallNameSpace32 function can only be called by a user logged on as a member of the Administrators group. If WSCInstallNameSpace32 is called by a user that is not a member of the Administrators group, the function call will fail. For computers running Windows Vista or Windows Server 2008, this function can also fail because of user account control (UAC). If an application that contains this function is executed by a user logged on as a member of the Administrators group other than the built-in Administrator, this call will fail unless the application has been marked in the manifest file with a requestedExecutionLevel set to requireAdministrator. If the application on Windows Vista or Windows Server 2008 lacks this manifest file, a user logged on as a member of the Administrators group other than the built-in Administrator must then be executing the application in an enhanced shell as the built-in Administrator (RunAs administrator) for this function to succeed.

Requirements

Minimum supported client

Windows Vista, Windows XP Professional x64 Edition [desktop apps only]

Minimum supported server

Windows Server 2008, Windows Server 2003 x64 Edition [desktop apps only]

Header

Ws2spi.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

See also

WSCDeinstallProvider32
WSCEnumProtocols32
WSCInstallNameSpace
WSCInstallNameSpaceEx32
WSCUnInstallNameSpace32