Share via


BthRemoteNameQuery (Compact 2013)

3/26/2014

This function queries the name of a remote Bluetooth device.

Syntax

int BthRemoteNameQuery(
  BT_ADDR *pba,
  unsigned int ccBuffer,
  unsigned int *pcRequired,
    __out_ecount(ccBuffer) WCHAR *szString
);

Parameters

  • pba
    [in] Pointer to the Bluetooth address of a device whose name is to be queried.
  • cBuffer
    [in] The size of the buffer. The buffer must contain enough space for a 0-terminated string. The recommended size is 256 characters.
  • pcRequired
    [out] Pointer to the number of characters needed.
  • szString
    [in, out] On input, the buffer in which to store the device name. On output, the resulting string.

Return Value

Value

Description

ERROR_SUCCESS

Success.

ERROR_INSUFFICIENT BUFFER

The buffer is too small.

ERROR_SERVICE_NOT_ACTIVE

The Bluetooth stack is not present.

Other standard HRESULT error codes may be returned as appropriate.

Remarks

For more information, see "Remote Name Request" in the Core Specification v2.1 + EDR on the Bluetooth website.

Note

To preserve Microsoft Win32 compatibility, consider using the Winsock equivalent of this function. To do so, set the optname parameter in the setsockopt function to SO_BTH_ENTER_REMOTE_NAME.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Management Functions
Bluetooth AG Service Functions

Other Resources

WSALookupServiceBegin (Windows Sockets)
WSALookupServiceNext (Windows Sockets)
WSALookupServiceEnd (Windows Sockets)