?
Solved

0x80040202 error when using Delphi built COM object with C#

Posted on 2003-10-23
4
Medium Priority
?
444 Views
Last Modified: 2010-04-05
Hi,

I'm getting an exception raise when I use a COM object built with Delphi within C#. The exception number is 0x80040202, which occurs when more than one event handler is assigned. There are three events, the first event handler assigned works fine however the afore mentioned exception occurs when the second event handler is assigned.

I've read some stuff from the Microsoft knowledge base regarding a problem with sinker help classes that have the wrong protection type in the Interop type library that .Net generates, but this doesn't seem to be the problem in this case.

Microsoft have taken a look at this problem on our behalf and have not been able to find a solution, they suggested it was a problem with the interface within Delphi and suggested we contacted Borland.

My development teams next step is to be build a series of dummy COM objects under different languages that use the same interface to try and issolate where the problem is.

If anybody out there can sched more light on this it would be greatly appreciated. We don't fancy having to recode all the Delphi stuff in C# just to get round this problem but that's our choice of last resort.

Many thanks,

Richard.

0
Comment
Question by:rikjc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 2000 total points
ID: 9605534
http://www.google.nl/search?q=0x80040202 - Apparantly you're not the only person with this problem... Have you looked at Google already?
0
 

Author Comment

by:rikjc
ID: 9606161
Yeah I've scoured the net for references to this problem. Most people refer back to the Microsoft knowledge base article which refers to a bug in the ilasm.exe utility that generates the Interop type library for your COM object.

There's quite a few refereces to the same problem in JabberCOM but apparently they got round it by re-coding their COM object in C# as a .Net assembly.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question