Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CArchive::Read 

Reads a specified number of bytes from the archive.


UINT Read(
   void* lpBuf,
   UINT nMax 
);

Parameters

lpBuf

A pointer to a user-supplied buffer that is to receive the data read from the archive.

nMax

An unsigned integer specifying the number of bytes to be read from the archive.

An unsigned integer containing the number of bytes actually read. If the return value is less than the number requested, the end of file has been reached. No exception is thrown on the end-of-file condition.

The archive does not interpret the bytes.

You can use the Read member function within your Serialize function for reading ordinary structures that are contained in your objects.

extern CArchive ar;
char pb[100];
UINT nr = ar.Read( pb, 100 );

Community Additions

ADD
Show:
© 2015 Microsoft