Silverlight 4 中的本机集成
关于 Silverlight 4 中可信应用程序新概念的问题:
我认为可信应用程序在浏览器外部运行,信任程度更高。因此,是否可以从受信任的应用程序调用非托管 DLL 中的任意函数(通过 DllImport),或者此功能是否仍保留给适当的桌面应用程序?
预先非常感谢您和亲切的问候,
Marc Frei
a question concerning the new concept of Trusted Applications in Silverlight 4:
I gather that trusted applications run outside the browser with elevated trust. Will it therefore be possible to call arbitrary functions in unmanaged DLLs (by means of DllImport) from a trusted application or is this feature still reserved to proper desktop applications?
Thank you very much in advance and kind regards,
Marc Frei
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,Silverlight 4 不允许通过 P/Invoke 调用非托管代码。您只能通过 AutomationFactory 类。但是,调用本机代码已添加到 Silverlight 5。
Unfortunately, Silverlight 4 does not allow calling unmanaged code via P/Invoke. You can only call native code using the COM via the AutomationFactory class. However, calling native code was added to Silverlight 5.