PDA

View Full Version : create Memory-mapped file



weixj2003ld
16th April 2009, 14:34
With a large file on the disk,we can use the flowing code to create a Memory-mapped file,but how to realize it with Qt class?

HANDLE CreateFile(LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECUR99vY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);

weixj2003ld
17th April 2009, 01:31
HANDLE CreateFile(LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECUR99vY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
the code is API function,how could I realize them by Qt class,or Qt can call these functions?

wysota
17th April 2009, 10:47
See QFile::map.