Share via


WSALookupServiceEnd (Bluetooth) (Compact 2013)

3/26/2014

This function frees the handle after previous calls to the WSALookupServiceBegin (Bluetooth) and WSALookupServiceNext (Bluetooth) functions.

Syntax

INT WSALookupServiceEnd(
  HANDLE hLookup
);

Parameters

Return Value

Returns zero on success; otherwise SOCKET_ERROR. The specific error code can be retrieved by calling WSAGetLastError.

Remarks

Note

This function is actually a Winsock function. However, the information that is presented in it is specific to Bluetooth.

To cancel a pending inquiry, pass BTHNS_ABORT_CURRENT_INQUIRY as a handle parameter to WSALookupServiceEnd.

If you call WSALookupServiceEnd from another thread while an existing WSALookupServiceNext (Bluetooth) is executing, the call to WSALookupServiceNext will be canceled and will return to the calling application immediately.

Requirements

Header

winsock2.h

Library

Ws2.lib

See Also

Reference

Bluetooth API Miscellaneous Functions
WSALookupServiceBegin (Bluetooth)
WSALookupServiceNext (Bluetooth)

Other Resources

WSAGetLastError