I think I'd need a toWStringz function, or maybe toStringz can be made more 
clever and figure out that I'm passing a wstring and return a null-terminated 
wchar*.

Currently I'm using wstrings and appending the null terminator by hand, e.g.:

wstring appName  = "DMapp" ~ "\0";

Some WinAPI functions in unicode form, such as CreateWindowExW, expect a 
wchar*. So in the above case I just pass `appName.ptr`. But it would be 
convenient not having to append the null terminator prematurely.

Reply via email to