BetterC and Windows API calls

pineapple meapineapple at gmail.com
Sat Jun 3 08:13:30 UTC 2023


On Friday, 2 June 2023 at 21:23:46 UTC, Steven Schveighoffer 
wrote:
> That error code is 0xC0000005, which is an access violation 
> (segfault). Basically, a memory read/write error.
>
> Using static in D means TLS. I'm not sure what the rules are 
> for TLS and betterC, but perhaps it's not properly set up?
>
> Maybe try __gshared instead of static? Not sure.
>
> -Steve

Ahh, I had not even got around to considering that accessing the 
`static` declaration could be the problem. That seems like a bug?

Anyway, declaring it as either `static shared` or `static 
__gshared` fixes the crash - thanks for pointing me to that!


More information about the Digitalmars-d mailing list