We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to convert long** to Intptr for COM Interop

I'm trying to call a method on a COM object from C# . It takes two 2D arrays and stores the result in another 2D array. /* As defined in the COM ATL class */ STDMETHODIMP CMult::dim2Add(LONG** num1, LONG** num2, LONG** num3) This comes-up in C# (ie. via COM wrapper) as: 'com_demo4.CMultClass.dim2Add(System.IntPtr, System.IntPtr, System.IntPtr)' In my C# program if I declare int **array1; and pass it to the method it says invalid arguments. System.Intptr(int) *array1; also doesnt work. MSDN says "The interop marshaler does not support higher levels of indirection (Point **) in either direction". Does it mean that if we have double pointers used in our legacy COM, the COM object cant be used anymore? Any help will be greatly appreciated. Thanks Mukesh

Live Chat Icon For mobile
Up arrow icon