Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sharing Data Between Processes Using Memory-Mapped Files
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00441972
Message ID:
00442482
Views:
8
>What would I get from using this? A way to send a ton of information to another instance of VFP?
>

Memory-mapped files provide a way to share portions of an address space between processes by mapping the address space into a virtual file which is shared by all. It's doable even without C code; I've implemented it before using ClsHeap and a few API calls.

It does not share VFP memvars/objects across processes - it maps static blocks of memory which must remain unmanged by VFP, since VFP will shift them around in the memory space at will, so you need to move things in and out from the buffers. It offers few advantages for VFP apps over other IPC/RPC mechanisms like COM and DDE which are implemented in the base language and can respond asynchronously to messages; you need to poll and examine the file mapping to discover that new data is present.

If you want to investigate this in detail, Jeff Richter covers it extremely well in his book "Advanced Windows".

>>We use this technique with a C++ dll, here is a Visual Foxpro example:
>>http://support.microsoft.com/support/kb/articles/Q188/5/35.ASP
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform