本文档给出了内存映射存储文件详细算法,代码片段: DWORD dwFileSize = GetFileSize(hFile,NULL); HANDLE hFileMap = CreateFileMapping(hFile,NULL,PAGE_READWRITE,0, dwFileSize+sizeof(char),NULL); if(hFileMap == NULL){ CloseHandle(hFile); return FALSE; }