473,408 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Multiple Event Handling Exception with COM Components

Hi

I am using a com component in my C# application.
But i getting error while i tried to call multiple events from my
application.
I'm getting the error "Exception from HRESULT: 0x80040202"

It would be appreciated if anyone come with the solution.

Sankar
Dec 2 '07 #1
8 2234
Sankar,

You need to do a little better than that. A full code sample, as well
as WHICH COM component you are using, and what events you are firing would
help greatly.

i
<sa***********@gmail.comwrote in message
news:64**********************************@x69g2000 hsx.googlegroups.com...
Hi

I am using a com component in my C# application.
But i getting error while i tried to call multiple events from my
application.
I'm getting the error "Exception from HRESULT: 0x80040202"

It would be appreciated if anyone come with the solution.

Sankar
Dec 2 '07 #2
Hi Nicholas

I am using a delphi com component in C# my application.
when i call the following event its working fine
PInterface.NTransactionAvailable += new
IPOSInterfaceEvents_NTransactionAvailableEventHand ler(PInterface_NTransactionAvailable);

But i tried to add one more event handler like the following code, its
showing the error "Exception from HRESULT: 0x80040202"

PInterface.NTransactionReturned += new
IPOSInterfaceEvents_NTransactionReturnedEventHandl er(PInterface_NTransactionReturned);

If i comment the 1st event handler, the second will work. I need to
add more than 10 event handler

Hope this will give you an idea about my problem.

Thanks
sankar

On Dec 2, 8:40 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Sankar,

You need to do a little better than that. A full code sample, as well
as WHICH COM component you are using, and what events you are firing would
help greatly.

i<sankar.vik...@gmail.comwrote in message

news:64**********************************@x69g2000 hsx.googlegroups.com...
Hi
I am using a com component in my C# application.
But i getting error while i tried to call multiple events from my
application.
I'm getting the error "Exception from HRESULT: 0x80040202"
It would be appreciated if anyone come with the solution.
Sankar- Hide quoted text -

- Show quoted text -
Dec 4 '07 #3
On 4 Dez., 06:52, sankar.vik...@gmail.com wrote:
Hi Nicholas

I am using a delphi com component in C# my application.
when i call the following event its working fine
PInterface.NTransactionAvailable += new
IPOSInterfaceEvents_NTransactionAvailableEventHand ler(PInterface_NTransacti-onAvailable);

But i tried to add one more event handler like the following code, its
showing the error "Exception from HRESULT: 0x80040202"

PInterface.NTransactionReturned += new
IPOSInterfaceEvents_NTransactionReturnedEventHandl er(PInterface_NTransactio-nReturned);

If i comment the 1st event handler, the second will work. I need to
add more than 10 event handler

Hope this will give you an idea about my problem.

Thanks
sankar

On Dec 2, 8:40 pm, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
Sankar,
You need to do a little better than that. A full code sample, as well
as WHICH COM component you are using, and what events you are firing would
help greatly.
i<sankar.vik...@gmail.comwrote in message
news:64**********************************@x69g2000 hsx.googlegroups.com...
Hi
I am using a com component in my C# application.
But i getting error while i tried to call multiple events from my
application.
I'm getting the error "Exception from HRESULT: 0x80040202"
It would be appreciated if anyone come with the solution.
Sankar- Hide quoted text -
- Show quoted text -- Zitierten Text ausblenden -

- Zitierten Text anzeigen -
A quick google-search shows that quite a few people have similar
problems. It seems to be related to a bug that causes event sinks to
be declared as private in the wrapper.
Just google for "HRESULT 0x80040202" and you should be able to find a
solution to your problem.

Kevin Wienhold
Dec 4 '07 #4
On Dec 4, 10:55 am, KWienhold <hedov...@trashmail.netwrote:
On 4 Dez., 06:52, sankar.vik...@gmail.com wrote:


Hi Nicholas
I am using a delphi com component in C# my application.
when i call the following event its working fine
PInterface.NTransactionAvailable += new
IPOSInterfaceEvents_NTransactionAvailableEventHand ler(PInterface_NTransacti--onAvailable);
But i tried to add one more event handler like the following code, its
showing the error "Exception from HRESULT: 0x80040202"
PInterface.NTransactionReturned += new
IPOSInterfaceEvents_NTransactionReturnedEventHandl er(PInterface_NTransactio--nReturned);
If i comment the 1st event handler, the second will work. I need to
add more than 10 event handler
Hope this will give you an idea about my problem.
Thanks
sankar
On Dec 2, 8:40 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Sankar,
You need to do a little better than that. A full code sample, as well
as WHICH COM component you are using, and what events you are firing would
help greatly.
i<sankar.vik...@gmail.comwrote in message
>news:64**********************************@x69g200 0hsx.googlegroups.com...
Hi
I am using a com component in my C# application.
But i getting error while i tried to call multiple events from my
application.
I'm getting the error "Exception from HRESULT: 0x80040202"
It would be appreciated if anyone come with the solution.
Sankar- Hide quoted text -
- Show quoted text -- Zitierten Text ausblenden -
- Zitierten Text anzeigen -

A quick google-search shows that quite a few people have similar
problems. It seems to be related to a bug that causes event sinks to
be declared as private in the wrapper.
Just google for "HRESULT 0x80040202" and you should be able to find a
solution to your problem.

Kevin Wienhold- Hide quoted text -

- Show quoted text -
Hi Kevin

I did the same thing,ie changed two private events sinks to public in
the wrapper class. But still showing the same error, do you have any
other solutions to solve this.

Thanks

Sankar
Dec 4 '07 #5
Hello,
I did the same thing,ie changed two private events sinks to public in
the wrapper class. But still showing the same error, do you have any
other solutions to solve this.
Use a multiplexor for adding multiple handlers — that is, sink the event
only once, and dispatch the event from that handler method to whatever number
of handlers you actually need.

(H) Serge
Dec 4 '07 #6
Hi Serge

Can u tell me, how to use the multiplexor in C#, or can u tell me any
reference for doing the same.

Thanks
Sankar
Dec 5 '07 #7
Hi all

Anybody knows the Solution.....?

Sankar
Dec 6 '07 #8
Hello,
Anybody knows the Solution.....?
What's the problem? Have written any code?

(H) Serge
Dec 6 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Chuck Cobb | last post by:
I'm implementing a centralized exception handling routine using the Enterprise Library Exception Management Application Block. I trap all unhandled exceptions to one place using the following...
1
by: metsys | last post by:
We have an ASP.NET 2.0 (C#) application that is divided into multiple layers. The multiple layers come from having a web project and 2 different class library projects in the same solution. I'm...
1
by: metsys | last post by:
We have an ASP.NET 2.0 (C#) application that is divided into multiple layers. The multiple layers come from having a web project and 2 different class library projects in the same solution. I'm...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.