So this is probably no problem for experienced C++ developer, but I have little trouble and I am sure it will be something stupid where I am using Symbian descriptors in wrong way.
I have serialized directory that needs to be parsed in this little code. I am having problem of getting substring from this string.
This is my string which is read:
[1]games
01Ftodo.bmp! 01Dvsd![1]kultura
[1]news
01Daaa! 12Dbbs! 23FWINIMAGE.EXE! 12Detc! 23Dna4_files! 34Fbg1.gif! 34FwhatIsNA.css![1]okurky
In debuger I can see that my HBufC8.fulltree contains whole read string (above) that is 144 character long.
do {
myFile.Read(readBuf1);
console->Printf(KDataReceived, readBuf1.Length());
iData->AddDataL(readBuf1); // this is my class containing segmentedbuffer so I can have dynamic descriptor.
} while (readBuf1.Length() != 0 );
HBufC8* fullTree = HBufC8::NewL(144);
fullTreePtr.Set(fullTree->Des());
TInt stat = iData->ReadFully(fullTreePtr, 144); // this method use Read() method of SegmentedBuffer to fill �fullTree�.
At this point I can really see that I have all data in memory and fullTreePtr points to the string above (serialized tree).
When I am trying to get substring 136 - 142 I have error in my debuger. Probably some memory overflow.
fullTreePtr.Mid(136, 142);
Any ideas ????