Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Interprocess communication

Interprocess communication

Scheduled Pinned Locked Moved C#
csharpc++regexperformancetutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ExcellentOrg
    wrote on last edited by
    #1

    How to make one DLL communicate (tap into data) with another DLL in runtime which will be linked to a different executable. Both DLLs are being written by me. The source DLL (one that obtains data) is 99% completed and it is regular .NET C# class library and it gets used by executable A.EXE. Source DLL reads from Socket so once it reads the data, it is gone from Socket, so entry class is implemented using Singleton pattern (private constructor + reference to self + static public accessor) The new DLL is going to be in C++ (with its public functions all extern "C") and it gets loaded into memory by a legacy application that looks at same data differently. Both DLLs cannot be kept in same folder and Source DLL cannot be loaded multiple times...

    ---- Did Microsoft finally solve the DLL Hell?

    Richard Andrew x64R J 2 Replies Last reply
    0
    • E ExcellentOrg

      How to make one DLL communicate (tap into data) with another DLL in runtime which will be linked to a different executable. Both DLLs are being written by me. The source DLL (one that obtains data) is 99% completed and it is regular .NET C# class library and it gets used by executable A.EXE. Source DLL reads from Socket so once it reads the data, it is gone from Socket, so entry class is implemented using Singleton pattern (private constructor + reference to self + static public accessor) The new DLL is going to be in C++ (with its public functions all extern "C") and it gets loaded into memory by a legacy application that looks at same data differently. Both DLLs cannot be kept in same folder and Source DLL cannot be loaded multiple times...

      ---- Did Microsoft finally solve the DLL Hell?

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      You can use File Mapping[^] to share data between processes. If you simply want to send messages from source to sink, you could alternatively use Named Pipes.[^] I believe the .NET Framework contains classes for each of these objects.

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      • E ExcellentOrg

        How to make one DLL communicate (tap into data) with another DLL in runtime which will be linked to a different executable. Both DLLs are being written by me. The source DLL (one that obtains data) is 99% completed and it is regular .NET C# class library and it gets used by executable A.EXE. Source DLL reads from Socket so once it reads the data, it is gone from Socket, so entry class is implemented using Singleton pattern (private constructor + reference to self + static public accessor) The new DLL is going to be in C++ (with its public functions all extern "C") and it gets loaded into memory by a legacy application that looks at same data differently. Both DLLs cannot be kept in same folder and Source DLL cannot be loaded multiple times...

        ---- Did Microsoft finally solve the DLL Hell?

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        ExcellentOrg wrote:

        How to make one DLL communicate...Source DLL reads from Socket

        As a wild guess - use a socket.

        A 1 Reply Last reply
        0
        • J jschell

          ExcellentOrg wrote:

          How to make one DLL communicate...Source DLL reads from Socket

          As a wild guess - use a socket.

          A Offline
          A Offline
          AeroClassics
          wrote on last edited by
          #4

          @ExcellentOrg despite the tone both answers are correct. And you may have long ago solved this problem .... especially since so much time has passed. Me, I would probably go with the TCP/IP solution for no better reason than one is essentially a server the other a client and as long as you which starts when that should be easy. Named pipes seem to be very cool and work really well in a 1:1 application. Doug

          I am a Traveler of both Time and Space

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups