Digital Dynamics Design xStream98 Special Effects

navigation
home introduction xStream98 about george numerical software links

 

Solve my problems

If you can help me with any of these problems, I'd be very happy to hear from you...

OnNewDocument();

ar.Flush();

fread(&m_Version, sizeof(int), 1, ((CStdioFile*)ar.GetFile())->m_pStream);

CSfFlow::Read(((CStdioFile*)ar.GetFile())->m_pStream);

and...

OnNewDocument();

ar.Read(&m_Version, sizeof(int));

ar.Flush();

CSfFlow::Read(((CStdioFile*)ar.GetFile())->m_pStream);

(CDocument::GetFile(...) has been overloaded so as to provide a CStdioFile rather than a CFile, so I can have access to a file pointer: for portability in the rest of my code). Well... The first bit of code works okay all the time. The second bit works for some files, but not for others. It seems that the file pointer position is a couple of bytes forward of where it should be... ar.Write(...) returns a value of 4 showing that an int has been written, but when I next read from the file using ar's file pointer, the position is wrong! Wierd.

 

Contact George Elphick at gte194@soton.ac.uk

Get your own free Home Page

1