Bluetooth and WSAAddressToString

The WSAAddressToString Windows Sockets function is used to convert a Bluetooth Device Address to a string, which is in turn provided to the WSALookupServiceBegin function via the WSAQUERYSET structure when retrieving device service information.

While a Bluetooth Device Address fits within a 20 character buffer, the WSAAddressToString function currently returns WSAEFAULT for Bluetooth Device Addresses unless the buffer and the specified lpdwAddressStringLength value are set to a character length of 40.

Note

When WSAEFAULT is returned by WSAAddressToString as the result of an insufficient buffer, the lpdwAddressStringLength parameter is not updated with the buffer size required for the operation.

 

WSAAddressToString

Bluetooth and WSALookupServiceBegin

Bluetooth and WSAQUERYSET