LPCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. This type is declared in WinNT.h as follows: typedef __nullterminated CONST CHAR *LPCSTR; |
指向以NULL结尾的const ansi字符串(每个字符为8位)
LPCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. This type is declared in WinNT.h as follows: typedef CONST WCHAR *LPCWSTR; |
指向以NULL结尾的const unicode字符串(每个字符为16位)
LPCTSTR | An LPCWSTR if UNICODE is defined, an LPCSTR otherwise. This type is declared in WinNT.h as follows: #ifdef UNICODE typedef LPCWSTR LPCTSTR; #else typedef LPCSTR LPCTSTR; #endif |
可在LPCSTR和LPCWSTR两种数据类型间转换,取决于与预处理宏UNICODE的定义与否
LPSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. This type is declared in WinNT.h as follows: typedef CHAR *LPSTR; |
指向以NULL结尾的ansi字符串 (每个字符为8位)
LPWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. This type is declared in WinNT.h as follows: typedef WCHAR *LPWSTR; |
LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise. This type is declared in WinNT.h as follows: #ifdef UNICODE typedef LPWSTR LPTSTR; #else typedef LPSTR LPTSTR; #endif |
可在LPSTR和LPWSTR两种数据类型间转换,取决于与预处理宏UNICODE的定义与否
TCHAR | A WCHAR if UNICODE is defined, a CHAR otherwise. This type is declared in WinNT.h as follows: #ifdef UNICODE typedef WCHAR TCHAR; #else typedef char TCHAR; #endif |
可在char和wchar之间转换,取决于与预处理宏UNICODE的定义与否
助记字母:
LP – long pointer (32位指针,win32编程指针都为LP)
C – constant
W – wide(UNICODE宽字符)
T – transferable (可转换的)