简体   繁体   English

COM Interop VB6 ActiveX EXE

[英]COM Interop VB6 ActiveX EXE

In my VS2012 C# project, I am wiring a code that is using VC6 composed ActiveX EXE through its auto generated assembly equivalent that, I suppose, some plumbing is done with TLBIMP.exe when it is referenced in my C# project. 在我的VS2012 C#项目中,我正在通过其自动生成的程序集连接使用VC6组成的ActiveX EXE的代码,我想,在我的C#项目中引用TLBIMP.exe时,会做一些检查。

When the code is executed I see the ActiveX EXE being launched in a separate process and is terminated upon the termination of the C# code that it is referenced from. 执行代码后,我看到ActiveX EXE在单独的进程中启动,并在引用它的C#代码终止时终止。

It seems working as I expected, but I have hard time looking for documentation from which I can rest assure that it is the correct usage of ActiveX EXE in C# project. 它似乎按预期工作,但是我很难找到可以安心使用的文档,以确保它是C#项目中ActiveX EXE的正确用法。

Can anyone give some advice? 任何人都可以提一些建议吗?

It is a good sign that you can see the process running. 这是一个很好的信号,您可以看到进程正在运行。 A very easy way to prove success and gain 100% confidence would be to add logging to your VC6 exe and examine the log to ensure it is behaving as you expect. 证明成功并获得100%置信度的一种非常简单的方法是将日志添加到VC6 exe并检查日志以确保其行为符合您的预期。 For example, if your VC6 exe receives command line arguments, you could log what they are to ensure you are correctly executing it from your C# program. 例如,如果您的VC6 exe收到命令行参数,则可以记录它们的内容,以确保从C#程序正确执行它。 If you cannot change the VC6 exe, you are left with black box testing: With specific inputs, do you get the expected outputs? 如果您无法更改VC6 exe,则需要进行黑盒测试:使用特定的输入,您是否获得了预期的输出? I suppose you could use fancier and more time consuming methods, but you might not need to if my suggestions are sufficient. 我想您可以使用更新颖,更耗时的方法,但是如果我的建议足够,您可能不需要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM