Important alert: (current site time 7/16/2013 3:11:14 AM EDT)
 

article

Easy COM based Multichannel Dynamic Data Exchange (DDE) Between Apps - With InterCommVB II (Updated)

Email
Submitted on: 8/1/2001 11:48:47 PM
By: Srideep Prasad  
Level: Advanced
User Rating: By 132 Users
Compatibility: VB 5.0, VB 6.0
Views: 52658
(About the author)
 
     Learn a new method of dynamically exchanging data between apps - with InterCommVB II. With unparalled power and ease of use, InterCommVB truly allows you to get the max output from minimum code. So you no longer need to tamper around with DDE APIs and other hard Win32 APIs. InterCommVB truely makes implementing DDE a breeze - even a beginner could be implementing DDE with this component. The package also includes an HTML file to help you understand the concepts better, in case you are a newbie ! This version is updated to include a host of new features !

This article has accompanying files

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
				




What is Interprocess Communnication


What is Interprocess Communnication(IPC)

IPC is a technology that enables two or more running apps to exchange data dynamically with each other

InterProcess Communication - The Problems
Microsoft Windows comes with a variety of ways to implement Inter Process Communication (IPC). Notable among these are the Dynamic Data Exchange (DDE) APIs, Mailslots and Pipes.


DDE allows applications to communicate with each other dynamically. But implementing DDE is no easy job - the DDE APIs tend to be highly complicated and difficult to implement, especially for the VB programmer.
MailSlots and Pipes are basically technologies wherein virtual temp files are created in the RAM and can be used by apps to store shareable data. This technique does not tend to be straightforward either and these methods by itself do not provide notification mechanisms !
Of course, you could use temp files, but this method is cumbersome and slow... Then how do we implement Inter Process Communication (IPC) ? Simple - We harness the potential of Microsoft's powerful COM based ActiveX Technology !

Easy and Efficient Interprocess Communication (IPC) with InterCommVB 1.00
InterCommVB allows developers to implement IPC very easily. With just a few easy to understand calls to this component from the client and server sides, one can efficiently implement easy and effective interprocess communication
What's more - InterCommVB allows multiple data communication channels to be open and for one channel say if App A is the Server App and if App B is the Client then for another channel App A could act as the Client and App B could act as the server ! That's truly two way communication ! And of course, this ActiveX EXE comes with an inbuilt notification system that notifies both the server and client sides of the data transmission status ! What's more - this component is multithreaded, that is if one communication channel is blocked or busy, other channels remain unaffected. And the component now implements real time asynchronous communication, so no more worries about the server app getting "stuck" waiting for the client app to process transmitted data. This component now also defines an updated internal error handling interface...
IF YOU FIND IT USEFUL, PLEASE VOTE. THANK YOU !




winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.


Other 8 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Advanced category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

8/3/2001 5:39:34 AMSrideep Prasad

Though many authors may sell of their code as shareware I believe in giving them free. Therefore, if this code is of use to you,please vote ... Thank you !
(If this comment was disrespectful, please report it.)

 
8/3/2001 1:55:38 PMnetkarma

Your article and code seem to be convincing...one question though, can it be used to communicate with any existing app on the system? eg: My VB app needs to communicate with Netscape Navigator and issue certain commands at run time...
Your response is greatly appreciated.
Good code, nonetheless,

(If this comment was disrespectful, please report it.)

 
8/3/2001 10:58:49 PMSrideep Prasad

netkarma - I will reply to your querry personally by e-mail

(If this comment was disrespectful, please report it.)

 
8/4/2001 3:55:05 AMJon

I have a situation where I already use an ActiveX EXE to communicate between different threads. One of the problems I encountered was not being able to transport UDT's between client and server as they are not allowed in public methods. Would you see this as a problem for your implementation?
(If this comment was disrespectful, please report it.)

 
8/5/2001 9:50:42 PMSrideep Prasad

Jon, I have personally replied to your querry by e-mail
(If this comment was disrespectful, please report it.)

 
8/7/2001 2:36:16 AMMatrix

Like netkarma, I'd like to know if that is possible to communicate with existing programs. can you also reply to me personnaly?
(If this comment was disrespectful, please report it.)

 
8/7/2001 11:55:58 AMSrideep Prasad

