Compartir a través de


WPUGetProviderPath (Compact 2013)

3/26/2014

This function retrieves the DLL path for the specified provider.

Syntax

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

Parameters

  • lpProviderId
    [in] Locally unique identifier of the provider. This must be a value obtained by using WSCEnumProtocols.
  • lpszProviderDllPath
    [out] Pointer to a buffer containing a string that identifies 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] Size of the buffer pointed to by lpszProviderDllPath.
  • lpErrno
    [out] Pointer to the error code.

Return Value

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

The following table shows the possible error codes.

Error value

Description

WSAEINVAL

The lpProviderId does not specify a valid provider.

WSAEFAULT

Either lpszProviderDllPath or lpErrno is not in a valid part of the user address space, or lpProviderDllPathLen is too small.

Remarks

This 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.

Requirements

Header

ws2spi.h

Library

Ws2.lib

See Also

Reference

Winsock SPI Functions
WSCInstallProvider
WSCEnumProtocols