Data transfer between VB6 application and .Net application

I need to transfer data between a vb6 application and a .net application. This data will either be written or read every second. These are about 30 fields. Both applications are on the same computer. I am currently passing this data through the registry and it works great, but I'm a little nervous. I would do this with a text file, but I'm worried about data loss.

What is the best way to do this?

+4
source share
4 answers

Common rear end? Yes, the registry works, the text file will work, but in a multi-user environment, you better work with a database (for example, MS Access or SQL Server).

+1
source

I would recommend using some kind of RPC process to exchange information if you want to do it easily.

The simplest one will probably be XML-RPC

VB6 and .Net seem to both have the necessary libraries.

You can also connect to the same database if you are concerned about data loss.

+2
source

Actually, Mailslots work great between machines. Although they do not work well for messages containing more than 400 bytes.

DDE is still supported, and pretty fast. Maybe not .Net.

And, of course, a simple out-of-process COM is just a thin layer on top of Windows RPC.

+1
source

Choose your poison: Mailslots, memory mapped files, named pipes, sockets. There is a lot of help and code online for them.

Small messages between processes on the same computer (both Windows): Go with MailSlots.

Large blocks of data between processes on the same computer: go to memory mapped files.

Streaming messages between processes (same or different machines like Windows OS): Go through named channels.

Message flow between processes (same or different machines, same or different OS): Go with sockets.


Since you are using the registry now, perhaps Mailslots.

0
source

Source: https://habr.com/ru/post/1393399/


All Articles