Use this code snippet in order to convert from HBufC8 to TBuf8 :
//code starts here
_LIT8(KTitle1,"Information"); HBufC8* heapdes = KTitle1().AllocLC(); TPtr8 tptr = heapdes->Des(); TBuf8<13> tbuf; tbuf.Copy(tptr);//tbuf's will now contain what heapdes has i.e. "Information" CleanupStack::PopAndDestroy(heapdes); //code ends here
Best Regards CodePupil
Thanks and Regards CodePupil __________________________ You are I and I am he .. !!
Forum posts: 104
TPtr8 HBufC8::Des()
This will get you back a pointer that you can either use directly or use to copy the contents into a TBuf8.
PL
Forum posts: 206
HBufC* aBuffer;
*aBuffer;
Note the pointer u are receiving is a constant pointer.. u should use this cause it's faster :d in processor cycles...
cheers
guda
Forum posts: 105
Use this code snippet in order to convert from HBufC8 to TBuf8 :
//code starts here
_LIT8(KTitle1,"Information");
HBufC8* heapdes = KTitle1().AllocLC();
TPtr8 tptr = heapdes->Des();
TBuf8<13> tbuf;
tbuf.Copy(tptr);//tbuf's will now contain what heapdes has i.e. "Information"
CleanupStack::PopAndDestroy(heapdes);
//code ends here
Best Regards
CodePupil
Thanks and Regards
CodePupil
__________________________
You are I and I am he .. !!