CFile::GetPosition
获取文件指针的当前值,可用于以后对 Seek。
virtual ULONGLONG GetPosition( ) const;
返回值
文件指针。
示例
CFile cfile;
cfile.Open(_T("Seek_File.dat"), CFile::modeCreate |
CFile::modeReadWrite);
LONGLONG lOffset = 1000;
ULONGLONG lActual;
lActual = cfile.Seek(lOffset, CFile::begin);
ASSERT(cfile.GetPosition() == lActual);
要求
Header: afx.h