refer to these 2 pieces of code
<1>
h[0] = (OLECHAR) 72;
h[1] = (OLECHAR) 69;
h[2] = (OLECHAR)76;
h[3] = h[2];
h[4] = (OLECHAR) 111;
h[5] = NULL;
<2>
h[0] = (OLECHAR) "H";
h[1] = (OLECHAR) "E";
h[2] = (OLECHAR)"L";
h[3] = h[2];
h[4] = (OLECHAR) "o";
h[5] = NULL;
When I convert sample 1 to BSTR then send it to VB I get "HELLo" at the other end. When I convert sample 2 to BSTR then send it to vb. I get some thing like "????". And when I check "H" and 72 and the rest in C++ its the same. Why is it like that?
Thanx in advance!