Subj : Re: Mapped view of file read error beyond 4096 Bytes To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Thu Jan 20 2005 04:16 pm Douglas Martin wrote: >#define BYTE_TO_READ 4096 /* From 0; 4095 OK, 4096 crashes */ > > // Map a view of the file for reading > lpMapAddress = MapViewOfFile( > hMapFile, > FILE_MAP_READ, > 0, > 0, > 1); <<--- map ONE byte !! > > lpMapPointer=(LPBYTE)lpMapAddress+BYTE_TO_READ; Offhand, I'd say it's because you only map 1 byte of the file. .