简体   繁体   English

如何使用IPC将数据从ActiveX对象传递到VB6应用程序-(单个实例应用程序)?

[英]How to use IPC to pass data from ActiveX Object into a VB6 application - (Single instance application)?

I have created an ActiveX dll (object). 我创建了一个ActiveX dll(对象)。 I am calling the object from JavaScript in the IE browser. 我正在IE浏览器中从JavaScript调用对象。 The object has a method named "run" which launches a VB6 application and passes a parameter to it. 该对象具有一个名为“ run”的方法,该方法启动VB6应用程序并将参数传递给它。 To create the ActiveX object I have referred to this link . 为了创建ActiveX对象,我已经引用了此链接

I am calling this script on click of URL in browser. 我在浏览器中单击URL时会调用此脚本。 The problem is that onclick the URL a new application launches every time. 问题在于onclick URL每次都会启动一个新应用程序。 Instead, I would like to use IPC (inter process communication) so that I can check via JavaScript if the application is already launched and pass the parameter to it using IPC (else launch and pass parameter to it). 相反,我想使用IPC(进程间通信),以便可以通过JavaScript检查应用程序是否已启动,并使用IPC将参数传递给它(否则将启动并传递参数给它)。 The VB6 app will then need to be programmed in such a way that it is capable of accepting parameters. 然后将需要以能够接受参数的方式对VB6应用进行编程。 Instead of IPC is there any other method for messaging? 除了IPC,还有其他消息传递方法吗?

Please can you guide me on this topic.. or provide with some reference articles/links/code samples 请您为我提供有关此主题的指导。或提供一些参考文章/链接/代码示例

Here is the answer:- http://www.hanselman.com/blog/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx 答案是:-http: //www.hanselman.com/blog/TheWeeklySourceCode31SingleInstanceWinFormsAndMicrosoftVisualBasicdll.aspx

It contains a program which passes txt file path to the application via command line and the application opens up and loads the file contents. 它包含一个程序,该程序通过命令行将txt文件路径传递给应用程序,并且该应用程序打开并加载文件内容。 Upon running the app via command line for 2nd time using another filename as parameter, the file contents are shown in the same instance of the application. 使用另一个文件名作为参数通过命令行第二次运行该应用程序时,文件内容显示在该应用程序的同一实例中。 Cool! 凉!

However, this code is not VB6 但是,此代码不是VB6

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

相关问题 如何处理与 VB6 ActiveX dll 的对话,该 ActiveX dll 具有来自 .NET Z3055DD731D7924089A62F3 的 OCX 依赖项 - How to handle talking to VB6 ActiveX dll that has OCX dependencies from a .NET WPF application 在VB6应用程序中,ac#dll的CreateObject仅在IDE中“ActiveX组件无法创建对象”失败 - In VB6 application, CreateObject for a c# dll fails with “ActiveX component can't create object” in IDE only 迁移VB6应用程序 - Migration of a VB6 application 如何为应用程序设置单个对象实例? - How to set up a single object instance for an application? 如何在VB6中调试ActiveX dll? - How to debug ActiveX dll in VB6? 如何从 VB6 应用程序向我的 C# 应用程序发送消息 - How can I send a message from a VB6 application to my C# application 如何将参数从Web应用程序中的activex传递到exe(Windows窗体应用程序)? - How to pass parameter to an exe (windows form application) from activex in web application? 从VB6应用程序调用C#异步方法 - Calling a C# asynchronus method from a VB6 application 来自 C# 应用程序的 VB6 应用程序上的 SetParent() - SetParent() on a VB6 application from a C# app 如何使用asp.net应用程序将ADODB连接对象从VB组件传递到C# - How Pass ADODB Connection object from VB Components to C# with asp.net application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM