[英]Can we write or call “C code” in XAML for Windows Phone 8
Can we write or call "C code" in XAML for Windows Phone 8, 我们可以在Windows Phone 8的XAML中编写或调用“ C代码”吗?
i'm having C library and i have to use it in WP8 application. 我有C库,必须在WP8应用程序中使用它。 any idea..
任何想法..
Windows Phone doesn't support P/Invoke so, no. Windows Phone不支持P / Invoke,所以不。 You can't.
你不能 Especially if you want your app to be approved for the App Store:
特别是如果您希望您的应用程序被批准用于App Store:
4.2.2
4.2.2
For Windows Phone OS 7.1 Apps that target Windows Phone OS 7.1 must not invoke native code APIs by using PInvoke or COM interoperability.
对于Windows Phone OS 7.1,面向Windows Phone OS 7.1的应用程序不得通过使用PInvoke或COM互操作性来调用本机代码API。
For Windows Phone 8 Apps that target Windows Phone 8 must not invoke native code APIs other than the APIs listed at Win32 and COM API for Windows Phone 8.
对于Windows Phone 8,面向Windows Phone 8的应用程序不得调用Win32和Windows Phone 8的COM API中列出的API以外的本机代码API。
Remember, your C library is probably pre-compiled for x86 which means that you would have to re-compile the source for different devices. 请记住,您的C库可能已经针对x86进行了预编译,这意味着您必须为不同的设备重新编译源代码。
Your best bet is to check out the C source and see how difficult it would be to port to C#. 最好的选择是检查C源代码,看看移植到C#有多困难。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.