WSAProviderCompleteAsyncCall function (ws2spi.h)
The WSAProviderCompleteAsyncCall function notifies a client when an asynchronous call to a namespace version-2 provider is completed.
INT WSAAPI WSAProviderCompleteAsyncCall( HANDLE hAsyncCall, INT iRetCode );
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.
The return code for the asynchronous call to the namespace version-2 provider.
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.
|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.|
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).
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|