问题描述
我这里有一个不寻常的项目.我目前正在维护一个根源一直到Windows 1.0的系统.它起初是用C编写的一组程序,所有程序都通过共享的DLL(在Win16中)相互通信.然后在90年代的某个时候,他们决定为它提供更好的用户界面,但是没人愿意用C编写一个用户界面,因此他们采用了一些VB支持程序. VB程序当前都是VB6.
我被带去修复错误/不完整的32位转换.转换使进程间的通信从复杂变为拜占庭.我已经说服他们,重写是他们未来的最佳途径.
但是,重写将分阶段进行,首先将C程序替换为单个现代EXE(以本机C ++编写).至少对于前几个版本,新的C ++程序仍将需要与至少一个VB程序进行通信.
现在,VB通讯是使用DDE完成的,其C端又庞大又复杂.我正在寻找更好的交流方式,并发现了这篇文章:
VC ++& VB进程间通信加VB子类介绍 [ ^ ]
他讨论了如何在VB6程序和C ++ DLL之间进行通信.是否可以在C ++ EXE和VB6 EXE之间执行此操作?我已经做了相当多的C和C ++编程(Windows以及其他OS),但是只有少量的VB程序,这是我第一次不得不处理与另一个程序进行通信的VB程序. .我可以找到的所有示例都在VB和DLL之间.
预先感谢,
Bill
I have a sort of unusual project here. I am currently maintaining a system with roots all the way back to Windows 1.0. It started out as a suite of programs written in C that all communicated with each other through a shared DLL (in Win16). Then sometime in the 90s they decided to give it a better user interface, but nobody wanted to write one in C, so they tacked on some VB support programs. The VB programs are currently all VB6.
I was brought on board to fix a botched/incomplete 32 bit conversion. The conversion took the inter process communication from complex to byzantine. I have convinced them that a rewrite is their best path for the future.
However, the rewrite is going to be done in stages with the C programs getting replaced with a single modern EXE first (written in native C++). At least for the first few versions the new C++ program will still need to communicate with at least one VB program.
The VB communication now is done with DDE and the C side of it is huge and complex. I''m looking into better ways to do the communication and came across this article:
VC++ & VB Inter Process Communication Plus Introduction To VB Subclassing[^]
He discusses how to communicate between a VB6 program and a C++ DLL. Is it possible to do this between a C++ EXE and a VB6 EXE? I''ve done a fair bit of C and C++ programming (Windows as well as other OSs), but only a little VB program and this is the first time I''ve ever had to deal with a VB program communicating with another program. All the examples I can find are between VB and a DLL.
Thanks in advance,
Bill
这篇关于VB/C ++进程间通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!