Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function installs the specified transport provider into the system configuration database.

Syntax

int WSCInstallProvider(
  const LPGUID
 lpProviderId,
  const LPWSTR 
lpszProviderDllPath,
  const LPWSAPROTOCOL_INFOW 
lpProtocolInfoList,
  DWORD
 dwNumberOfEntries,
  LPINT
 lpErrno 
);

Parameters

lpProviderId

[in] Pointer to a provider-selected, globally unique identifier (GUID).

lpszProviderDllPath

[in] Pointer to a string containing the load path to the provider's DLL. This string observes the usual rules for path resolution and can contain embedded environment strings (such as %SystemRoot%). Such environment strings are expanded whenever the ws2.dll needs to subsequently load the provider DLL on behalf of an application. After any embedded environment strings are expanded, the ws2.dll passes the resulting string into the LoadLibraryfunction to load the provider into memory. For more information, see LoadLibrary.

lpProtocolInfoList

[in] Points to an array of WSAPROTOCOL_INFOWstructures. Each structure defines a protocol, address_family, and socket_type supported by the provider.

dwNumberOfEntries

[in] Contains the number of entries in the lpProtocolInfoListarray.

lpErrno

[out] Pointer to the error code.

Return Value

If no error occurs, this function returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code is available in lpErrno.

The following table shows the possible error code.

Error value Description

WSAEFAULT

One or more of the argumentsis not in a valid part of the user address space.

WSANO_RECOVERY

Caller application is not privileged.

Remarks

This routine creates the necessary common Winsock configuration information for the specified provider. It is applicable to base protocols, layered protocols, and provider chains. After this routine completes successfully, the protocol information provided in lpProtocolInfoListwill be returned by the WSAEnumProtocols. Note that in Win32 environments, only instances of the ws2.dll created after a successful completion of this function will include the new entries in WSAEnumProtocols.

Any file installation or service provider-specific configuration must be performed by the caller.

Requirements

Header ws2spi.h
Library Ws2.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also