I have a COM object in C# and a Silverlight application(escalated privileges) which is a client to this COM object.
COM object:
[ComVisible(true)]
public interface IProxy
{
void Test(int[] integers);
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
public class Proxy : IProxy
{
[ComVisible(true)]
public void Test(int[] integers)
{
integers[0] = 999;
}
}
Silverlight client:
dynamic proxy = AutomationFactory.CreateObject("NevermindComProxy.Proxy");
int[] integers = new int[5];
proxy.Test(integers);
I excpect the integers[0] == 999, but the array is intact.
How to make the COM object modify the array?
UPD Works for non-silverlight apps. Fails for Silverlight. How to fix for silverlight?