send FILE via BT -> ERROR
| Fri, 2005-06-24 09:47 | |
|
Hi
i'm tring to modifi the BTOBEX example to send a file instead a simple message. I used the object CObexFileObject instead of BTNullObject: _LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT"); iCurrObject = CObexFileObject::NewL(TPtrC(NULL,0)); iCurrObject->InitFromFileL((TDesC&)currentFileName); but when I try to connect to the selected device I get the error message : BTOBEX alredy in use! Please help me..... Thank you in advance |
|






Forum posts: 7
CLIENT BUSY.
Can somebody help me?
Forum posts: 9
Forum posts: 1379
First of all, whats this:
_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject = CObexFileObject::NewL(TPtrC(NULL,0));
iCurrObject->InitFromFileL((TDesC&)currentFileName);
You are casting (EVIL!) a TLitinto a TDesC16&... Try this:
_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject = CObexFileObject::NewL(currentFileName);
didster
Forum posts: 6
Thanks a lot for your help!
Forum posts: 1379
_LIT(KFileName," C:\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject = CObexFileObject::NewL(KFileName);
didster
Forum posts: 11
_LIT(currentFileName,"\\SYSTEM\\DATA\\MARIO.DAT");
iCurrObject->InitFromFileL(currentFileName);
Forum posts: 20
I tried usign the code snippet you have told for transferring the file over bluetooth obex service:
iCurrObject = CObexFileObject::NewL();
_LIT(currentFileName,"\\SYSTEM\\DATA\\BA_MW_B.264");
iCurrObject->InitFromFileL(currentFileName);
But when I am trying to build this, its giving me "undefined error InirFromFileL".Please let me know where else do I define it since i thought its already defined in CObexFileObject class, I need not define it again.
Please help me.
Thanx
Forum posts: 3
Forum posts: 18
  I tried usign the code snippet you have told for transferring the file over bluetooth obex service:
  iCurrObject = CObexFileObject::NewL();
  _LIT(currentFileName,"\\SYSTEM\\DATA\\BA_MW_B.264");
   iCurrObject->InitFromFileL(currentFileName);
But when I am trying to build this, its giving me "undefined error InirFromFileL".Please let me know where else do I define it since i thought its already defined in CObexFileObject class, I need not define it again.
Please help me.
Thanx
HI,
Try this
_LIT(KFileName,"\\system\\apps\\example\\file.txt");
iCurrObject = CObexFileObject::NewL(KFileName);
iCurrObject->SetNameL(_L("file.txt"));