Dushyant
Dushyant

Reputation: 1

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

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.

Upvotes: 0

Views: 277

Answers (1)

Jeffrey Hantin
Jeffrey Hantin

Reputation: 36524

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.

Upvotes: 1

Related Questions