Similar Threads:
1.Problem with Event sink (ATL C++) when the event source is a C# object
Hello everybody,
I need to send from a C# object events, that have to be caught
in my C++ code. I have followed the instructions from the MSDN article
"Raising Events Handled by a COM Sink", but I have a problem
when I call AtlAdvise in the C++ client: the method FindConnectionPoint
will fail with error CONNECT_E_NOCONNECTION (0x80040200).
So I suppose there is a problem with the connetion point map. I found
in another posting that the event instance name has to be the same as the
interface method, which I did, but with no result.
How can I solve my problem? Stupid ideea: is there any way to define
(correct)
manually the message map for the C# object, like it was possible in C++?
Many thanks for your help,
Cristian
2.Problem with Event sink (ATL C++) when the event source is a C# ob
Sorry, I forgot to mention that I am an MSDN subscriber, so I would
be pleased to see some "Microsoft" answers.
Regards,
Cristian Marinescu
"Cristian Marinescu" wrote:
>
> Hello everybody,
>
> I need to send from a C# object events, that have to be caught
> in my C++ code. I have followed the instructions from the MSDN article
> "Raising Events Handled by a COM Sink", but I have a problem
> when I call AtlAdvise in the C++ client: the method FindConnectionPoint
> will fail with error CONNECT_E_NOCONNECTION (0x80040200).
>
> So I suppose there is a problem with the connetion point map. I found
> in another posting that the event instance name has to be the same as the
> interface method, which I did, but with no result.
>
> How can I solve my problem? Stupid ideea: is there any way to define
> (correct)
> manually the message map for the C# object, like it was possible in C++?
>
> Many thanks for your help,
> Cristian
>
>
>
>
>
>
3.Exception Raising Events from C# DLL (COM Event Source) to Excel V
4.Managed event source, unmanaged event sink
Hi, I am using .NET Framework 2.0 with Visual Studio 2005 Beta Professional.
Here is the deal: Currently I have a managed class "A" (located ina C# class
library) that has a few custom events. An unmanaged C++ class "B" has a
member variable of type "A". Can class "B" directly receive the events of
class "A", and if so how (code examples)? What I mean by "directly" is can
one write code like:
m_ManagedObject->EventOccurred += gcnew EventOccurred(this,
&UnmanagedClass::EventOccurred);
without having to use some intermediary managed class that receives the
events and then calls the appropriate function of the unmanaged object?
Thanks for looking, Mario
5.Attaching Event Sink to Event Source
Hi,
I have custom event class defined named "CustomEvent". Also I
have a defined a custom sink named "CustomSink" derived from Eventsink. I
want tthat Write method the Custom Sink should be called when I raise the
evet using EventSource method.
Code:-
CustomEvent custEvt = new CustomEvent ( );
EventSource eventSource = new EventSource( "source1" );
eventSource.Raise( custEvt );
But the Write method is not getting called.
Can any please tell me how to attach the sink with the event source.
Thanks,
Reshma
6. Event Handling with VB6 source / C# sink
7. C# com and c++ event sink
8. Catching C# generated events with an ATL COM Sink