How to add reference of c++ dll (build with pure MSIL option) in silverlight application

倖福魔咒の 提交于 2019-12-25 16:54:56

问题


I have tried adding reference after converting it to .sl.dll, it gets added but my application shows blank page instead of the contents. How can I use the cpp code in silverlight? Also can we use unmanaged code via the managed one similar to WPF? Please note I am already using 2.0.5.0 version of system.dll.


回答1:


An application needs full trust in order to make use of unsafe code. Even a trusted Silverlight application does not run with full trust, but a somewhat more relaxed set of permissions called "elevated trust". I think you'll have to use WPF.

See the MSDN page on pure and verifiable code for more details. To be usable with less than full trust, an assembly has to be verifiable, and this poses significant restrictions on what that code can contain.



来源:https://stackoverflow.com/questions/4223250/how-to-add-reference-of-c-dll-build-with-pure-msil-option-in-silverlight-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!