I had another memory flash: This year's code rage series of webinars had
Al Mannarino - Migrating your C++Builder Projects to Unicode
This is now on youtube:
"Above and beyond the call ..." heartfelt thanks once again.
strcat is now simply the '+' operator : String MyNewString = OldString1 + OldString2;
strcpy is now simply the '=' operator : String MyNextNewString = MyNewString;
Finally getting my 'ducks in a row'. You've been of tremendous help! Thanks for your time and effort to reply.
Thanks once again Roger. Just what I needed. No idea why this link didn't come up in my searches. Perhaps I was being too specific quoting C++ Builder XE.
Anyway, have already printed out the Migrating C++ pages to read through.
Thanks so much Roger for your reply. I've been pulling my hair out for the last few weeks on this one. Wish I had asked the question earlier. Going through web searches leads many dead ends.
There's tons of Char arrays and a few AnsiStrings around in the code (Main is 13,000 lines alone).
What I've been (slowly) doing is converting the Char arrays to wchar_t and ANSI Strings to Unicode Strings and the functions like strcat, strcpy etc to their wcs alternatives. Funny thing is though that there seems to be no Unicode string equivalents to these functions. Was that ever rectified in C++ Builder versions after XE1? Or am I missing something here?
Then one comes across functions like GetCurrentDir which requires a Unicode string in XE.
It's only when you run into problems later on that one's poor choices become apparent. I'd started by converting Char types to Unistrings but this has proven to be a headache. Hope I'm going in the right direction rather using wchar_t to replace char arrays?
Pity Embarcadero didn't provide a converter when they changed over from Borland C++ to Builder.
Anyway, I'm learning :-)
Cheers and thanks again.
I've been given the source for an old C++ program (presumably written with Borland C++) to update. However I'm having numerous problems with the conversion, particularly with char/strings.
I've set the Project/options/directory and conditionals _Tchar Maps to: Char
but still end up with errors such as:
[BCC32 Error] ModDispField.cpp(21): E2034 Cannot convert 'char' to 'wchar_t *'
Memo1->SetTextBuf(m_DF); where M_DF is defined in a global header as extern char m_DF;
I normally use Delphi (currently on Tokyo) so C++ is pretty much an unknown quantity to me (haven't looked at it since I bought XE studio).
I've tried enabling 'Backward Compatibility', Enable all compatibility options' and 'non-constant string literals' without success.
The aim is simply to get the C++ source to compile so I can step through the logic and then re-write in Pascal.
Any help would be appreciated. I've searched the web but most information seems to be related to converting Borland C++ to Visual C++.
Is there a 'step by step' guide for conversion available anywhere?
My first venture into multimedia.
I've set up a project that uses TMediaPlayer to record from a microphone and save as 'Trial.Wav' which works OK as is.
1. With TMediaPlayer is the sound recorded buffered then subsequently saved as a wav file or is it streamed directly to disk?
2. If buffered how do I locate the buffer? (Reason I need to further process the wav data in real time).
3. Final part is displaying the data on screen (like an oscilloscope), vary input volume etc.
Is this possible with TMediaPlayer or do I need to revert directly to the Windows API?
If the later, any suggested resources in finding the required information to accomplish my tasks? Even if I have to purchase a Windows programming book that covers these topics is OK (although I'd prefer online documentation). I've looked through the Microsoft site and find it very difficult to navigate their structures.
Thanks in anticipation.