拉风的咖菲猫
HANDLE hFile=CreateFile(TEXT("text.txt"),GENERIC_READ | GENERIC_WRITE,0,NULL,CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL);if(hFile==INVALID_HANDLE_VALUE){MessageBox(TEXT("创建文件失败!"));return;}LARGE_INTEGER liDistanceToMove;liDistanceToMove.QuadPart=102400000; //设置成这个大,单位字节if(!SetFilePointerEx(hFile,liDistanceToMove,NULL,FILE_BEGIN)){MessageBox(TEXT("移动文件指针失败!"));}if(!SetEndOfFile(hFile)){MessageBox(TEXT("设置文件尾失败!"));}CloseHandle(hFile);