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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to convert long** to Intptr for COM Interop

Thread ID:




497 Jun 30,2002 06:05 AM UTC WinForms 0
Tags: FAQ
Mukesh Motwani
Asked On June 30, 2002 06:05 AM UTC

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon