NSPLookupServiceEnd (Windows CE 5.0)

Send Feedback

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.

int NSPLookupServiceEnd(HANDLE hLookup);

Parameters

Return Values

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

In Winsock, conflicting error codes are defined for WSAECANCELLED (10103) and WSA_E_CANCELLED (10111). The error code WSAECANCELLED will be removed in a future version and only WSA_E_CANCELLED will remain. Name Space Providers should switch to using the WSA_E_CANCELLED error code as soon as possible to maintain compatibility with the widest possible range of applications.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ws2spi.h.
Link Library: Ws2.lib.

See Also

NSPLookupServiceBegin | NSPLookupServiceNext

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.