Heads Up: Use WCHAR when interfacing with Windows

Walter Bright newshound2 at digitalmars.com
Mon Dec 3 03:30:41 UTC 2018


Due to name mangling changes required by compatibility with C++11, wchar_t will 
no longer mangle the same as wchar. Yes, I know, argghhh. What this means for 
Windows API calls is that the alias for WCHAR will change from wchar to wchar_t.

To get a head start on this, when you're writing interface code to Windows, use 
WCHAR instead of wchar or wchar_t, and then your code will continue to compile 
before and after the change.

Here's an example:

https://github.com/dlang/druntime/pull/2392/files


More information about the Digitalmars-d-announce mailing list