Solved

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

Posted on 2003-10-23
4
436 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 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