Discussion Board
Error During Search for Bluetooth devices...
2004-02-22, 16:10
#1
Regular Contributor
Hi!
I use these code sniped to search for Bluetooth devices. It works fine but if an mobile had a bluetoothname with Space characters like "Blader pc" my application crash (Error: App. Close USER 8) during search. If there is no space in it it work... Did anyone had an idea what i can do !?
void MyProgramAppUi::BuddysSuchen()
{
RSocketServ iSocketServer;
RSocket iSendingSocket;
iSocketServer.Connect();
TProtocolDesc pInfo;
TInt KRfcommChannel;
KRfcommChannel = 1;
User::LeaveIfError(iSocketServer.FindProtocol(_L("BTLinkManager"),pInfo));
RHostResolver hr;
User::LeaveIfError(hr.Open(iSocketServer,pInfo.iAddrFamily,pInfo.iProtocol));
TInquirySockAddr addr;
TNameEntry entry;
addr.SetIAC(KGIAC);
addr.SetAction(KHostResInquiry|KHostResName);
TRequestStatus status;
hr.GetByAddress(addr, entry, status);
User::WaitForRequest(status);
if (status == KErrNone)
{
iAppContainer->BuddyHinzufuegen(entry().iName);
while (hr.Next(entry) != KErrHostResNoMoreResults)
{
iAppContainer->BuddyHinzufuegen(entry().iName);
}
}
}
Regular Contributor
I foudn my mistake I want to add the name who found during search to an TBuf who is 8 characters long but my found device name was 10 characters hehe
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules