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
);
Parameter
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.
Rückgabewert
If no error occurs, WSCGetProviderPath returns zero. Otherwise, it returns SOCKET_ERROR. The specific error code is available in lpErrno.
Error code | Meaning |
---|---|
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. |
Hinweise
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.
Anforderungen
Mindestens unterstützter Client |
Windows 2000 Professional |
Mindestens unterstützter Server |
Windows 2000 Server |
Header |
Ws2spi.h |
Bibliothek |
Ws2_32.lib |
DLL |
Ws2_32.dll |