WSALookupServiceEnd Function
The WSALookupServiceEnd function is called to free the handle after previous calls to WSALookupServiceBegin and WSALookupServiceNext.
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.
Syntax
INT WSALookupServiceEnd(
__in HANDLE hLookup
);
Parameter
- hLookup [in]
Handle previously obtained by calling WSALookupServiceBegin.
Rückgabewert
The return value is zero if the operation was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling WSAGetLastError.
Error code | Meaning |
---|---|
WSA_INVALID_HANDLE | The handle is not valid. |
WSANOTINITIALISED | The WS2_32.DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions. |
WSA_NOT_ENOUGH_MEMORY | There was insufficient memory to perform the operation. |
Anforderungen
Mindestens unterstützter Client |
Windows 2000 Professional |
Mindestens unterstützter Server |
Windows 2000 Server |
Header |
Winsock2.h |
Bibliothek |
Ws2_32.lib |
DLL |
Ws2_32.dll |