I have a COM object in C # and a Silverlight application (escalated privileges) that is a client of 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 allocate integers [0] == 999, but the array is not corrupted.
How to make a COM object modify an array?
UPD
Works for applications that do not support Silverlight. Error for Silverlight. How to fix for silverlight?
source
share