Matrix - I have send a personal reply to your question by e-mail.Hope you find it useful !
(If this comment was disrespectful, please report it.)

 
8/8/2001 9:39:54 AMVerburgh Peter

Nice , it als getting better and better!
i've thaught i've already voted , but wrong.. so you get now 5 globel !
Keep up with the updates !
Peter Verburgh
(If this comment was disrespectful, please report it.)

 
8/8/2001 9:44:36 PMSrideep Prasad

As the author, I thank all of you personally for your tremendous reponse to my effort ! Thank You !
(If this comment was disrespectful, please report it.)

 
8/9/2001 2:10:49 PMAct

Please let me know how can I communicate with existing application
i.e. send command/data to existing application?
(If this comment was disrespectful, please report it.)

 
8/9/2001 2:22:38 PMahp

Like other users, I'd like to know if that is possible to communicate with existing programs?.
Normally using DDE I will have to specify a
(If this comment was disrespectful, please report it.)

 
8/9/2001 10:15:29 PMSrideep Prasad

Ahp, Act - Check your e-mail. I have replied to you personally by e-mail

(If this comment was disrespectful, please report it.)

 
8/9/2001 10:15:36 PMSrideep Prasad

Ahp, Act - Please check your e-mail. I have replied to you personally by e-mail

(If this comment was disrespectful, please report it.)

 
8/12/2001 4:30:12 AMfrank

why not just post your
(If this comment was disrespectful, please report it.)

 
8/12/2001 6:35:13 AM________

Great code. 5 blobs from me.
(If this comment was disrespectful, please report it.)

 
8/12/2001 9:31:35 PMTigger

Neat - interesting code (gave you 5 blobs). Question for you tho': I am only able to open 1 client & 1 server (at least thru the demo's). Is this a limitation or can you have multiple clients per server?

T
(If this comment was disrespectful, please report it.)

 
8/12/2001 10:24:03 PMSrideep Prasad(author)

Tigger - There is a way round your problem which I have mailed you by e-mail.Hope you find it useful
(If this comment was disrespectful, please report it.)

 
8/13/2001 2:33:07 AMGremio

I was wondering if you knew a way I could get information from current programs ones that I did not create
thank you ---
(If this comment was disrespectful, please report it.)

 
8/13/2001 3:43:40 AMARAM

VERY GOOD CODE! I've read your previous submission about miltithreading in VB using ActiveX EXE - that was a VERY STABLE solution, too! I rated your submission 5 globes, I feel it's not enough... I've also seen Robert Thaggard's submission about multithreading in VB using a callback DLL. His submission is, I'm not afraid of saying this, a fraud! And he even dares to say that his solution is better than yours...he's got no solution at all.
(If this comment was disrespectful, please report it.)

 
8/13/2001 11:50:04 AMVrej

I have a situation where I already use an ActiveX EXE to communicate between different threads. One of the problems I encountered was not being able to transport UDT's between client and server as they are not allowed in public methods. CAN YOU PLEASE FORWARD ME THE EMAIL YOU SENT TO JON? ALSO, I HAVE TRIED A WORKAROUND BY USING A CLASS WITH PUBLIC VARIABLES INSTEAD OF A UDT, BUT IT BECOMES A PROBLEM WHEN I HAVE TO RETURN AN ARRAY OF CLASSES, AND IM RETURNING IT TO ASP!!
(If this comment was disrespectful, please report it.)

 
8/13/2001 9:45:06 PMRoy

just want to know if this can be done with the client and server are in different PCs on a network?, I already voted it to the max. Just want to ask it again.
(If this comment was disrespectful, please report it.)

 
8/13/2001 11:44:49 PMSrideep Prasad

VRej, I have a solution based on the CopyMemory API. Check out your e-mail. I have mailed you the solution
(If this comment was disrespectful, please report it.)

 
8/14/2001 10:11:59 AMJuan Martin Diaz

I want to know how to do it on a network too please!
And with other installed apps.
(If this comment was disrespectful, please report it.)

 
8/15/2001 9:42:03 AMMussel

I gave you 5 blobs also - ease of use is a great plus. Have you ever tried to make 2 way peer-to-peer communicaiton out of it? I'd be interested.
(If this comment was disrespectful, please report it.)

 
8/15/2001 10:30:58 AMUltimatum

There is a way to perform inter-process communication over a network (and even over the Internet if you know how), but I'm afraid it requires the use of mailslots.
(If this comment was disrespectful, please report it.)

 
8/15/2001 1:25:07 PMSrideep Prasad

