Home > Archive > Smartphone Developer Forum > December 2005 > Which group of string function to use
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Which group of string function to use
|
|
| Jeffrey 2005-12-07, 7:09 pm |
| Depending on whether we are using _UNICODE or _MBCS, _tcsrev maps to either
_wcsrev or _mbsrev, even strrev.
But when I use it, the compiler warn me that _wcscpy function that I mapped
to is deprecated. I found there are other functions such as strcpy_s that are
supposed to be more secure to use. 1) is that right/latest function to use?
So, if I want to compile code that can be run in either _UNICODE or _MBCS,
2) which function should I use?
Thanks.
| |
|
| Jeffrey wrote:
> Depending on whether we are using _UNICODE or _MBCS, _tcsrev maps to either
> _wcsrev or _mbsrev, even strrev.
>
> But when I use it, the compiler warn me that _wcscpy function that I mapped
> to is deprecated. I found there are other functions such as strcpy_s that are
> supposed to be more secure to use. 1) is that right/latest function to use?
The most secure - and the one MS suggests, is the string safe functions.
See StringCchCopy/StringCbCopy
in strsafe.h
I don't think it's documented in the 2003 SDK, but i see the header is
there.
>
> So, if I want to compile code that can be run in either _UNICODE or _MBCS,
> 2) which function should I use?
I have to confess i'm lazy - and use lstrcpy() and friends.
Riki
I can't seem to find time to procrastinate!
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support
|
|
|
|
|