Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
Network Protocols
Windows Sockets 2
Winsock Reference
Winsock Functions
 WSALookupServiceEnd Function
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

C++
INT WSALookupServiceEnd(
  __in  HANDLE hLookup
);

Parameters

hLookup [in]

Handle previously obtained by calling WSALookupServiceBegin.

Return Value

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 codeMeaning
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.

 

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinsock2.h
LibraryWs2_32.lib
DLLWs2_32.dll

See Also

Bluetooth and WSALookupServiceEnd
Winsock Reference
Winsock Functions
WSALookupServiceBegin
WSALookupServiceNext

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker