Use _tcslen(), which maps to strlen() or it's MBCS or UNICODE equivalents.
Also, you may be interested in using _tmain() and _tprintf(), as well as
using the _T() macro to "wrap" constant strings in your source. See the
documentation for details.
Andrew
Naresh Bhatia wrote in message ...
>I am trying to use the generic text function _tclen(), but it is
>always returning a 1. Here's an example:
>
>#include <stdio.h>
>#include <tchar.h>
>
>void main()
>{
> printf("%d", _tclen("Hello"));
>}
>
>Does anyone know what I am doing wrong? If I replace _tclen() with
>strlen() then it correctly returns 5.
>
>Thanks.
>
>Naresh
>
>
Naresh
>_tclen maps to routines for determining the length of a multibyte CHARACTER,
>not a string.
>Use _tcslen(), which maps to strlen() or it's MBCS or UNICODE equivalents.
>Also, you may be interested in using _tmain() and _tprintf(), as well as
>using the _T() macro to "wrap" constant strings in your source. See the
>documentation for details.
>Andrew
>Naresh Bhatia wrote in message ...
Juergen
--
*** Remove .NOSPAM junkbot confuser to reply ***
Naresh Bhatia <bha...@mediaone.net> wrote in article
<eqVK9xy...@uppssnewspub05.moswest.msn.net>...