I've got this small web application I've built. It's got an activex control returning unmanaged code through javascript into a silverlight application. In silverlight I perform a marshaling operation on the returned value. When I only perform the simple operation of GetSize() I get struck with a stupefing error. This brings me to my question: Is it possible to perform a marhsalling operation in silverlight, if so how?
相关问题
- how to Enumerate local fonts in silverlight 4
- Free Silverlight mapping with Bing maps and OpenSt
- Custom number picker?
- Error using ResourceDictionary in Silverlight
- Can we create a Silverlight Socket Server ONLY usi
相关文章
- New Windows Application - What language?
- How To Programmatically Enable/Disable 'Displa
- relative url in wcf service binding
- Embedded images not showing when in a UserControl
- How can I ignore a field when marshalling a struct
- MarshalAs(UnmanagedType.LPStr) - how does this con
- Silverlight 4: How can I convert bmp byte array to
- Silverlight DataTemplate Memory Leak
Silverlight's security model and sandbox do not allow "transparent" (user code and applications) to perform p/invokes, trusted operations, or anything of that sort.
If you already have an ActiveX control installed and available to the web page, you'll need to use the HTML Interoperability features of Silverlight to marshall the data yourself. There's an MSDN article about the HTML bridge that's specific to Silverlight 2, but you'll find it the same in newer releases of Silverlight as well.
This assumes that your ActiveX control is accessible through browsing scripting / JavaScript already.
Though some marshalling of numbers and some other primitives works well in the platform, you'll likely end up moving all your data from your ActiveX control through the use of strings, then parsing it back on the Silverlight client.
This might at least enable your scenario.