WSCGetProviderPath

The WSCGetProviderPath function retrieves the DLL path for the specified provider.

int WSCGetProviderPath(
  LPGUID lpProviderId,         
  LPWSTR lpszProviderDllPath,  
  LPINT lpProviderDllPathLen,  
  LPINT lpErrno                
);
 

Parameters

lpProviderId
[in] The locally unique identifier of the provider. This value is obtained by using WSCEnumProtocols.
lpszProviderDllPath
[out] A pointer to a buffer into which the provider DLL's path string is returned. The path is a null-terminated string and any embedded environment strings, such as %SystemRoot%, have not been expanded.
lpProviderDllPathLen
[in/out] The size of the buffer pointed to by the lpszProviderDllPath parameter.
lpErrno
[out] A pointer to the error code.

Remarks

The WSCGetProviderPath function retrieves the DLL path for the specified provider. The DLL path can contain embedded environment strings, such as %SystemRoot%, and thus should be expanded prior to being used with the Win32 LoadLibrary function. For more information, see LoadLibrary.

Return Values

If no error occurs, WSCGetProviderPath returns zero. Otherwise, it returns SOCKET_ERROR. The specific error code is available in lpErrno.

Error Codes

WSAEINVAL The lpProviderId parameter does not specify a valid provider.
WSAEFAULT The lpszProviderDllPath or lpErrno parameter is not in a valid part of the user address space, or lpProviderDllPathLen is too small.

QuickInfo

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

See Also

WSCInstallProvider, WSCEnumProtocols