HOWTO: Sharing Data Between Processes Using Memory-Mapped Files (188535)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q188535 SUMMARY
While using shared tables is generally the simplest and most efficient way
to share data between two processes, it is possible to use memory-mapped
files to accomplish the same task. The following example uses the Win32
functions CreateFileMapping, MapViewOfFile and UnmapViewOfFile to use the
Windows NT pagefile as a memory-mapped file and pass a string between two
copies of Visual FoxPro.
NOTE: This example is intended for use only under Windows NT, and was
written and tested using Windows NT 4.0.
REFERENCES
Win32 SDK Help; topic: "CreateFileMapping"; "MapViewOfFile";
"UnmapViewOfFile"
For further background on the uses of memory-mapped files:
"Advanced Windows: The Developer's Guide to the Win32 API for Windows NT
3.5 and Windows 95," Jeffry Richter, Chapter 7, Microsoft Press
Modification Type: | Major | Last Reviewed: | 8/3/1999 |
---|
Keywords: | kbhowto KB188535 |
---|
|