I will reply to all your querries by e-mail soon. I think the suggestion of Ultimatum, about using mailslots is feasible, but as he said, it may be a bit inconvinient
(If this comment was disrespectful, please report it.)

 
9/20/2001 11:09:54 AMJoe Fuentes

I would love to get the answers to most of the questions asked could you send them all to me too it looks great.

(If this comment was disrespectful, please report it.)

 
9/22/2001 3:12:27 AMElctriX

I'd like to know if that is possible to communicate with existing programs. can you also reply to me personnaly? I give you 5 globes.
(If this comment was disrespectful, please report it.)

 
9/25/2001 4:52:48 AMMohan

Nice code, 5 Globes....
can u give any practical example where we can implement this concept.

(If this comment was disrespectful, please report it.)

 
9/27/2001 5:00:35 AMAnDy2552

can it be used to communicate with any existing app on the system?
(If this comment was disrespectful, please report it.)

 
9/27/2001 5:02:09 AMAnDy2552

can it also communicate with another app residing on another peer computer application??
(If this comment was disrespectful, please report it.)

 
9/27/2001 12:39:21 PMROtt

How 'bout making your replies about other Apps and networking public? Thanks for sharing the code!!!
(If this comment was disrespectful, please report it.)

 
9/27/2001 4:35:54 PMraf

Hey, good job so far..... but what if you want to transmit other data then strings (for instance COM Objects)? Another thing, what if you want one server to transmit to multiple clients? I was not able to start multiple clients at the same time.
(If this comment was disrespectful, please report it.)

 
9/28/2001 11:42:42 AMSrideep Prasad

Please note that InterCommVB uses a entirely new method of performing DDE and it is not compatible with
(If this comment was disrespectful, please report it.)

 
9/28/2001 4:41:03 PMMr_puniverse00

I know that this has been asked before, but could you please e-mail about how to communicate with existing apps too?
(If this comment was disrespectful, please report it.)

 
9/29/2001 6:19:39 AMAlkanMM

I too would like to compliment you on providing the code (5 globes). How about transferring COM objects amongst multiple clients? I'm anticipating a FAQ sometime soon.
(If this comment was disrespectful, please report it.)

 
9/29/2001 6:21:19 AMAlkanMM

5 Globes for sharing great code! How to send COM objects to multiple clients? I'm anticipating a FAQ soon......
(If this comment was disrespectful, please report it.)

 
10/1/2001 4:15:08 AMVictor

The most elaborate shared code in this domain I have seen so far. But please, instead of replying personally to questions or suggestions posted here, why not just post here the new improved versions ? This behaviour I don't understand at all... 5 rounds from me.
(If this comment was disrespectful, please report it.)

 
10/1/2001 7:02:13 AMSridee Prasad

As I have said before (few comments earlier), InterCommVB II's DDE techniqes are entirely novel and cannot be used with existing apps that implement
(If this comment was disrespectful, please report it.)

 
10/1/2001 7:04:20 AMSrideep Prasad

InterCommVB's DDE techniques cannot be used for communication with existing apps that implement "standard" DDE techniques.Also it has not been designed to be implemented on a network.
(If this comment was disrespectful, please report it.)

 
10/23/2001 5:13:25 AMZee

This is great!!! 5 Globes from me..
(If this comment was disrespectful, please report it.)

 
11/28/2001 6:49:21 PMPeter Verburgh

This is great ,
now i have the time to study and look at your project.
i hope you know me .. Net Watch V2.1 ?
My question is can i mail you personally , if i have some little questions about this great communication between 2 apps ?
If so , then i will tell you what i want to program ,
my email: peter.verburgh2@yucom.be

Greetings,
Peter.
(If this comment was disrespectful, please report it.)

 
1/8/2002 12:17:25 PMMirco

Hi,
I'am an italian students, and i'm trying to use InterCommVB in my Thesys Project, for allow DDE comunication between VB application.
I think IntercommVB is fantastic, but i had some problem when i whant to close the channel from the server.

In the API i see that in IServer.disconnectfromchannel there isn't the parameter channelID
so i'm not able to disconnet the server from the channel, to allow other application to connect in the same channel

There is an error in the library? I'm in error in using it?
Have you had similar problem?

Thank'you

