My program maps a file into memory using the code below. Being a 32 bit
architecture I expected to be able to map files of close to 2GB. I am
however only able to map files of around 410MB. Has anyone any experience in
mapping files of this size and larger ?
HANDLE gmap = CreateFileForMapping (fname, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (gmap == INVALID_HANDLE_VALUE) {
MessageBox (NULL, TEXT ("No pak file"), TEXT (""), MB_APPLMODAL|MB_OK);
return 1;
}
pakSize = GetFileSize(gmap, NULL);
gmap = CreateFileMapping(gmap, NULL, PAGE_READONLY, 0, 0, 0);
ptr = MapViewOfFile (gmap, FILE_MAP_READ, 0, 0, 0);
if (!ptr) MessageBox (...);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel