Closed Mr-Pearce closed 4 years ago
P/Invoke doesn't support the .net events. Thus you can't export something like this.
However, the .net events just represents Observer pattern so you can implement this yourself including in unmanaged C++ part.
By the way, here's my old (copy-pasted from G+) short-article (with example on Java) for newbies: https://twitter.com/GitHub3F/status/1141444914812772352
Also! please note that mscoree does not implement "requesting" to an non cil managed code in the same manner like it could be for basic methods:
I saw in your Conari project that c++ has also events.
Conari really provides some events but this is CLR part. Or what events do you mean?
Hi i would like to make a small c# (net4.72) dll that will connect to a web service. That whole thing has to be imported in Delphi (That part is easy so far and already working)
That dll will check stuff on the web service and trigger an event if something happens.
Is it possible to "DllExport" these events? I saw in your Conari project that c++ has also events.
Sorry if that question may sound stupid. I have no experience yet in that whole com import/export thing.