Konstantine Voytenko
BluSPAN project coordinator
Fishnest Ltd.
bluspan@gmail.com
Carbider | 20 January, 2009 11:41
RBuf8 buf8 ; RBuf16 buf16 ;
buf16.Copy(buf8);
HBufC8 *heap8;
HBufC *heap16 = CnvUtfConverter::ConvertToUnicodeFromUtf8L(*heap8);
TBuf8 sourceBuf8 ; TBuf16 destBuf16 ;
TInt len = sourceBuf8.Length();
aOutDest.FillZ(len/2 ); // necessary to set the size memcpy((TAny *)destBuf16.Ptr(), (TAny *)sourceBuf8.Ptr(), len);
RBuf8 source ; RBuf dest ; // the same as Rbuf16 TInt destLength ; source.Create(100 );
// Receive the 8 bit descriptor from socket that contains 16 bit data iActiveSocket->RecvOneOrMore(source, 0, iStatus, iLen );
destLength = source.Length() / 2 ; // 16 bit chars instead of 8 bit
dest.CleanupClosePushL() ; // to Cleanup Stack dest.Create( destLength );
//Conversion CBinaryConverter::copy8BitInto16BitDescriptorL(source, dest );
// Show the note CAknInformationNote *iInfNote ; iInfNote = new (ELeave) CAknInformationNote(); iInfNote->ExecuteLD(dest );
CleanupStack::PopAndDestroy(&dest); // Pop RBuf from the Cleanup Stack
Connectivity, S60, Symbian C++ |
Permalink |
Comments (3) |
Trackbacks (0)