By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,754 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

Multiple Event Handling Exception with COM Components

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
Hi all

Anybody knows the Solution.....?

Sankar
Dec 6 '07 #8

P: n/a
Hello,
Anybody knows the Solution.....?
What's the problem? Have written any code?

(H) Serge
Dec 6 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.