I think I'm missing something very basic in the File streaming API. The 
snippet of code below tries to find out the size of a file and then seeks 
back to the beginning of the file. FileOPen() succeeds and returns a handle. 
But the FileTell() call always returns zero. I've inserted GetLastError() 
calls after every file API call but the returned value is 0 (no error). I 
tried changing the FileSeek call to FileSeek(fp, -1L, fileOriginEnd) with no 
change in the result of the FileTell call.
openMode is fileModeReadWrite.
Any comments on where I could be wrong?

Code:
        fp = FileOpen(cardNo, nameP, 0, 0, openMode, NULL);
        FileSeek(fp, 0, fileOriginEnd);
        FileTell(fp, &size, NULL);
        FileSeek(fp, 0, fileOriginBeginning);

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to