Is the file good for interprocess communication

I have exe and dll working in different processes. From the DLL I have to send a large amount of data to the EXE, which will vary from 50 characters to 2000 characters or more (the data is a record of records stored in the database).

I thought of two options:

  • Using SendMessage - in which data will be sent in batch mode.
  • To transfer data, use an intermediate file.

Can anyone list the pros and cons of methods.

I developed my components using C # .NET

+3
source share
4 answers

You can use a named pipe. If the connection between your two processes is very frequent, it will be fine, fairly easy to set up, and pretty fast.

. , , , . , .

+2

.

, , (Sql Server Express Compact) .

.

0

I think the Iranian named letter is probably the simplest and therefore the best solution. But most communication mechanisms, I am sure, end up in the implementation of the shared memory file. If you want to feel the pain, .NET 4 supports memory mapped files . Hope this link is helpful.

0
source

Source: https://habr.com/ru/post/1749884/


All Articles