Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i want that my program communicate with other programs for example there are some programs that communicate with games make the game do something or there are some programs that make some changes in office how i can do that in C++
someone told that we can send message to some programs is that true if yes how we can do that?
Posted
Updated 31-Aug-12 22:13pm
v4
Comments
[no name] 31-Aug-12 16:19pm    
"i want that my program communicate with other programs", okay so go ahead. Did you have some sort of a question?
ZiDoM 31-Aug-12 16:20pm    
sry i correct it
[no name] 31-Aug-12 16:25pm    
Pretty non-specific don't you think? Your answer is, it depends. The other program has to be able to be communcated with to begin with. Each program could be different. Google "office automation" and you should get mountains of results on how to deal with Office.
ZiDoM 31-Aug-12 16:29pm    
of course it depends i want to know how we should start and what is the common ways to communicate with other programms
[no name] 31-Aug-12 16:32pm    
You start by doing some research. Like reading the article that CIDev kindly provided for you.

Communication between processes is a very broad and complex subject. To get started read this article[^].
 
Share this answer
 
Comments
Chuck O'Toole 31-Aug-12 18:02pm    
Good pointer, 5ed
ZiDoM 1-Sep-12 2:28am    
Thanks for your answer for researching about how to communicate i should study ipc?
BillW33 2-Sep-12 11:09am    
Yes, you should study IPC.
CIDev gave you a pointer to a great article. However, that article assumes that you know *how* the other program wants to be communicated with.

The bad news for you is that there is no *generic* nor *universal* way for one program to communicate with another. If you want to talk to a "game" and make it do something, you have to at least have the documentation / specification from the "game" developer on exactly what interface they implemented in the "game" that allows it to accept messages from external programs. Once you have that, then you can begin coding your end of that communication. Of course, once you know *how* to pass the messages, you then have to know *what* the message should contain. All of this should be in the documentation of that "game".

Further bad news is that once you figured that out for a "game", the answer for "office" will probably be completely different because it was done by different programmers with a different set of requirements for communication from external programs.

So, it seems you have a lot to research before you know how to start. Sorry for the bad news but it is sadly true that there ain't no single "magic" that will do it all for you.
 
Share this answer
 
Comments
[no name] 31-Aug-12 20:44pm    
Nice
ZiDoM 1-Sep-12 4:13am    
Thanks for your answer for researching about how to communicate i should study ipc?
Sergey Alexandrovich Kryukov 8-Nov-12 1:09am    
How else? You should study IPC, and, chances are, you also need to study sockets (which is a kind of IPC later extended to work on a network) and operation of TCP/IP. Pipes and named pipes is also good to learn.
--SA
Sergey Alexandrovich Kryukov 8-Nov-12 1:07am    
Good points, a 5.
--SA
Your question is quite vague. However, one possibility would be through the process or thread. On the other hand, it may be using scripting languages​​, see that page from manual
Extending and Embedding the Python Interpreter
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900