Quote Originally Posted by Schmidt View Post
Code:
'and now we put it out, assuming the Len-Function works like Elroy and you seem to prefer:
  TextOutW hDC, 10, 30, StrPtr(sUTF16), 1 '<- I mean, it's just one single Emoji-Char, right?
Well, that's very true - and it answers the question, whether "VB-Strings are restricted to UCS-2" rather nicely, wouldn't you say?
(because if they were, you couldn't pass "full UTF16-content" to these APIs, as my above Demo shows).
You'r true. Len() does all right and what the windows API expect. (windows NT = UTF16)
Otherwise we would be in trouble and noticed this already long time ago.

UTF16 is like a code block where often 2 byte is 1 "char" and sometimes 4 byte is 1 "char".
-> "Code points equal to 2^16 (or greater) are encoded using two 16-bit code units."