|
-
December 16th, 2005, 05:08 AM
#1
UniCode Conversion problem
Hi, I am converting an application to Unicode.
It compiles successfully in UNICODE.
but when I run, the output was something strange.
In fact I am taking Input in a BSTR variable, and want to convert this in to
tstring.
tstring in my application I have defined as
typedef basic_string<TCHAR> tstring;
to convert BSTR in to tstring I used,
BSTR bstrRtf;
here bstrRtf , will contain the value, which the client will send.
tstring strTest1 = W2T(bstrRtf);
can u suggest, where I am wrong, and How can I rectify this..
Regs
-
December 16th, 2005, 06:46 AM
#2
Re: UniCode Conversion problem
You could try using the _bstr_t class.
Code:
#include <comutil.h>
...
_bstr_t bsTemp= bstrRtf;
tstring strTest1 = (TCHAR*)(bsTemp);
...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|