thready
asked on
C++ event callback converted to c# events
Hi Experts,
I have a C++ callback interface (bunch of pure virtual functions in a class). The c++ library is being instantiated in a c# class library now.
So naturally, I want to convert these "events" as c# events now.
My thinking is to create delegates in the wrapper library and convert them directly, firing them off to c#.
I know that on the C# side, if these events come from a different thread, I need to invokeLater.
Is there anything I could have done differently to make my life better here? Looking for any great ideas at all... :-)
Thanks,
Mike
I have a C++ callback interface (bunch of pure virtual functions in a class). The c++ library is being instantiated in a c# class library now.
So naturally, I want to convert these "events" as c# events now.
My thinking is to create delegates in the wrapper library and convert them directly, firing them off to c#.
I know that on the C# side, if these events come from a different thread, I need to invokeLater.
Is there anything I could have done differently to make my life better here? Looking for any great ideas at all... :-)
Thanks,
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I just clicked... I export these functions as in your link above. Sorry about that! :-)
Awesome.
Awesome.
ASKER
Actually, this is for the exported DLL type of interop... I'm not sure this works for the CLR class library method...
ASKER
Mike