BthRemoteNameQuery (Windows Embedded CE 6.0)

1/6/2010

This function queries the name of a remote Bluetooth device.

Note

To preserve Win32 compatibility, consider using the Winsock equivalent of this function. To do so, pass SO_BTH_SET_READ_REMOTE_NAME as the optname value in setsockopt.

Syntax

int BthRemoteNameQuery(
  BT_ADDR* pba,
  unsigned int cBuffer,
  unsigned int* pcRequired,
  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 wchars required.
  • szString
    [in, out] On input, the buffer in which to store the device name. On output, the resulting string.

Return Value

This function returns ERROR_SUCCESS when it completes successfully.

A return value of ERROR_SERVICE_NOT_ACTIVE indicates that the hardware is not inserted or that the Bluetooth stack is not present.

A return value of ERROR_INSUFFICIENT_BUFFER indicates that the buffer is too small.

Other standard error codes may be returned as appropriate.

Remarks

For more information about this function, see the Remote_Name_Request part of the Bluetooth Core Specification.

Requirements

Header bt_api.h
Library Btdrt.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Bluetooth OS Functions

Other Resources

Bluetooth Application Development
WSALookupServiceBegin (Windows Sockets)
WSALookupServiceNext (Windows Sockets)
WSALookupServiceEnd (Windows Sockets)