NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (fileHandle == INVALID_HANDLE_VALUE)
{
std::cout<< "error Code :" << GetLastError() << std::endl;
return 1;
}LARGE_INTEGER li;
li.QuadPart = 1024*2;
BOOL bRet = SetFilePointerEx(fileHandle, li, NULL, FILE_BEGIN); // 设置文件指针的位置
SetEndOfFile(fileHandle);
CloseHandle(fileHandle);
// CFile 自动析构
CFile file;if (!file.Open(_T("E:\\MyFile\\abc.txt"), CFile::modeReadWrite))
{
printf("Open file error");
return 1;
}
ULONGLONG le = file.GetLength();