|
Short story: Maps a file into your process's memory space, so you can reference it using pointer operations.
Longer description from old site: click here.
To be edited...
This sample, or the one from which it originally derived, was published (or at least peripherally mentioned) in the following article(s):
- Move Data With Memory-Mapped Files, Ask the VB Pro, VBPJ, October 1999
- Modify a Variable's Pointer, Black Belt Programming, VBPJ, July 2000
This sample uses the following API calls:
Module Library Function CFileDlg.cls comdlg32
kernel32CommDlgExtendedError
GetFileTitle
GetOpenFileName
GetSaveFileName
lstrlenCMapFile.cls kernel32 CloseHandle
CreateFile
CreateFileMapping
FlushViewOfFile
GetFileSize
MapViewOfFile
OpenFileMapping
ReadFile
UnmapViewOfFile
WriteFileCSafeArray.cls msvbvm50 VarPtr CStopWatch.cls winmm timeBeginPeriod
timeEndPeriod
timeGetDevCaps
timeGetTimeDon't see what you're looking for? Here's a complete API cross-reference.
Please, enjoy and learn from this sample. Include its code within your own projects, if you wish. But, in order to insure only the most recent code is available to all, I ask that you don't share the sample by any form of mass distribution. Download MapFile.zip, 39Kb, Last Updated: Thursday, April 29, 2004