应用程序内部通信+ C#,Win32 API [英] intra-applications communication + C#, Win32 API

查看:101
本文介绍了应用程序内部通信+ C#,Win32 API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hello All,

Hello All,

我是C#开发人员,要求是调用Java / Win32 / Web使用C#编程的应用程序和我应该能够访问(读/写)Java应用程序的控件。例如,假设有一个Java应用程序通过在搜索文本框中输入产品名称然后点击"GO"来搜索产品
。按钮。我必须使用C#(WinForm)应用程序以编程方式执行这些步骤。第三方可执行文件可以用Java或.NET开发。请向我提供
解决方案/指南。

I am a C# developer and the requirement is to call Java/Win32/Web applications programmatically with C# and I should be able to get access (read/write) to the controls of Java application. For example, suppose there is a Java application that searches for a product by entering the product name in the search textbox and then by hitting "GO" button. I have to do the steps programmatically with C# (WinForm) application. The 3rd party executable could be developed either in Java or in .NET. Please provide me with the solutions/guidelines.

我已经google搜索并发现WCF可能是两个或多个自行运行的应用程序之间进程间通信的不错选择过程。

I have googled and found that WCF could be a good choice for inter-process communication between two or more applications running in their own processes.

但我需要了解一些事情才能与某些Windows进程中运行的应用程序进行通信。据我所知,接收端必须能够接收和解析XML消息。但在我的情况下,接收端将是
一个可执行应用程序,它不会暴露任何API以便与自己交谈。它可以是任何其他桌面应用程序(在.NET或Java上开发)。唯一的区别是它将在某些Windows进程中运行,并且对用户不可见。但是前端桌面应用程序必须可以看到
(将在WPF或WinForm中的.NET Framework中开发),以便它可以从Windows进程中运行的应用程序中获取一些数据和/或更新从前端应用程序到
后台应用程序的一些数据。

But I need to understand a few things in order to communicate with the applications that are running in some Windows process. As far as I know the receiving end must be able to receive and parse the XML message. But in my case, the receiving end will be an executable application that doesn't expose any API in order to talk to itself. It can be any other desktop application (developed on .NET or Java). The only difference is that it will run in some Windows process and will not be visible to user. But it must be visible to a front-end desktop application(will be developed in .NET Framework either in WPF or in WinForm) so that it could fetch some data from the applications running in the Windows process and/or update some data from the front-end application to the background applications.

例如,如果我谈论获取数据,那么可能有以下步骤:

For example, if I talk about fetching of the data then there could be the following steps:

(假设第三方应用程序搜索产品并提供更新某些数据的能力。)

(Assuming the 3rd party application searches for a product and provides the ability to update some data.)

1)前端应用程序将启动产品应用程序说内存中的Java桌面应用程序(对用户不可见)

1) Front-end application will launch the product application say Java desktop application in memory (invisible to users)

2)前端应用程序将向内存中运行的Java应用程序提供登录凭据(如果有)

2) Front-end application will supply log-in credential (if any) to the Java application running in the memory

3)前端应用程序将产品ID提供给Java应用程序中的产品搜索文本框,然后单击"搜索"按钮。 (对用户不可见)

3) Front-end application will supply the product id to the product search text-box in the Java application and will click the Search button. (not visible to the user)

4)前端应用程序将读取搜索结果的控件,然后将从结果集中读取相关数据并将呈现在前面-end application的表格。

4) front-end application will read the controls of the search result and then will read the relevant data from the result-set and will render to the front-end application's form.

同样,要更新一些产品细节:

Similarly, to update some product detail:

1)用户将在前端应用程序中输入修改后的产品详细信息。

1) User will enter the modified product detail in the front-end application.

2)在前端应用程序中单击"修改"按钮后,单击事件会将修改后的数据写入内存中的产品应用程序,然后将触发相应的事件。 Java应用程序,以便更新主
应用程序中的数据。

2) On the click of Modify button in the front-end application, the click event will write the modified data to the product application in the memory and then will fire the appropriate event in the Java application in order to update the data in the main application.

提前致谢!

推荐答案

>应用内通信[...] 我必须使用C#(WinForm)应用程序以编程方式执行这些步骤。第三方可执行文件可以用Java或.NET开发。请向我提供解决方案/指南。
$


$
看一下
选择运输
 和
系统提供的绑定
 (WCF)。

 

 

> intra-applications communication [...]  I have to do the steps programmatically with C# (WinForm) application. The 3rd party executable could be developed either in Java or in .NET. Please provide me with the solutions/guidelines.


take a look at the Choosing a Transport and System-Provided Bindings (WCF).
 
 


这篇关于应用程序内部通信+ C#,Win32 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