Using native dlls in C # Com shell and using dll in silverlight

As part of my project, I need to use some DLLs without modification in Silverlight. If I pack these unmanaged dlls in C # dll, I can access the native dlls from silverlight. I am using Visual Studio 2010 and Silverlight 4.0

+3
c # silverlight
source share
2 answers

With Silverlight 4, you can call COM objects installed on the local computer. However, for this, the user must choose that the Silverlight application provides full access to his machine.

In addition, the COM object must already be installed on the machine. Therefore, the user will first have to download and install your DLLs separately before using any features that relied on them in the Silverlight application.

+9
source share

Silverlight runs in a browser sandbox, so it does not allow you to directly access an unmanaged assembly. Although you are running unmanaged code in a C # assembly, it still loads in the same application domain, which is limited by the same security restriction.

I read that you can use the html compatibility between silverlight and ActiveX, but I have not experienced this myself. In addition, you can deploy the full WPF application, and if you sign it with the appropriate certificate and security setting, it will be able to access unmanaged code - if this is an option.

0
source share

All Articles