This topic has not yet been rated - Rate this topic

CFile::SetLength 

Call this function to change the length of the file.


virtual void SetLength(
   ULONGLONG dwNewLen 
);

Parameters

dwNewLen

Desired length of the file in bytes. This value can be larger or smaller than the current length of the file. The file will be extended or truncated as appropriate.

NoteNote

With CMemFile, this function could throw a CMemoryException object.

//example for CFile::SetLength
extern CFile cfile;
ULONGLONG dwNewLength = 10000;
cfile.SetLength( dwNewLength );
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