I have a legacy C++ COM application which writes a BSTR (UTF-16 on Windows) like this.
Say, ☻ (Black Smiley i.e. ALT + Numpad 2) is written like this in HEX -
060000003B260D000A00
by the application. Note that 1st 4 bytes are reserved for BSTR length
Now, how do I display back the black smiley in C#
from this HEX string ? In VS debugger, '\u263B'
displays the smiley, but here the string is 3B26
. This is just an example of a kind of data. Any data can be dumped by that app (like large XSLs, Texts, etc. - all converted in HEX format). Idea is to interpret the HEX correctly in C#.
This link talks something similar, but not very sure. Any pointers ?