What does lpctstr mean?

xiaoxiao2021-03-31  219

How to understand LPCTSTR,

L Represents the long pointer, which is to comply with the 16-bit operating system such as Windows 3.1, in Win32, and other 32 for the operating system, the long pointer and NEAR pointer and FAR modifiers are for compatibility. There is no practical meaning.

P Represents this is a pointer

C is a constant

T In the Win32 environment, there is a _t macro, this macro is used to indicate if your character uses Unicode, if your program defines Unicode or other related macros, then this character or string will be used as a Unicode string, Otherwise it is a standard ANSI string.

STR indicates that this variable is a string.

Therefore, LPCTSTR represents a string that can change the semantic semantic in accordance with some macros.

Similarly, LPCSTR can only be an ANSI string, and we use the Type Type definition in the program.

LPCTSTR == const tchar *

转载请注明原文地址:https://www.9cbs.com/read-130911.html

New Post(0)