WPUGetProviderPath

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

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

Parameters

lpProviderId
[in] The locally unique identifier of the provider. This must be a value obtained by using WSCEnumProtocols.
lpszProviderDllPath
[out] A pointer to a buffer containing a string that identfies the provider DLL's path. This 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 lpszProviderDllPath.
lpErrno
[out] A pointer to the error code.

Remarks

The WPUGetProviderPath function retrieves the DLL path for the specified provider. The DLL path is null-terminated and can contain embedded environment strings (such as %SystemRoot%). Thus, the string should be expanded prior to being used with LoadLibrary. For more information, see LoadLibrary.

Return Values

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

Error Codes

WSAEINVAL lpProviderId does not specify a valid provider.
WSAEFAULT lpszProviderDllPath or lpErrno 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.

See Also

WSCInstallProvider, WSCEnumProtocols