Expand Minimize

WSCGetProviderPath function

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

Syntax


int WSPAPI WSCGetProviderPath(
  _In_     LPGUID lpProviderId,
  _Out_    LPWSTR lpszProviderDllPath,
  _Inout_  LPINT lpProviderDllPathLen,
  _Out_    LPINT lpErrno
);

Parameters

lpProviderId [in]

A pointer to a globally unique identifier (GUID) for 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, in characters, of the buffer pointed to by the lpszProviderDllPath parameter.

lpErrno [out]

A pointer to the error code if the function fails.

Return value

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

Error codeMeaning
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.

 

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 Windows LoadLibrary function. For more information, see LoadLibrary.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ws2spi.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

See also

WSCInstallProvider
WSCEnumProtocols

 

 

Community Additions

ADD
Show:
© 2014 Microsoft