Hi,

I would like to implement following design in C++ and C Sharp. Please help me performing marshaling between CPP and COM module.
CPP:
function_cpp()
{
int a[10]
int *p;
CComPtr<IDotNetInterface> pI;
pl->function_com(&p);
for (int i = 0; i < 10; i++)
a[i] = p[i];
}

CSharp COM module:
function_com([MarshalAs(UnmanagedType.LPArray, SizeConst = 10, ArraySubType = UnmanagedType.I4)] out int[] arrayVar)
{
arrayVar = new int[10];
for (int i = 0; i<10; i++)
arrayVar[i]=i;
}

Compilation of COM module is successful. But build of CPP module fails with error "error C2664: 'IDotNetInterface::function_com' : cannot convert parameter from 'int **__w64 ' to 'long **'"

Please hemp me in performing correct marshaling.

Thanks
Anand