Re: Calling delegate in a dll callback fails silently

2017-06-17 Thread Andre Pany via Digitalmars-d-learn
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

Calling delegate in a dll callback fails silently

2017-06-16 Thread Andre Pany via Digitalmars-d-learn
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