Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Silverlight run a library written in C++ on PC/Mac/Linux?

I have some C++ libraries. Is there a way to use them from Silverlight in a cross platform way (on Linux/Mac/PC)? I don't want to use C++/CLI if possible.

I googled this article saying COM is the only way. However, I was told that Silverlight4 supports PInvoke.

like image 916
prosseek Avatar asked Jan 06 '11 17:01

prosseek


2 Answers

Silverlight 4 does not support PInvoke so the answer is no you can't directly use your C++ Libraries.

PInvoke is currently expected to be in Silverlight 5 for release sometime this year (2011).

See this John Papa blog Silverlight 5 Features, bullet point on OOB features.

like image 92
AnthonyWJones Avatar answered Oct 18 '22 09:10

AnthonyWJones


My impression was that Silverlight on desktop doesn't support native C++. Here is a link that seem to confirm it: http://cristianadam.blogspot.com/2009/10/silverlight-for-windows-embeddedhh-c.html

like image 3
Gene Bushuyev Avatar answered Oct 18 '22 08:10

Gene Bushuyev