Thread View: borland.public.cppbuilder.upgrade
2 messages
2 total messages
Started by John Mc
Fri, 25 Jul 2008 18:43
WideString worked in BCB6 but not in BDS2006
Author: John Mc
Date: Fri, 25 Jul 2008 18:43
Date: Fri, 25 Jul 2008 18:43
22 lines
1539 bytes
1539 bytes
I have some code that looks something like this: AnsiString strName; WideString nameWideStr; // some code to build strName ThirdPartyFunc1(nameWideStr); 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 *' [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? Thanks in advance for your help. J
Re: WideString worked in BCB6 but not in BDS2006
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads