Reputation: 1
is it possible to get value from application 1.exe and passing those values to application 2.exe using C#...? like application 1.exe is in running mode while application 2.exe also running. Now suppose I want to pass some data from application 1.exe to application 2.exe without manual data entry. Is it possible to do so in automated mode using C#..?
Upvotes: 0
Views: 138
Reputation: 2535
There are plenty of ways to achieve it using IPC's mechanism. But you haven't state if the two applications will be running in same machine or not?
Below are the list that could be used to achieve your goal.
Upvotes: 0
Reputation: 359
You MAY use MemoryMapping so one application write data with identificator to RAM and other reads it, more info available here: Memory-Mapped Files
It's one of easiest ways.
Upvotes: 0
Reputation: 2891
What you are describing is known as interprocess communication (IPC). There are plenty of communication approaches, which one you should choose basically depends on factors as decoupling in time, synchronization and space (i.e. their properties).
There exist whole courses about these approaches and their benefits/disadvantages. As pointed out in comments I guess this subject is too broad for SO.
A quick word :
Different approaches have different properties.
An example :
Approach : Message Queue
Assumptions : Communicating parties enqueue/dequeue messages
Properties : Decoupled in time (message queue is always there, communicating parties can be online/offline),
decoupled in space (communicating parties only know the message queue),
decoupled in synchronization? (depends on implementation, e.g. blocking
dequeue
on empty queue).
Java offers the Java Message Service (JMS) which really supports a lot of approaches, I guess there must be C# equivalent.
Upvotes: 2
Reputation: 984
Memory maps are one way. Named and unnamed pipes are another. You could even, if you wanted a more "quick and dirty" way, write to file with one and read it with the other. There are a few ways. But I would prefer named pipes out of all of these options.
Upvotes: 0