Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7863917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:37:47+00:00 2026-06-02T23:37:47+00:00

While porting a C++ Program from 32 to 64 bit under windows I realized

  • 0

While porting a C++ Program from 32 to 64 bit under windows I realized _tcslen is not supported and instead strlen/wcslen (for non-unicode/unicode) should be used. I started to wonder

  1. If wcslen is part of the ISO/IEC 14882:2003 C++ standard library. I see this function is supported both by g++ as well as VC++. Also in open group I found a reference stating The functionality described on this reference page is aligned with the ISO C standard but didn’t mention if its C89 or c99.
  2. Is it documented somewhere that _tcslen is not compatible with Win64? Even the MSDN Link doesn’t hint a thing.
  3. For Unicode can wcslen be used inadvertently instead of _tcslen?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:37:48+00:00Added an answer on June 2, 2026 at 11:37 pm
    1. Yes it is. Table 48 in section 21.4 gives wcslen as one of the functions declared in <cwchar>.
    2. _tcslen is also available when doing x64 builds.
    3. As long as _UNICODE is defined then _tcslen expands to wcslen. The only thing you gain by using _tcslen is that theoretically you can make an ANSI build of your application by flipping a switch; practically there is nothing you stand to gain from this (ANSI builds in 2012 are simply atrocious IMHO) and it takes actual work to make your build work both ways. I would not recommend it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While porting an application from SQL 2005 to SQL Server Compact Edition, I found
While porting a desktop application to windows mobile I've reached the following error: Error
While porting over a code fragment from python I've stumbled over a trivial problem:
I have a problem while porting a Linux tool to Windows. I am using
I'm in the process of porting an application from Windows to Mac OS X.
While porting an application from Linux x86 to iOS ARM (iPhone 4), I've discovered
I am porting a Unix C application to Windows. This application renames files while
While I do a program, sometimes I've got this doubt. I have been using
While googling how to convert a BIT (YESNO) column in an access database to
EDIT I had a problem a while ago writing a program in C which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.