|
|
User login
Feeds |
something like..FileRead(void *buffer, int numbytes,........
|
|||||
| Wed, 2004-11-24 19:40 | |
|
HI,
We are new on Symban Platform. We are porting a game on it. We have this problem: we have all our game datas into Binary files and ascii files (txt files, used almost like Ini files and to build Menus). We want to know how to Open a Binary file and Read Int, Boo, Floats from there. Something like a FileRead(void *buffer, int numbytes, int *numbytesread) We want to use classical C/C++ methods for Portability from one platform to another, but if we need to use Symbian Classes.... Thanks in advance, |
|
Forum posts: 364
Forum posts: 205
TPtr8 tmp( ( TUint8 * ) aBuffer, aBufLen, aBufMaxLen );
aFile->Read( tmp, aCount );
where aBuffer is your buffer, aBufLen is length of your buffer. in this case it should be 0, aBufMaxLen is a buffer size.
aFile is RFile
take care
Best regards,
Michal Laskowski
Forum posts: 9
Just another question:
How to inizialize a TDesC8 with a char* contents?
Should we have to use another Type to inizialize it?
Thanks!!!
Forum posts: 205
Best regards,
Michal Laskowski
Forum posts: 33
Just another question:
How to inizialize a TDesC8 with a char* contents?
Should we have to use another Type to inizialize it?
Thanks!!!
Depending on what you want/need:
{
TBufC8<232> myBuf( aNullTerminatedStr); // This will copy
// or
TPtrC8 myPtr( aNullTerminatedStr); // This will reference
//...
}
Regards, Bo