Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ERROR : HResult:0x80040202

320 views
Skip to first unread message

James

unread,
Dec 4, 2002, 4:45:53 PM12/4/02
to
I'm trying to use a COM object and have been trying to write event handlers
for it.If I have a single event handler .. it works like a charm , but the
moment I add another one... I get this error.Any suggestions or help would
be appreciated

Thanks


Lion Shi

unread,
Dec 6, 2002, 2:14:22 AM12/6/02
to
Hello James,

The similar problems may be caused by a known issue of Tlbimp.exe (RTM). It
generates event sinks as private classes. If it is, you may try changing
the sink helper classes to be public to workaround it. Please try the steps
below (you should replace the xxxx with the proper string depending on our
component):

1. Run the following line to disassemble the wrapper:

ildasm xxxx.dll /out:xxxx.il

2. Open the IL file with the note pad:

notepad xxxx.il

3. Change the two lines containing:

class private auto ansi sealed xxxxObjectEvents_SinkHelper

to:

class public auto ansi sealed xxxxObjectEvents_SinkHelper

4. Assemble the IL file to a DLL file:

ilasm /dll xxxx.il

I hope it helps.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
From: "James" <cjp...@yahoo.com>
Subject: ERROR : HResult:0x80040202
Date: Wed, 4 Dec 2002 16:45:53 -0500
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <ORI$C69mCHA.2400@TK2MSFTNGP11>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: host-67.marlabs.com 65.216.182.67
Path: cpmsftngxa06!tkmsftngp01!TK2MSFTNGP11
Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:113831
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

0 new messages