nothrow in druntime win32 C bindings

Walter Bright newshound2 at digitalmars.com
Thu Dec 27 01:31:46 PST 2012


On 12/27/2012 12:50 AM, Vladimir Panteleev wrote:
> On Thursday, 27 December 2012 at 02:26:11 UTC, Andrej Mitrovic wrote:
>> On 12/27/12, Walter Bright <newshound2 at digitalmars.com> wrote:
>>> Windows knows nothing about D exceptions
>>
>> Then why does my code sample work?
>
> Have a look at the "Remarks" section of the WNDPROC documentation:
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx
>
> It looks like the behavior will vary greatly on 64-bit Windows OSes (for both
> 32-bit and 64-bit apps).

That pretty much confirms to me that you shouldn't generate SEH exceptions and 
send them to Windows unless you have studied the issue carefully. Just throwing 
D exceptions and assuming Windows will do the right thing, whatever that is, 
with them is a mistake.


More information about the Digitalmars-d mailing list