2.070 druntime comes with rich core.sys.windows.* headers for Windows. So, each of their functions should have an exact linkage type. Otherwise the calls to them will cause runtime errors. I found a number of the mismatch for (only) the callback functions, and will send a PR for it.
https://github.com/D-Programming-Language/druntime/pull/1525
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/699dab51b73c37ccf3e397cffb34c2c49198f7e6 Fix issue 15838 Many Win32 API callback functions miss extern(Windows) Add extern (Windows) to aliases and struct fields. https://github.com/D-Programming-Language/druntime/commit/ce29bfc31385a988555a0ba1ab335c81c5173b03 Merge pull request #1525 from qchikara/pr_win32_callbacks_linkeage Fix issue 15838 Many Win32 API callback functions miss extern(Windows)
*** Issue 16032 has been marked as a duplicate of this issue. ***
Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/699dab51b73c37ccf3e397cffb34c2c49198f7e6 Fix issue 15838 Many Win32 API callback functions miss extern(Windows) https://github.com/dlang/druntime/commit/ce29bfc31385a988555a0ba1ab335c81c5173b03 Merge pull request #1525 from qchikara/pr_win32_callbacks_linkeage
Commits pushed to dmd-cxx at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/699dab51b73c37ccf3e397cffb34c2c49198f7e6 Fix issue 15838 Many Win32 API callback functions miss extern(Windows) https://github.com/dlang/druntime/commit/ce29bfc31385a988555a0ba1ab335c81c5173b03 Merge pull request #1525 from qchikara/pr_win32_callbacks_linkeage