Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / May 2006

Tip: Looking for answers? Try searching our database.

.NET-COM : QI works but method invocation fails

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
julio - 18 May 2006 03:14 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.