tags:

views:

102

answers:

2

I am building a small Silverlight application. I wish to be able to add a COM DLL to my application. My current thought is to download the COM DLL with a web client and then add to the project, though as said... how does one add a COM componenet to a Silverlight application? (Is it even possible, security-wise?)

+2  A: 

You can't.

If you are talking about an ActiveX component then you get to it by calling through JavaScript code.

S.Skov
+2  A: 

You can't because of the security sandbox of Silverlight, you can only use security transparent managed code and native code certainly does not quality.

In addition, while it may be possible to invoke ActiveX via Javascript don't forget that Silverlight is cross platform and your code may be running on a Mac or Linux machine.

If you absolutely require some sort of functionality only available in COM you can invoke COM from FullTrust .NET code on the server (which some hosters do not allow) and write a WCF service (or even ASP.NET Web Service if you want to be old school :) facade that your Silverlight application can call, provided that you don't need something only available on the client.

Joe Kuemerle
Well I do... I need his sound card, and sadly enough cannot use the mediaelement control. Thanks anyhows! Will come back with an answer once thought of.
vondip