WSALookupServiceEnd  P_241P

The Windows Sockets WSALookupServiceEnd function is called to free the handle after previous calls to WSALookupServiceBegin and WSALookupServiceNext.

Note that if you call WSALookupServiceEnd from another thread while an existing WSALookupServiceNext is blocked, the end call will have the same effect as a cancel and will cause the WSALookupServiceNext call to return immediately.

INT WSALookupServiceEnd (

    HANDLE hLookup

 

   );

 

 

Parameters

hLookup

[in] Handle previously obtained by calling WSALookupServiceBegin.

 

Return Values

The return value is zero if the operation was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number may be retrieved by calling WSAGetLastError.

Error Codes

WSA_INVALID_HANDLE

The Handle is not valid

WSANOTINITIALIZED

The Windows Sockets 2 DLL has not been initialized. The application must first call WSAStartup before calling any Windows Socketsfunctions.

 

See Also

WSALookupServiceBegin, WSALookupServiceNext