toWStringz

Convert a D UTF-8 string into a null-terminated UTF-16 buffer suitable for passing to wide Win32 APIs.

The returned pointer refers to GC-managed memory; it stays valid as long as the caller keeps a reference reachable (in practice, for the duration of the Win32 call it is handed to).

@trusted
const(wchar)*
toWStringz
(
string s
)

Meta