如何在通用Windows平台应用程序中调用C函数? [英] How to call C function in universal windows platform app?
问题描述
我使用Universal Windows Platform for GUI编写Windows应用程序。但目前应用程序需要调用用ANSI C编写的库中的某些函数。
我尝试过的方法:
我搜索过,但我发现只有C ++
用C ++创建一个基本的Windows运行时组件从JavaScript或C#调用它 - UWP app developer | Microsoft Docs [ ^ ]
其他方法是将C ++代码构建为静态/动态库(.lib / dll)并包含在UWP项目中。
可能与ANSI C相同。
我该怎么做?如果有一个显示如何执行此操作的链接,这将非常有用。
谢谢。
I writing a windows app using Universal Windows Platform for GUI. But current the app need to call some functions in a library that is written in ANSI C.
What I have tried:
I have searched, but I found only for C++
Creating a basic Windows Runtime component in C++ and calling it from JavaScript or C# - UWP app developer | Microsoft Docs[^]
Other ways are build C++ code as static/dynamic library(.lib/dll) and include in UWP project.
May be it's same as with ANSI C.
How can I do that? It's very helpful if have a link to show how to do this.
Thanks.
推荐答案
参见c# - 如何从UWP中的DLL调用函数? - 堆栈溢出 [ ^ ]。
这篇关于如何在通用Windows平台应用程序中调用C函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!