Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is File good for Interprocess communication

Tags:

.net

I have an EXE and DLL running in different process. From DLL I have to send large of amount of data to EXE, which would vary from 50 chars to 2000 chars and more(The data is recordid of records saved in DB).

I thought about two options to do that:

  1. Using SendMessage- In which data's will be sent in batch.
  2. Use an Intermediate file to transfer data.

Can anyone list out the pros and cons of methods.

I have developed my components using C#.NET

like image 742
Karthik Avatar asked Dec 14 '25 11:12

Karthik


1 Answers

You can use a named pipe. Unless the communication between your two processes is very frequent, this will do fine, is pretty easy to configure, and is quite fast.

Another answer here suggested using shared memory as a buffer. That works too, but is likely to be more effort. It is only worthwhile if you move a lot of data between the processes.

like image 82
Ira Baxter Avatar answered Dec 17 '25 02:12

Ira Baxter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!