LPNSPLOOKUPSERVICEEND callback function (ws2spi.h)
The NSPLookupServiceEnd function is called to free the handle after previous calls to NSPLookupServiceBegin and NSPLookupServiceNext.
It is possible to receive an NSPLookupServiceEnd call on another thread while processing an NSPLookupServiceNext. This indicates that the client has canceled the request and the provider should close the handle and return from the NSPLookupServiceNext call as well, setting the last error to WSA_E_CANCELLED.
Syntax
LPNSPLOOKUPSERVICEEND Lpnsplookupserviceend;
INT Lpnsplookupserviceend(
[in] HANDLE hLookup
)
{...}
Parameters
[in] hLookup
The handle obtained previously by a call to
NSPLookupServiceBegin.
Return value
The function should return NO_ERROR (zero) if the routine succeeds. It should return SOCKET_ERROR (–1) if the routine fails and it must set the appropriate error code using WSASetLastError.
Error code | Meaning |
---|---|
The handle is not valid. | |
There is not enough memory available to perform this operation. | |
The operation is not supported. This error is returned if the namespace provider does not implement this function. |
Remarks
In Windows Sockets 2, conflicting error codes are defined for WSAECANCELLED and WSA_E_CANCELLED. The error code WSAECANCELLED will be removed in a future version and only WSA_E_CANCELLED will remain. Namespace Providers should use the WSA_E_CANCELLED error code to maintain compatibility with the widest possible range of applications.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ws2spi.h |