BSTR to CString?
-
hi How to typecast BSTR to CString? give me example
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
-
hi How to typecast BSTR to CString? give me example
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
You cannot typecast it - but you may have to convert it. If you are in a Unicode build, both the
BSTR
and theCString
are of the same character type, so you can just assign theBSTR
to theCString
(or use to construct one). If not, you need to use a conversion function or macro:W2T(...)
,MultibyteToWideChar(...)
, etc. AlthoughCString
may have a conversion constructor...? Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles