Share via


BthNsLookupServiceEnd (Compact 2013)

3/26/2014

This function frees the handle after previous calls to the BthNsLookupServiceBegin and BthNsLookupServiceNext functions.

Note

To preserve Win32 compatibility, consider using the Winsock equivalent of this function, WSALookupServiceEnd.

Syntax

INT BthNsLookupServiceEnd(
  HANDLE hLookup
);

Parameters

  • hLookup
    [in] Handle obtained from BthNsLookupServiceBegin.

Return Value

If the operation is successful, the return value is zero. Otherwise, the value SOCKET_ERROR is returned. You can retrieve the specific error number by calling the WSAGetLastError function.

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

Remarks

If you call this function from another thread while an existing BthNsLookupServiceNext is executing, the call to BthNsLookupServiceNext is canceled and returns to the calling application immediately.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Service Discovery Functions

Other Resources

WSAGetLastError