c# - 如何在同一解决方案中将通用 Windows 应用程序与旧版 .Net 4.5 应用程序进行实时通信。工控机?

标签 c# network-programming ipc win-universal-app uwp

我已经为此苦苦挣扎了一个多月,但正在慢慢学习。这是我所拥有的:

包含 3 个项目的 C# 解决方案

-Universal Windows Platform App (Cortana Voice Support)
::Above just shows a floating PNG image and is Cortana enabled

-Universal Windows Service (Cortana Background Service)
::Needed for the Cortana Support

-.Net 4.5 C# App with HTML DOM Automation
::Automates locating elements and clicking of a website

我无法在通用应用程序中重新编码 .Net 应用程序的功能,因为它使用的某些库无法安装。 (GhostDriver、PhantomJS 和通过 NuGet 提供的 HotKey 库。在通用平台上安装所有 3 个库均失败)。

需要什么:

-Master Universal Windows App or Service sends signal to .Net App 

-.Net App receives signal and calls method/function providing my functionality.

我从未尝试过在同一解决方案中调用其他应用程序中的方法,并且想知道是否有一些代码解决方法。我认为我需要的是一种进程间通信或事件的方法,但找不到任何 UWP 的示例。大多数是.Net 与其他较旧的非通用应用程序通信。

非常感谢!

最佳答案

如果我理解正确的话,您正在开发一个可以通过 Cortana 自动执行 DOM 操作的应用程序。

您需要将此应用程序提交到App Store吗?

如果没有,正如 Scott 所说,您可以使用 WCF 在 UWP 进程和 .NET 4.5 桌面应用进程之间进行通信。

如果是,正如安德鲁指出的那样,您需要一个托管该服务的中间远程服务器。 enter image description here

关于c# - 如何在同一解决方案中将通用 Windows 应用程序与旧版 .Net 4.5 应用程序进行实时通信。工控机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33139904/

相关文章:

c# - AspNet Core RC2 模型绑定(bind)给出空模型

c# - UWP - 获取 Windows::UI::Xaml::Controls::TextBox.TextChanged 事件的文本更改

tcp - C++ 非阻塞 TCP 服务器无法发送比接收到的字节多的消息

c# - setter/getter setter 数组

c# - 从代码调用时的SQL存储过程参数

vb.net - .NET套接字发送和接收不匹配

go - 使用什么系统调用来获取某些 RTF_* 标志的值

c - 在 C 中 fork 后从 SHM 编辑结构中的变量

node.js - 如何修复 Electron 中的 IPC 错误 "Error invoking remote method, an object could not be cloned"?

c++ - IPC 在 Windows 上使用管道