WSALookupServiceEnd (Windows Sockets) (Windows CE 5.0)
INT WSALookupServiceEnd( HANDLE hLookup );
- [in] Handle previously obtained by calling the WSALookupServiceBegin (Windows Sockets) function.
If the operation was successful, the return value is zero. If an error occurs, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling the WSAGetLastError function. The following table shows a list of possible error codes.
|WSA_INVALID_HANDLE||The handle is not valid.|
|WSANOTINITIALIZED||Ws2.dll has not been initialized. The application must first call the WSAStartup function before calling any Windows Sockets functions.|
|WSA NOT ENOUGH MEMORY||There was insufficient memory to perform the operation.|
If you call this function from another thread while an existing WSALookupServiceNext (Windows Sockets) is blocked, the end call will have the same effect as a cancel and will cause the WSALookupServiceNext call to return immediately.
Notes for Bluetooth
Bluetooth clients use WSALookupServiceBegin (Windows Sockets), WSALookupServiceNext (Windows Sockets), and WSALookupServiceEnd to discover the existence of a particular service on the Bluetooth RFCOMM server. Queries can be done for local and remote addresses, although for RFCOMM a client can connect only to remote addresses.
OS Versions: Windows CE .NET 4.0 and later.
Link Library: Ws2.lib.
Send Feedback on this topic to the authors