WSTR is fine if you always want a UNICODE string
well - it doesn't always return correct results if you use SIZEOF/LENGTHOF operators with a string created with WSTR
WSTR szTest,"Test",0
the correct "LENGTHOF szTest" should be 5 - with WSTR, it will be 4
the correct "SIZEOF szTest" should be 10 - with WSTR, it will be 8
WSTR always defines a UNICODE string, whether or not the symbol __UNICODE__ is defined
in the latest version of the masm32 package, Hutch added a number of UNICODE macros written by qWord
of particular interest are qWord's UCSTR and UCCSTR macros
UCCSTR is like UCSTR, except it adds support for many C-style escape sequences (\n, \t, etc)
these macros always create UNICODE strings, but allow more complex definitions
also, the LENGTHOF and SIZEOF operators seem to work well with these macros
Hutch has a STRING macro that defines a UNICODE string if __UNICODE__ is defined and an ANSI string if it isn't
however, the LENGTHOF and SIZEOF operators do not always return proper values
so, qWord wrote the TCHR macro, which is not in the masm32 library
it's a pretty simple macro, because it relies on UCSTR (a complex macro) to do all the UNICODE work
;TCHR macro by qWord
TCHR MACRO lbl,args:VARARG
IFNDEF __UNICODE__
lbl db args
ELSE
UCSTR lbl,args
ENDIF
ENDM
you can read a previous discussion, here...
http://masm32.com/board/index.php?topic=1305and an older topic by qWord, here...
http://masm32.com/board/index.php?topic=680.0