Rahul,
I'm assuming that the double pointer to void is a parameter, so you pass
a pointer to a pointer to void (the declaration of the variable you pass is
void* and then you pass &ptr to the function). If that is the case, then
that maps to an IntPtr.
With the IntPtr, you can pass that to the static GetObjectForIUnknown
method on the Marshal class and it will give you an object that you can cast
to your interface.
Assuming that the method always returns that interface type, you could
define the parameter as a ref parameter of that interface type (i.e. ref
IMyFace output) and then use that. The COM interop layer should be able to
handle that.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Rahul Patel" <Ra********@discussions.microsoft.comwrote in message
news:D9**********************************@microsof t.com...
>I have a COM dll that I am consuming from C#, one of the methods is
returning
an object as void** which gets converted to IntPtr in C#.
So the question is how do I convert the IntPtr to myObject wehre myObject
is
of type IMyIface myObject; (I know that hte void** is of type IMyIface).