std library hooks

Walter Bright newshound2 at digitalmars.com
Sat Apr 14 12:51:57 PDT 2012


On 4/14/2012 3:49 AM, Manu wrote:
> I have a D DLL, loaded into a C app, if D throws, C doesn't seem to be able to
> catch it and it just crashes without any useful messages. Maybe I'm doing it wrong?

C has no exception handlers in it. C knows nothing about exceptions.

I recommend that all your APIs in a D DLL be wrapped in something that catches 
all exceptions, and then does something recognizable to the calling C code.



More information about the Digitalmars-d mailing list