Is it possible to share an asciiz string between two EXEs? I want both EXEs to be able to read and write from the same asciiz string in memory.
Announcement
Collapse
No announcement yet.
Share asciiz string between 2 EXEs
Collapse
X
-
You can create a shared memory object using a memory-mapped file object.
Here is a very old demo showing multiple EXEs shareing the same block of memory, and it even "locks" the record when in use and other users (EXEs) wait until its available.
Win32: Memory Mapped Files/Control User Count April 26, 2001
The "block of memory" can be a (ASCIIZ) string instead of a UDT, although it might port more easily if you just make it...
Code:TYPE TheMemoryObject sz AS ASCIIZ * %DESIRED_LENGTH END TYPE
Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
-
I don't know what better way you found whilst I was typing, but it might be nice to share it.
MCMMichael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
Comment