hi again,
i've created a unicode text file in Notepad. and i'm trying to load it in my symbian app. i placed the text file at (copied from windows explorer bar):
"C:\Symbian\7.0s\Series60_v21\Epoc32\release\wins\urel\z\system\apps\myapp\textfile.txt"
the texts infos in the text file is just: "99 88"
I load the text file and its info w/the following code:
void CMyClass::LoadDataL(TFileName aFilename)
{
User::LeaveIfError(CMyClass::iFileServerSession.Connect()); TFileName fullName = CMyClass::AppendFullPath(aFilename);
if(CMyClass::IsFileExist(fullName)) {
CFileStore* store = CDirectFileStore::OpenLC
(CMyClass::iFileServerSession, fullName, EFileRead);
// Open the data stream inside the store
RStoreReadStream stream;
stream.OpenLC(*store, store->Root());
// Read all the data
CMyClass::iMyIntVal = stream.ReadInt16L();
CMyClass::iMyIntVal2= stream.ReadInt16L();
// Remove from cleanup stack (store, stream)
CleanupStack::PopAndDestroy(2);
}
CMyClass::iFileServerSession.Close();
}
but when i run the app, it closes automatically, with no messagebox whatsoeverr.
when i comment out the lines that have: "stream.ReadInt16L()", the app runs, but, of course, didn't load the two integers.
How to grab the integers in the Unicode text file then?
Please help. Thanks!