lstrlen and other lstrxxx functions are Windows APIs. They have ANSI and Unicode versions lstrlenA and lstrenW. They had some advantages over strlen back in the days of Windows 3.1. They don't have any advantages now. If you write your code with these functions it will not be compatible with any standard in C, it will only compile in Windows.
_tstrlen is a macro for either ANSI strlen or Unicode wcslen which are standard C. This was useful in the 1990s and early 2000s because you could write one set of code which could be compiled in ANSI for Windows 95, and Unicode for Windows NT. It's also useful because Microsoft can write one set of documentation for both ANSI and Unicode.
Otherwise these _tstrxxx string macros and TCHAR etc. are no longer useful. There is no point to go through all this pain to write code which is compatible for Windows 95. You can just use "wide c-string" wcsxxx functions which are standard C.
But then, the *nix operating systems use UTF-8 and strxxx functions. As opposed to Windows which uses UTF-16 and wcsxxx. I suppose you could use the _tstrxxx macros to write code which is Unicode compatible in both *nix and Windows. Other programmers will be confused by your _tstrxxx macros but at least the code has a better chance to compile!
re-inventthose macros were there since the early 90s to allow people to compile the same code for ANSI or Unicode. Remember, OSs didn't use Unicode before Windows NT. C++ only added Unicode in 2011 with thechar16_t,char32_t,std::u16stringandstd::u32stringtypes.lstrlenor` _tcslen` in C++. You should use the language's types and algorithms. Use std::string.length() or u16string.length(). You should useautofor type inference. Use and pass references and smart pointers with unique_ptr instead of raw pointers that can easily leak. Iterators instead of pointer arithmetic