NSPLookupServiceEnd (Compact 2013)
3/26/2014
This 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
int NSPLookupServiceEnd(
HANDLE hLookup
);
Parameters
- hLookup
[in] Handle previously obtained by calling 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 SetLastError.
The following table shows the possible error values.
Error value |
Description |
---|---|
WSA_INVALID_HANDLE |
Handle is not valid. |
WSA_NOT_ENOUGH_MEMORY |
Not enough free memory available to perform this operation. |
Remarks
Name Space Providers should use WSA_E_CANCELLED (10111) instead of WSAECANCELLED (10103)._.
Requirements
Header |
ws2spi.h |
Library |
Ws2.lib |
See Also
Reference
Winsock SPI Functions
NSPLookupServiceBegin
NSPLookupServiceNext