From: Norman Diamond on
s/all/most/


"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:m95dt3l47s9gbigdkqj6qvv2jrlb61tgdi(a)4ax.com...
> This would be a Bad Idea. You have to convert all of it to use Unicode.
> Note that you
> can do part of the conversion gradually, but leave it as ANSI. For
> example, make sure all
> uses of 'char' are replaced by 'TCHAR', all uses of 'char *' by 'LPTSTR'
> and all uses of
> 'const char *' by LPCTSTR. Make sure all "..." and '.' literals have _T()
> around them.
> Replace all str... functions with their corresponding _tcs... functions.
> Watch out for
> confusions caused by thinking strlen or .GetLength() tell you the number
> of bytes, and fix
> them to do *sizeof(TCHAR) as part of the computation (and the inverse:
> byte counts
> disguised as character counts). Ditto for sizeof(). When you have all
> the code converted
> like this, then just build a new configuration in VS6 for Unicode Debug
> and one for
> Unicode Release, build in the Unicode Debug and start testing. This is by
> far the best
> approach. Don't try to convert one DLL to Unicode-only, and try to
> integrate it to an
> ANSI app; that way madness lies.
> joe
>
> On Tue, 11 Mar 2008 15:14:27 +0200, "Rami" <rami(a)giron.com> wrote:
>
>>I have a project in VC 6.0 which composed of a one main and several dll's.
>>I want to convert all the projects gradually to UNICODE. However, since
>>its
>>a gradual process, through the debugging and integration, I may need to
>>work
>>with ASCII as well.
>>Is it possible to do so?
>>Is there some constrain on the interface in this case(or some other)?
>>
>>Regards
>>Rami
>>
> Joseph M. Newcomer [MVP]
> email: newcomer(a)flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm

From: David Ching on

"Ajay Kalra" <ajaykalra(a)yahoo.com> wrote in message
news:BC1E2EE3-FEE0-4CAC-B094-AFC401AE5179(a)microsoft.com...
>
> "Bob Moore" wrote in message
> news:jh5et3ped2q5mmuu8c8je4f7t3587ui7mv(a)4ax.com...
>> On Tue, 11 Mar 2008 14:45:46 -0400, Ajay Kalra wrote:
>>
>>>I think you need both, UNICODE and _UNICODE.
>>
>> Yes, one is for the Windows api, the other for the C runtime,
>
> Thats how I recall it.
>

There is an IDE setting in the General project page that you can set this in
a combobox. No need to type any of these #defines anymore.

-- David


From: David Webber on

"Rami" <rami(a)giron.com> wrote in message
news:uFWvSn3gIHA.6032(a)TK2MSFTNGP03.phx.gbl...

>I have a project in VC 6.0 which composed of a one main and several dll's.
> I want to convert all the projects gradually to UNICODE. However, since
> its
> a gradual process, through the debugging and integration, I may need to
> work
> with ASCII as well.
> Is it possible to do so?
> Is there some constrain on the interface in this case(or some other)?

I'll back up what Ajay and Joe said. I converted a large project
gradually, but the gradual bit was replacing all the char's by TCHAR's (in a
project with multiple DLLs) and of course all the other stuff which has to
be consistent with that, over a period of about a year.

When I thought I had finished, I defined UNICODE and _UNICODE in the
projects, and it became Unicode. Of course I had missed a few things but
it only took a few hours of bug hunting.

But I did it in VS2005 - it may be harder in VC6.0.

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm

From: Giovanni Dicanio on

"David Ching" <dc(a)remove-this.dcsoft.com> ha scritto nel messaggio
news:63IBj.193$qS5.58(a)nlpi069.nbdc.sbc.com...

> There is an IDE setting in the General project page that you can set this
> in a combobox. No need to type any of these #defines anymore.

If the OP is using VC6 (like I read in the first post), I think he must use
the #defines.

This Mihai's blog entry can help:

Visual Studio Unicode projects
http://www.mihai-nita.net/article.php?artID=20060723a

Giovanni


From: Bob Moore on
On Tue, 11 Mar 2008 20:25:53 -0700, "David Ching"
<dc(a)remove-this.dcsoft.com> wrote:

>There is an IDE setting in the General project page that you can set this in
>a combobox. No need to type any of these #defines anymore.

I just went and looked. You mean Configuration Properties ~ General ~
Character Set ?

I didn't know that existed. Thanks for pointing this out.

Bob Moore
http://bobmoore.mvps.org/
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: CDhtmlDialog Charset Problem
Next: Can't get OLE interface