BSTR , CSTring and STL string 
Author Message
 BSTR , CSTring and STL string

Hi,
    Could you guys tell me how to do the following conversions.
    BSTR - string
    BSTR - CString
    string - BSTR
    CString - BSTR

Regards
Harvinder Singh



Sun, 20 Nov 2005 13:08:26 GMT  
 BSTR , CSTring and STL string
http://www.codeguru.com/FAQS/
There are Strings and string conversation:


Quote:
> Hi,
>     Could you guys tell me how to do the following conversions.
>     BSTR - string
>     BSTR - CString
>     string - BSTR
>     CString - BSTR

> Regards
> Harvinder Singh



Sun, 20 Nov 2005 13:20:32 GMT  
 BSTR , CSTring and STL string
Thats a good article however It doesn't talk about the Unicode build. ;-(


Quote:
> http://www.codeguru.com/FAQS/
> There are Strings and string conversation:



> > Hi,
> >     Could you guys tell me how to do the following conversions.
> >     BSTR - string
> >     BSTR - CString
> >     string - BSTR
> >     CString - BSTR

> > Regards
> > Harvinder Singh



Sun, 20 Nov 2005 15:15:59 GMT  
 BSTR , CSTring and STL string
I am very happy using the ATL and MFC String Conversion Macros. Have a
look over here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmf...

Chris.

Quote:

> http://www.codeguru.com/FAQS/
> There are Strings and string conversation:



> > Hi,
> >     Could you guys tell me how to do the following conversions.
> >     BSTR - string
> >     BSTR - CString
> >     string - BSTR
> >     CString - BSTR

> > Regards
> > Harvinder Singh



Sun, 20 Nov 2005 18:05:15 GMT  
 BSTR , CSTring and STL string
For BSTR use USES_CONVERSION
format
<type>2<type>
for example
const har to unicode CA2W and etc


Quote:
> Thats a good article however It doesn't talk about the Unicode build. ;-(



> > http://www.codeguru.com/FAQS/
> > There are Strings and string conversation:



> > > Hi,
> > >     Could you guys tell me how to do the following conversions.
> > >     BSTR - string
> > >     BSTR - CString
> > >     string - BSTR
> > >     CString - BSTR

> > > Regards
> > > Harvinder Singh



Sun, 20 Nov 2005 16:37:44 GMT  
 BSTR , CSTring and STL string

Quote:

> Hi,
>     Could you guys tell me how to do the following conversions.
>     BSTR - string
>     BSTR - CString
>     string - BSTR
>     CString - BSTR

> Regards
> Harvinder Singh

I use the _bstr_t class.  It defines operators char* and wchar_t*.


Tue, 22 Nov 2005 01:26:47 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. BSTR to STL string

2. URGENT: BSTR to CString error when calling CString::IsEmpty

3. STL string compared to CString

4. Newbie: CString, string, cstring

5. BSTR BSTR and BSTR

6. Conversion Between BSTR and CString

7. Best way to create a BSTR from a CString or char*

8. Converting CString to BSTR

9. HOW to Convert BSTR Type to CString type

10. Avoid Memleak with CString to BSTR.

11. BSTR working like CString

12. BSTR* array -> CString conversion problem

 

 
Powered by phpBB® Forum Software