开发者

How to call native exe function (visual basic 6.0) From .NET (C#)?

开发者 https://www.devze.com 2023-01-14 19:27 出处:网络
We have an exe file produced by visual basic 6.0 (unmanaged exe) and a .NET .exe written with C#. How can I call 开发者_开发技巧a function in unmanaged exe (visual basic) from CLR .exe?

We have an exe file produced by visual basic 6.0 (unmanaged exe) and a .NET .exe written with C#.

How can I call 开发者_开发技巧a function in unmanaged exe (visual basic) from CLR .exe?

Thanks.


The only way I can see that working is if the VB6 executable has a COM interface, in which case you should be able to call it from a .Net app.

This article might be helpful: How To Create a DCOM Client/Server Application by Using Visual Basic


If you can modify the VB6 application, then the most obvious way is to start VB6 app via command line, pass parameters via command line and get result via exit code or via console output. The vb6 application should be modified to handle the parameters accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消