wstring always 2-byte aligned?

Nick Sabalausky a at a.a
Thu Jun 2 13:53:12 PDT 2011


I found a user comment on an MDSN Windows API reference page (Which I've 
since lost, but I think it was somewhere in the Registry section.) that 
claims that the Unicode-taking functions in the Windows API (or at least 
some of them) require the unicode strings to be aligned on a two-byte 
boundary, otherwise they might not work.

Do D's wstrings (in both D1 and D2) always follow this two-byte alignment 
(provided that you're not doing any packed-alignment structs, or 
cast-trickery), or is it something that we need to manually check?




More information about the Digitalmars-d-learn mailing list