Home > Software engineering >  How to realize the communication between programs written in different languages? Practical cases
How to realize the communication between programs written in different languages? Practical cases

Time:10-02

A and B program running on the same machine, A program is A VB, program B is c #, to realize the communication between A and B program, how to do? The best hope for help, best can give a simple example, thank you very much!!!!!!!!!!

CodePudding user response:

Memory mapping, pipes, news, winsock, files, and so on more, do it yourself, have ample food and clothing - search bai

CodePudding user response:

News, simple code

CodePudding user response:

Don't understand this, just ask for help

CodePudding user response:

You visit old website, he that has a cross-process communication based on message mechanism, vb6 written, you can study, learning how to learn...

Amethyst studio: http://www.m5home.com/

CodePudding user response:

The address class, just got a job: http://www.m5home.com/bak_blog2/article/363.html

CodePudding user response:

Winsock can have compiled recently, do you have a server to a client, it is ok to send and receive, this does not distinguish between languages, can pass,

CodePudding user response:

Ok, can you pass the instance, will solve the problem is now good

CodePudding user response:

Topc008 old write you recommended that class, I see, can't read

CodePudding user response:

And running time, can only be sent once, no response after sending them

CodePudding user response:

Don't be A language code is modified to B language code busywork,
Also don't use A language code to directly invoke B language code base, this complicated things so easy to get wrong,
Just make A, B language code of input and output is redirected to A text file, or modify A, B language code let it through text file input and output,
Can easily make A, B coordination between the two languages,
For example:
A will request data written to A file a.t xt, renamed after finish aa. TXT
B find aa. TXT, read its contents, call the corresponding function, and writes the results file b.t xt, after finish delete aa. TXT, changed its name to bb. TXT
Found A bb. TXT, read the content, after finish delete bb. TXT
Above can be replaced by any kind of A language or development environment, B can be replaced by any kind of with the development of A different language or development environment,
Unless A or B does not support to determine whether A file exists, file read and write and file name,
But who can name does not support to determine whether a file exists, file read and write and file name for the development of language or development environment?

The communication methods between the temporary text file sharing this process there are plenty of advantages, compared to other method only listed below I can think of now:
Loose coupling between process,
Can be on the same machine, process, also can cross machine, across the operating system, hardware platform, and even multinational,
, convenient debugging, and monitoring, only let the third party or artificial view the temporary text files,
Switch, convenient online service, need to delete or create the temporary text files,
, is convenient to realize distributed and load balancing,
Services to provide convenient, queue, queue is full and it is almost impossible to happen (unless the hard disk space full)
DE...

"Across different languages, machine, across the operating system, hardware platform, multinational, cross *. *" this suffering,
back "exchange of information using Shared plain text file" shore!
  •  Tags:  
  • API
  • Related