是否可以将我的 windows 物联网应用程序转换为 dll?

Is it possible totransform my windows iot app into a dll?

我是 windows 物联网核心的新手,实际上我是 运行 它和树莓派 Pi3 我想要做的是从基于 windows 物联网核心的应用程序创建一个 .dll,并将其集成到另一个解决方案(WPF 平台)中,每当我调用 .dll 方法时,我都会从我的解决方案中获取数据到我的raspberry pi 反之亦然

实际上我对此感到困惑,没有足够的文档,我不知道这是否可能,如果是的话,如果您能提供一些链接,我将不胜感激

  • 我假定您的 WPF 应用程序 运行 在 Windows 10 台设备上。

要在 WPF 应用程序中使用 UWP API,您需要打包 WPF 应用程序 (Desktop Bridge)。

When you create a package for your desktop application, your application will get an identity and with that identity, your desktop application has access to Windows Universal Platform (UWP) APIs.

Package a desktop application by using Visual Studio

  • 如果您的 WPF 应用程序 运行 版本低于 Windows 10,则您不能使用上述解决方案。

在这种情况下,您需要分别为 WPF 和 UWP 实现网络发送和接收逻辑。比如在它们之间建立socket连接。