jlnm
10/19/2007 2:00:00 PM
I have to emulate a C++ Com Component in C# . One of the methods I
am
to provide int the C# COM is (the C++ signature):
STDMETHOD(SetAttributeArray)(/*[out]*/ long* retVal, /*[in]*/ VARIANT
AttributeArray);
My Plan is this:
[Guid("03AD5D2D-2AFD-439f-8713-A4EC07054432")]
interface IComTrial
{
int SetAttributeArray(out int data,
[MarshalAs(UnmanagedType.SafeArray)] System.Array data2);
}
[ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("0490E147-F2D2-4909-A4B8-3533D2F2IED1")]
class CComTrial : IComTrial
{
public CComTrial()
{ }
public int SetAttributeArray(out int data, System.Array
data2)
{
return (0);
}
}
Does this work?