Platform SDK: Windows Sockets

WSCInstallProvider

The WSCInstallProvider function installs the specified transport provider into the system configuration database.

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_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.
lpProtocolInfoList
[in] Points to an array of WSAPROTOCOL_INFOW structures. Each structure defines a protocol, address_family, and socket_type supported by the provider.
dwNumberOfEntries
[in] Contains the number of entries in the lpProtocolInfoList array.
lpErrno
[out] Pointer to the error code.

Return Values

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

Remarks

This routine creates the necessary common Windows Sockets 2 configuration information for the specified provider. It is applicable to base protocols, layered protocols, and protocol chains. After this routine completes successfully, the protocol information provided in lpProtocolInfoList will be returned by the WSAEnumProtocols. Note that in Win32 environments, only instances of the Ws2_32.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.

Error Codes

Error code Meaning
WSAEFAULT One or more of the arguments is not in a valid part of the user address space.

Requirements

  Version: Requires Windows Sockets 2.0.
  Header: Declared in Ws2spi.h.
  Library: Use Ws2_32.lib.

See Also

WSCDeinstallProvider, WSCEnumProtocols