Communicating between programs

OS = Windows XP
Compiler = dev-c++ V. 4.9.9.2



I am a novice programmer of Win32 using c++, and I was interested in learning how to get a win32 program to at least recieve data from another program, such as one written in Win32, Java or I suppose any language...

For example I am beginning to learn how to trade stocks online through
the brokerage firm "TdAmeritrade". TdAmeritrade's website has a java applet window available that enables you to get real time qoutes for any number of stocks. I want to write a win32 program that is able to retreive the quote data that is being displayed, and use that data for various purposes.

(Q1.) Can anyone tell me what subjects I need to study, in order to learn how to communicate data from my win32 program to another.

(Q2.) I don't know if anyone would be willing do this, but it would be very cool if some one could write a small win32 program demonsrating the functions that would allow a win32 program to recieve information from either a Java applet window or just any kind of other program.

THANK_YOU BuDdY!!!
hi matthew,

There are many ways to do this. But it depends heavily on your scenario. First of all the "thing" which you are looking for is called as SOCKETS, sockets are the mechanism, which allow one program to communicate with other, but for that both the programs must be aware of each others existance, that too while loading. sockets are, in true sense, interCommunication, but quite a tough to use, specially when it somes to two different programming languages.
All these things comes under the topic of interprocess communication.

Now a simple mechanism to do this is to use some files to store data from one program and read from the other one, but this has the drawback, that it is not on the fly sort of data transfer. Some how your sender has to tell your reciever that data is ready to be copied, for that you can use SIGNALS.

Another advanced method is to use interOperating system calls, like CORBA IIOP, CORBA takes care of language independence. It also gives you functionality to have your c++ object on one machine and java object on another. You have to make the sender as a server (java object) and reciever as a client(C++ object).

If its is just a matter of one win32 program to another win32 program, then u can use SHARED MEMORY, instead of SOCKETS. In case it is a java object, then you can write a JNI to communicate with a win32 program. JAVA sockets are also available.
In linux you have something called as Named Pipes, that also allowes you to do interprocess communication.


Last edited on
I really question if you can get information from an java applet that is just displaying information on a web page though win32 unless the applet is taking request for that information.
Last edited on
precisely true, if that applet is not serving the request , u can't . For two programs to communicate, it is very much required that both of them must know about each others existance. I made a misinterpretation that both are written by you. Now if that is not the case, it is actually impossible to do, except you go for image recognition :) .
Now to me it seems that you are looking at wrong facet. Things like this, stock trades, news etc, where there is some dynamic content is displayed, and "THEY WANT TO USER TO ACQUIRE THE INFO PROGRAMATICALLY" , they generally have an implementation of "RSS FEEDS" or (the latest) WEB-SERVICE. Through which you can query their system to fetch information. In case you are looking for any of these stuffs, tell me, i can help you.

It is not a matter of interprocess communication at all.

If it is not parellel to what you are looking for then gimme some more explanation then.
Last edited on
Hello a n chatterjee. I had originally posted here because I simply
wanted to write a program that could retrieve stock quote data from
a java applet window and tell me how many shares to buy for a given
investment amount at any given moment the stock price changes. So,
I don't suppose that I need any particular info about rss feeds or
web-services, but thanks for offering!

The second reason I originally posted here was because I have
looked on amazon.com, borders, barnes and Noble, and my local
libraries, and I have only found a hand full of books that teach
Win32 programming with c++. So it is difficult for me to learn
win32, or even know what topics I should study, such as systems programming.

Any way, let me just ask.

(Q1.) Where are all the win32 books at?

(Q2.) What are the names of some good win32 books that are avialable?

(Q3.) Does the subject of systems programming usually cover the
different methods for interprocess communication?


And finally thank-you for considering my post!!!
Last edited on
Com is also capable to achieve it.
Topic archived. No new replies allowed.