Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateFileMapping and is there a max size???

Status
Not open for further replies.

Zyrenthian

Programmer
Mar 30, 2001
1,440
US
Hi all,
I am running into some problems using CreateFileMapping. My assumption is there is a maximum size that can be created for the file that I need to adjust. CreateFileMapping works fine until i try to open a file that is 89327810 bytes. Then it just craps out. I dont understand why however since CreateFileMapping should be able to handle a 64 bit value for the file size...

i.e. low and high passed in where low = 89327810 and high = 0

Does anyone here have any past experience with CreateFileMapping? and if so could you point me in the right direction?

All that I am getting at the moment is an exception stating

An unknown error occured in an unknown file

The file does exist and the path is correct. All that is checked. The problem is on the call to CreateFileMapping.

Thanx in advance

Matt

P.S. Sorry if this post was a bit redundant... it was written up quick.

 
The right direction is creating of memory maped files. Using them you'll be able to read/write/update much more than 4Gb. Too be a litle more exactly is 4Gb * 4Bg (many hundreds ectabytes) Ion Filipski
1c.bmp


filipski@excite.com
 
I have come to find out that the actual problem with my call to MapViewOfFile. This is where the problem lies. It has no problem until the size is too large it seems. Do you have any experience with this not working???

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top