Announcement

Collapse
No announcement yet.

Share asciiz string between 2 EXEs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Share asciiz string between 2 EXEs

    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.
    Thank you,
    Ryan M. Cross

  • #2
    Never mind I found a better way to do what I wanted to do. Thanks anyways.
    Thank you,
    Ryan M. Cross

    Comment


    • #3
      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
      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        I don't know what better way you found whilst I was typing, but it might be nice to share it.

        MCM
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X