Erweitern Minimieren

WSCInstallNameSpaceEx32 Function

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

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

Syntax

int WSAAPI WSCInstallNameSpaceEx32(
  __in  LPWSTR lpszIdentifier,
  __in  LPWSTR lpszPathName,
  __in  DWORD dwNameSpace,
  __in  DWORD dwVersion,
  __in  LPGUID lpProviderId,
  __in  LPBLOB lpProviderInfo
);

Parameter

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 Unicode string that contains the load path to the provider DLL. This string observes the usual rules for path resolution and can contain embedded environment strings (such as %SystemRoot%). Such environment strings are expanded when 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 to the LoadLibrary function which loads the provider into memory. For more information, see LoadLibrary.

dwNameSpace [in]

The namespace supported by this provider.

dwVersion [in]

The version number of the provider.

lpProviderId [in]

A pointer to a GUID for the provider. This GUID should be generated by Uuidgen.exe.

lpProviderInfo [in]

A provider-specific data blob associated with namespace entry.

Rückgabewert

If no error occurs, the WSCInstallNameSpaceEx32 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.

 

Hinweise

WSCInstallNameSpaceEx32 is a strictly 32-bit version of WSCInstallNameSpaceEx. 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 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 WSCInstallNameSpaceEx32 will see the changes.

The provider-specific data blob associated with namespace entry passed in the lpProviderInfo parameter can be queried using WSCEnumNameSpaceProvidersEx32 function.

Currently, the only namespace provider included with Windows that uses the lpProviderInfo parameter is the NS_EMAIL provider. The format of the buffer pointed to by the lpProviderInfo parameter for an NS_EMAIL namespace provider is a NAPI_PROVIDER_INSTALLATION_BLOB structure.

The WSCInstallNameSpaceEx32function can only be called by a user logged on as a member of the Administrators group. If WSCInstallNameSpaceEx32 is called by a user that is not a member of the Administrators group, the function call will fail. For computers running on 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.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Ws2spi.h

Bibliothek

Ws2_32.lib

DLL

Ws2_32.dll

Siehe auch

NAPI_PROVIDER_INSTALLATION_BLOB
WSCEnumNameSpaceProviders32
WSCEnumNameSpaceProvidersEx32
WSCInstallNameSpace32
WSCInstallNameSpaceEx
WSCUnInstallNameSpace32

 

 

Anzeigen:
© 2014 Microsoft