I am using file mapping to get text from a file and I am having problems with the file mapping over writing my other variables in my program.  How would I fix this?  Below is my current code.
mov hFile,eax
invoke GetFileSize,hFile,0
mov FileSize,eax
invoke CreateFileMapping,hFile,0,PAGE_READONLY,0,0,0
mov hMap,eax
invoke MapViewOfFile,hMap,FILE_MAP_READ,0,0,0
mov hMapView,eax
invoke UnmapViewOfFile,hMapView
invoke CloseHandle,hMap
invoke CloseHandle,hFile

Posted on 2009-03-14 11:42:39 by antihaxer
Your code looks correct (except that lack of error checking ;) ).

Can you post a small complete (assemblable) program snippet that demonstrates the problem?
Posted on 2009-03-14 13:12:29 by f0dder
Nevermind.  I thought it was the file being mapped that was corrupting my buffers but it was another piece of code.  Thanks for taking a look though.
Posted on 2009-03-14 13:56:30 by antihaxer