PS: sorry for my orrendus english :)


(If this comment was disrespectful, please report it.)

 
1/8/2002 9:39:15 PMSrideep Prasad

Micro, There's no error in the library. This ChannelID parameter is not required to disconnect from a channel since InterCommVB internally keeps track of the channel id. I will clear your doubts with a better explanation which I shall send via e-mail
(If this comment was disrespectful, please report it.)

 
2/19/2002 1:01:56 AMJoel Konecny

good job on the project... i gave you 5 globes although that was not completely my decision ;)... i am gonna have to remember that little trick you pulled. i would have givin you 5 globes anyway, even without you trickin me into it lol... good job.
(If this comment was disrespectful, please report it.)

 
4/24/2002 8:29:39 AMpHroZeN GeeK

Thanks for the cool code man!!! 5 globes from me... Please let me know that if this technology can be used to communicate with other existing programs like IE etc... Your reply will be greatly appreciated... One more things I wanted to ask, whats the advantage of using this VBInterComm over the easy WinSock control??? please let me know that...
Very nice code...
Regards, Ali Akbar (pHroZeN GeeK)
(If this comment was disrespectful, please report it.)

 
5/8/2002 8:32:49 AMJack

This code is awesome.

Please let me know that if this technology can be used to communicate with other existing programs
Thanks,
(If this comment was disrespectful, please report it.)

 
6/9/2002 12:08:47 PMamir reza niakan

I have worked by vb for 1 year
(If this comment was disrespectful, please report it.)

 
6/24/2002 12:18:25 PMQtronix

Quite amazed by your excellence in coding, fully documented with understandable code. Ah, so much to learn from you! :) 5 outta 5!
(If this comment was disrespectful, please report it.)

 
8/26/2002 6:07:23 PMZebo

Sorry man, but i don't think this is that good. Sure it can communicate between other apps, but only apps that you have the source code for or have this source code installed. That's easy, you can just make a file that all the other files read out of. When you think about it that's actually much easier then getting into what you have gotten into.


Now, it's still very nice. But there are easier ways.



Now, if the program could retrieve and perform events from a program that you haven't made or has this source code installed in it very easily... That would be amazing.
(If this comment was disrespectful, please report it.)

 
4/11/2003 8:15:17 AMThomas Sturm

Hello Srideep!
this is one of the very rare examples of excellence on PSC. Just for ideas like that, properly coded, it´s worth having this site - even if most comments suggest that not many people know what it´s all about ;-)
Thank you very much for this contribution - and another 5...
(If this comment was disrespectful, please report it.)

 
5/8/2003 12:35:28 PM

I'm interested in knowing if this would work with other windows Apps?
(If this comment was disrespectful, please report it.)

 
5/8/2003 12:36:08 PM

Please I'm also interested in knowing if this works with other windows Apps
(If this comment was disrespectful, please report it.)

 
9/27/2003 6:37:35 AM

Good stuff! - 5 from me!
(If this comment was disrespectful, please report it.)

 
3/2/2005 10:41:09 AM

Please I'm also interested in knowing if this works with other windows Apps.

(If this comment was disrespectful, please report it.)

 
5/27/2005 5:21:48 AMPhishbowla

I'd like to know if it is possible to communicate with existing programs. Could you please reply to me as well? Thank you.
(If this comment was disrespectful, please report it.)

 
5/10/2007 11:59:30 AMKhan

Hi,
Couple of questions please?
1. Do you have a .NEt version?
2. Can 2 separate apps exchange data in realtime? For example I need to exchange data from a Java app to a Billing application.
Thanks for your help!
(If this comment was disrespectful, please report it.)

 
5/10/2007 12:05:17 PMKhan

Hi,
Can you interact with Programs that you don't have Source code for?
Thanks,
(If this comment was disrespectful, please report it.)

 
11/22/2007 6:56:40 AMRajeev

Hi Srideep!
My Server application processing and communicate results to client application it possible to communicate objects while communicating using your method?
(If this comment was disrespectful, please report it.)

 
11/22/2007 7:21:10 AMRajeev

Is it possible to have Multiple clients for one server?
(If this comment was disrespectful, please report it.)

 
8/21/2010 8:02:03 AMPioneer Soft

Hey Can You Tell Me If I can Use it To Communicate Between Applications on Different Computers in a Network...
I would Really Appreciate Your Response...
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.