Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Event Handling? #111

Closed
Mr-Pearce opened this issue Jul 9, 2019 · 1 comment
Closed

Export Event Handling? #111

Mr-Pearce opened this issue Jul 9, 2019 · 1 comment
Labels

Comments

@Mr-Pearce
Copy link

Mr-Pearce commented Jul 9, 2019

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.

@3F 3F added the question label Jul 9, 2019
@3F
Copy link
Owner

3F commented Jul 9, 2019

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?

@3F 3F closed this as completed Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants