Solved

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

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
How to renew a Delphi rad-studio licence? 5 77
tvirtualstringtree freeze when load too manny images 10 80
Base1 Encode/Decode 3 86
Browsing a TTreeView in Delphi 5 32
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 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