Article View: borland.public.cppbuilder.upgrade
Article #128Re: WideString worked in BCB6 but not in BDS2006
From: Remy Lebeau (TeamB)
Date: Fri, 25 Jul 2008 19:04
Date: Fri, 25 Jul 2008 19:04
25 lines
1742 bytes
1742 bytes
"John Mc" <don't spam me> wrote in message
news:488a1ebe@newsgroups.borland.com...
> This has worked nicely under BCB 6. Now I am trying to
> compile the code under BDS2006 and get the following errors:
>
> [C++ Error] GEMUtils.cpp(83): E2034 Cannot convert 'WideString' to
> 'wchar_t *'
That should be working fine. WideString has a BSTR conversion operator
defined, and BSTR is a typedef for wchar_t*.
> [C++ Error] GEMUtils.cpp(83): E2342 Type mismatch in parameter
> 'name' (wanted 'wchar_t *', got 'WideString')
>
> What do I have to do to get this to work under BDS2006?
If the conversion operator is not working properly, you can call the
WideString::c_bstr() method explicitally:
ThirdPartyFunc1(nameWideStr.c_bstr());
Gambit
Technical Details
Message-ID:
<488a2429@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<488a1ebe@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10529a,a5203f0a5817ae0b X-Google-Attributes: gid10529a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.upgrade References: <488a1ebe@newsgroups.borland.com> Subject: Re: WideString worked in BCB6 but not in BDS2006 Date: Fri, 25 Jul 2008 12:04:23 -0700 Lines: 28 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 207.178.157.90 Message-ID: <488a2429@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1217012777 207.178.157.90 (25 Jul 2008 12:06:17 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail