Hi,<br>
<br>
I am currently trying to write a ATL object which takes in a BSTR and convert it to a char *. I then put this char * into a Roguewave RWCString object to create a string object.<br>
<br>
fn(BSTR *Source)<br>
{<br>
unsigned DataLen;<br>
BSTR BstrData;<br>
<br>
RWCString str_one((char*) *Source);<br>
DataLen = str_one.length();<br>
SysReAllocString (Source, (BSTR) str_one.data());<br>
}<br>
<br>
This code would take in the Source string, allow me to change it, then return it back to the calling code.<br>
<br>
This worked under NT3.51, but now on NT4 it seems as if the BSTR is a Multibyte Character set.<br>
<br>
Does anybody know how I can simply take in a BSTR convert it to a char *, work with it, then convert it back to a BSTR for returning to the calling code ?<br>
<br>
I have spent all day with this, and I am about to pull my hair out!<br>
<br>
<br>
I am currently trying to write a ATL object which takes in a BSTR and convert it to a char *. I then put this char * into a Roguewave RWCString object to create a string object.<br>
<br>
fn(BSTR *Source)<br>
{<br>
unsigned DataLen;<br>
BSTR BstrData;<br>
<br>
RWCString str_one((char*) *Source);<br>
DataLen = str_one.length();<br>
SysReAllocString (Source, (BSTR) str_one.data());<br>
}<br>
<br>
This code would take in the Source string, allow me to change it, then return it back to the calling code.<br>
<br>
This worked under NT3.51, but now on NT4 it seems as if the BSTR is a Multibyte Character set.<br>
<br>
Does anybody know how I can simply take in a BSTR convert it to a char *, work with it, then convert it back to a BSTR for returning to the calling code ?<br>
<br>
I have spent all day with this, and I am about to pull my hair out!<br>
<br>