在 Windows Phone 7 中使用 C dll
一个简单但基本的问题:
是否可以在我的 WP7 项目中使用用 C 开发的 dll?
我怎样才能做到这一点?
谢谢。
A simple but fundamental question :
Is it possible to use a dll devlopped in C, in my WP7 project ?
How can I do that ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除非您的应用程序与设备制造商或网络运营商捆绑在一起,否则这是不可能的。我相信他们可以使用本机代码,但对于其他人来说,它是 Silverlight 或 XNA。
It's not possible unless your app is being bundled with the device manufacturer or network operator. I believe they get to use native code, but for everyone else it's Silverlight or XNA.
实际上是可以的,只要你可以激活COM Bridge并且能够向操作系统注册DLL。这不是一个有据可查的功能,它几乎会让应用程序被市场拒绝(因为它不是官方支持的功能之一),但您当然可以“只是为了好玩”这样做。
以下是 Chris Walshie 对此的评论:
http://blog.walshie.me/2010/11/12/windows-phone-7-native-apps-the-missing-link
是的,这会涉及更多的工作,但是人们已经发现,许多 OEM 正在将其应用程序与本机 DLL 捆绑在一起,并且该模式也可以成功地用于第三方应用程序(看看 XDA 人员的做法)。
It is actually possible, as long as you can activate the COM Bridge and be able to register the DLL with the OS. This is not a well-documented capability and it will pretty much get the application rejected from the Marketplace (since it is not one of the officially supported features), but you can certainly do it "just for fun".
Here is what Chris Walshie has to say about it:
http://blog.walshie.me/2010/11/12/windows-phone-7-native-apps-the-missing-link
Yes, it will involve a lot more work, but it was already found that a lot of OEMs are bundling their applications with native DLLs, and that pattern can be successfully used in third-party applications as well (looking at what XDA guys do).