Convert from BSTR to TCHAR* or char* 
Author Message
 Convert from BSTR to TCHAR* or char*

Hi group

I want to translate from BSTR to TCHAR* or char*. How should i do it?

thank you
Herbert



Wed, 08 Sep 2004 01:27:07 GMT  
 Convert from BSTR to TCHAR* or char*
I like to wrap a BSTR using a _bstr_t (comdef.h).  Then you can cast the
_bstr_t to char *.


Quote:
> Hi group

> I want to translate from BSTR to TCHAR* or char*. How should i do it?

> thank you
> Herbert



Wed, 08 Sep 2004 01:39:13 GMT  
 Convert from BSTR to TCHAR* or char*
USES_CONVERSION;
BSTR bstr;
TCHAR *pt = OLE2T(bstr);
char *pc = OLE2A(bstr);

--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi group

> I want to translate from BSTR to TCHAR* or char*. How should i do it?

> thank you
> Herbert



Wed, 08 Sep 2004 02:10:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Convert from BSTR to TCHAR* or char*

2. Converting BSTR to TCHAR

3. How to convert unsigned Char to TCHAR?

4. Convert from BSTR* to CHAR*

5. converting BSTR to const char *

6. converting char to bstr

7. how to convert from bstr to char string

8. Q: Converting char[] with null bytes to BSTR ?

9. Convert an BSTR in char *

10. How to convert char array to BSTR?

11. How to convert from BSTR to char

12. Conversion : How to convert from char* to BSTR ?

 

 
Powered by phpBB® Forum Software