On Saturday, 17 June 2017 at 03:35:42 UTC, Adam D. Ruppe wrote:
On Friday, 16 June 2017 at 22:17:07 UTC, Andre Pany wrote:
[...]
What is the type of dg there? This looks horribly, horribly
wrong to me.
[...]
Thanks a lot for the explanation and the link. Now it makes sense
why it not wor
On Friday, 16 June 2017 at 22:17:07 UTC, Andre Pany wrote:
int dgRef = cast(int) &(dg);
What is the type of dg there? This looks horribly, horribly wrong
to me.
If it is type delegate, you took the address of a local variable,
which is likely overwritten by the time the callback triggers.
Hi,
my D application uses a Dll written in another language.
In my D code I retrieve the address of a delegate as integer:
int dgRef = cast(int) &(dg);
This integer I pass to a function in the dll together with the
address of a callback function.
extern(C) static void notifyEventCallback(int r