Hi there!
Using the code below I am able to discover the bluetooth address of a remote host and print it on the screen.
However, I would like to 'get' this bluetooth address, before printing on the screen, and store it in a text file on my PC.
How am I supposed to do that?
Thanks a lot.
The code to scan for other bluetooth devices:
SOCKADDR_BTH *pAddrBthLocal=(SOCKADDR_BTH*)pCSAddrDevices->LocalAddr.lpSockaddr; AddrBthLocal.btAddr=pAddrBthLocal->btAddr
The code to print the remote bluetooth device's address on the screen:
addressSize = sizeof(addressAsString);
if (0 == WSAAddressToString(pCSAddrDevices->RemoteAddr.lpSockaddr, pCSAddrDevices->RemoteAddr.iSockaddrLength,
&protocolInfo, addressAsString, &addressSize)){
UpdateData(true);
Aux.Format("Remote Address: %s\n", addressAsString);
m_SocketInfo.operator +=(Aux);
UpdateData(false);