[Mono-list] Mono Embedding: manage events
robertj at gmx.net
Tue Apr 1 13:02:14 EDT 2008
Ing. Francesco Carsana wrote:
> I'm writing a C++ class with Mono embedding.
> This class is a wrapper to a .NET assembly that
> raises 3 events.
> I would like to know if it's possible to catch
> that events in C++ without changing .NET assembly
> (I haven't assembly source code...).
> Where can I find a code example?
> I've searched in
> but I haven't found an example on how to manage events...
The recommended way is to declare the handlers as icalls in
// handler of System.EventHandler
public static extern void EventHandlerICall (object sender,
icall_EventHelper_EventHandlerICall (MonoObject* sender,
To hook the handler you have create a delegate for
EventHandlerICall using Delegate.CreateDelegate and
add it to the event with method obtained from
More information about the Mono-list