SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
SetEndOfFile(hFile);
FlushFileBuffers(hFile); //先把写文件缓冲区的数据强制写入磁盘。
SetEndOfFile(hFile);
FlushFileBuffers(hFile); //先把写文件缓冲区的数据强制写入磁盘。