nothrow in druntime win32 C bindings

Walter Bright newshound2 at digitalmars.com
Wed Dec 26 17:39:11 PST 2012


On 12/26/2012 2:47 PM, Andrej Mitrovic wrote:
> On 12/26/12, Walter Bright <newshound2 at digitalmars.com> wrote:
>> The operating system calls WNDPROC directly. That means that you (the user)
>> need to set up / tear down the D runtime yourself
>
> But we already do this in WinMain, which is called first:

You're right. But the whole reason to declare functions as being of type WNDPROC 
is they are called by Windows. Windows knows nothing about D exceptions, and I 
think that it's courting disaster for a function to hand them off to Windows.

This applies to any attempt to throw D exceptions in code called by non-D code.



More information about the Digitalmars-d mailing list