WSAProviderCompleteAsyncCall function (ws2spi.h)
The WSAProviderCompleteAsyncCall function notifies a client when an asynchronous call to a namespace version-2 provider is completed.
Syntax
INT WSAAPI WSAProviderCompleteAsyncCall(
HANDLE hAsyncCall,
INT iRetCode
);
Parameters
hAsyncCall
The handle passed to the asynchronous call being completed. This handle is passed by the client to the namespace version-2 provider in the asynchronous function call.
iRetCode
The return code for the asynchronous call to the namespace version-2 provider.
Return value
If no error occurs, WSAProviderCompleteAsyncCall returns zero.
If the function fails, the return value is SOCKET_ERROR. To get extended error information, call WSAGetLastError, which returns one of the following extended error values.
Error code | Meaning |
---|---|
There was insufficient memory to perform the operation. | |
An internal error occurred. | |
A parameter was not valid. This error is returned if the hAsyncCall parameter was **NULL**. | |
The Ws2_32.dll has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions. |
Remarks
The WSAProviderCompleteAsyncCall function is used as part of the namespace service provider version-2 (NSPv2) architecture available on Windows Vista and later.
On Windows Vista and Windows Server 2008, the WSAUnadvertiseProvider function can only be used for operations on NS_EMAIL namespace providers. Asynchronous calls to NSPv2 providers are not supported on Windows Vista and Windows Server 2008. So the WSAProviderCompleteAsyncCall is not currently applicable. This function is planned for use in later versions of Windows when asynchronous calls to namespace providers are supported.
In general, NSPv2 providers are implemented in processes other than the calling applications. NSPv2 providers are not activated as result of client activity. Each provider hosting application decides when to make a specific provider available or unavailable by calling the WSAAdvertiseProvider and WSAUnadvertiseProvider functions. The client activity only results in attempts to contact the provider, when available (when the namespace provider is advertised).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | ws2spi.h |
Library | Ws2_32.lib |
DLL | Ws2_32.dll |