Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InterProcess Communication

Status
Not open for further replies.

josecarlo

Programmer
Aug 22, 2000
30
0
0
PE
How can I interchange real-time information between two applications, one in VB and the other in VC++?. Is it possible to use COM to do it?
Thanks for your help.

JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
Yes, COM is highly recommended to use there. Ion Filipski
1c.bmp


filipski@excite.com
 
Ok thanks for your confirmation, but what can you tell me where to find some sample code? I think I need a little more help.

JOSE CARLOS ARAMBURU

JOSE CARLOS ARAMBURU
josecarloaa@hotmail.com
 
You can use Win32 API from VB.
From VC++ you can always use Win32 Api
 
I have found named pipes to be very useful in this circumstance. I confess I've done far more C++ than Vb code, however. Using a blocked-read thread on each end of the pipe is a very simple model which allows you to hang on a read until data arrives or the pipe goes away. You then simple stage the data and fire an event to allow its processing.

You could also use sockets, if you want to do the extra work, since both environments have extensive support in that area.

While COM would strike me as the "best" method (architecturally) of handling your communication requirements, be aware that there are other very simple methods available that work very well. It all depends on how reusable you want the end product to be.
 
COM is working as medium between 2 processes of VB and VC . If your both the processes are on VC++ technology there are several other sample codes you can find in msdn on both MFC/SDK...
Best and easiest is memory mapping a file stuff
All the best
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top