Print unicode strings in tests

Paul Vriens paul.vriens at xs4all.nl
Tue May 31 08:30:41 CDT 2005


Hi,

I'd like to print unicode-strings in some tests (for debugging purposes).
The following however does not show nice output on wine (it does on
windows):

static const WCHAR dataW[] = {'S','o','m','e',' ','d','a','t','a',0};
UNICODE_STRING usdata = { sizeof(dataW)-sizeof(WCHAR), sizeof(dataW),
(LPWSTR)dataW };

trace("Length is %d\n", usdata.Length);
trace("Maximum Length is %d\n", usdata.MaximumLength);
trace("The strings is %ls\n", usdata.Buffer);

Our trace doesn't seem to be able to cope with %ls (or %S).

Any ideas ?

Cheers,

Paul.





More information about the wine-devel mailing list