>Use (“%.*S”, string->Length / sizeof(WCHAR), string->Buffer).
I’m pretty sure it’s a good idea to put an (int) cast in there.
(“%.*S”, (int)(string->Length / sizeof(WCHAR)), string->Buffer).
I believe * is speced as taking an int, not a size_t, and presumably
ushort/size_t is promoted to size_t…but then again, it doesn’t really make
sense to promote division based on the second type since the result will be
<= the first value. Systems where sizeof(int) != sizeof(size_t) might pass
too many bytes there, though I don’t think it actually makes a difference on
IA64, I think just one whole register is used regardless.
…Jay