Hello,
I'm accessing a COM object from C#. The COM object is running in a separate
process.
From C# I can QI for IY, but any method on IY that I try to call fails with
InteropServices.COMException. The error states that the method returned
E_FAIL.
I have attached in a separate debugger to the process hosting the COM
object, and have been able to break in the QI for IY. But I can never break
on the methods being called, which makes me think the C# call never makes it
to the COM object. It is lost somewhere in the interop black box...
Any help is greatly appreciated.
Thanks,
Julio
lgs.lgs - 18 May 2006 04:31 GMT
Well, the first two things I'd check are:
1) How you are declaring the methods for the interface in c#? Order
matters.
2) What types of arguments are you passing? If you have a zero parameter
method, that might be a good place to start to eliminate this as the source
of the problem.
dw
julio - 18 May 2006 16:44 GMT
Thanks for the reply.
The interface is defined in IDL, and is implemented by a C++ COM class.
The problem is a calling a method from C# on the interface doesn't make it
to the COM class.
Julio
> Well, the first two things I'd check are:
>
[quoted text clipped - 5 lines]
>
> dw
Dmytro Lapshyn [MVP] - 18 May 2006 17:22 GMT
Hello,
Your scenario appears to be DCOM rather than plain COM. Can you access your
COM object through the IY interface from a non-.NET COM client? At least
make sure you make proper use of the proxy/stub DLLs.
> Hello,
>
[quoted text clipped - 18 lines]
> Thanks,
> Julio