![]() |
inter-program communication
hi all,
im trying to get 2 programs to communicate with each other. First thing that came to my mind is through some virtual serial port. Would that work? can i open com20 on program 1 and com20 on program 2 and simply say read write ? i would also think that windows would not allow 2 programs to open the same COM port.. thanks :-D |
Re: inter-program communication
How about using files(e.g. xml,db..etc) or the network.
|
Re: inter-program communication
hey thats a good idea. i can open 2 sockets each on the same port connecting to localhost.
but this must raise some issues with security. but i guess it could be resolved by simply blocking the port your using on the firewall. |
Re: inter-program communication
Any means of communication will have it's own security ramifications. Files are workable, but possibly less efficient (you need to somehow have a semaphore so they don't write at the same time, etc...). Sockets or named pipes would probably suit you fine, assuming you secure them properly.
|
Re: inter-program communication
Sockets would probably be the simplest solution, but another option would be to create a .DLL that mediated communication between two or more programs. Yet another solution is to dispatch messages from one program to another; these will be received and processed in the main message loop. I'm not sure how viable this is for managed code, though it's certainly possible.
|
Re: inter-program communication
Thanks everyone, After giving it some thought, using sockets to comunicate is the best solution.
This also gives me already set-up platform to expand my project from inter-program into a networked program communicating 2 different pc's on a network. its all good. cheers! |
| All times are GMT -5. The time now is 4:14 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC