是否可以从本机Win32 C ++代码调用UWP C ++ / CX DLL? [英] Is it possible to call UWP C++/CX dll from native Win32 C++ code?
问题描述
我在Windows 10上运行了一个很好的'win32控制台应用程序。
I have a good-ol' win32 console application running on Windows 10.
此应用程序现在需要与与PC配对的蓝牙LE设备进行交互。在Win10上使用BLE的推荐方法是通过UWP。
This application now needs to interact with Bluetooth LE devices paired with the PC. The recommended way to use BLE on Win10 is via UWP.
我的问题是:如何从UWP dll在win32中进行交互(调用方法/接收回调)?
My question is: how can I interact (call methods / receive callbacks) in win32 from a UWP dll?
我正在寻找与win32相当的C#interop,但是对于C ++ / CX。如果这是不可能的,请提出替代解决方案。
I'm looking for an equivalent of C# interop with win32, but for C++/CX. If this is impossible, please suggest an alternative solution.
推荐答案
您好,
请阅读粘性帖子,尤其是 发布指南:主题行
标签 Windows 10 SDK和工具的已知问题 ,
并且不要忘记添加标记t o你的问题。
Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools , and don't forget add tag to your question.
等效的互操作是COM。但还有另一种称为C ++ / WinRT的方法。
阅读本文了解更多信息
The equivalent interop is COM. But there is another way called C++/WinRT . Read this article for more
这篇关于是否可以从本机Win32 C ++代码调用UWP C ++ / CX DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!