Hi,
Here is the code snippet I am using to read a file data in a buffer.
RFs fsSession;
User::LeaveIfError(fsSession.Connect());
RFile file;
User::LeaveIfError(file.Open(fsSession,InputFileName,EFileShareExclusive|EFileRead));
TInt fileSize;
file.Size(fileSize);
HBufC8* encData = HBufC8::NewLC(fileSize);
TPtr8 encDataPtr = encData->Des();
file.Read(encDataPtr);
file.Close();
From this I have to separate first 16 bit data and pass the remaining buffer to another function for further processing of the file.
Can I do the normal pointer addition like encDataPtr + 16 and pass the pointer to the funtion or I have to do any conversion???
I am a C++ developer just learning Symbian, so lot of confusion about the descritors. Plz any one help me to get the first 16 bit data and to pass the remaining to the function.
I tried with encDataPtr + 16 and I got an error like ..\src\EncDec.cpp:165: illegal operands 'TPtr8' + 'int'
Regards
Rajeev

Reply With Quote

