LPSTR = char*LPCSTR = const char*LPTSTR:如果定義了UNICODE宏,那麼LPTSTR = wchar_t*否則LPTSTR = char*LPCTSTR:如果定義了UNICODE宏,那麼LPCTSTR = const wchar_t*,否則LPCSTR = const char*告訴你方法,"LP"字首是歷史遺留的,在Win32下就是 P ,代表指標的含義。"C"代表const"T"的含義就是如果定義了UNICODE,它就是寬字元版本,否則就是Ansi版本。完整定義如下://Unicode 版本typedef wchar_t WCHAR;typedef WCHAR *PWCHAR;typedef WCHAR *LPWCH, *PWCH;typedef CONST WCHAR *LPCWCH, *PCWCH;typedef WCHAR *NWPSTR;typedef WCHAR *LPWSTR, *PWSTR;typedef WCHAR UNALIGNED *LPUWSTR, *PUWSTR;typedef CONST WCHAR *LPCWSTR, *PCWSTR;typedef CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR;// Ansi版本typedef CHAR *PCHAR;typedef CHAR *LPCH, *PCH;typedef CONST CHAR *LPCCH, *PCCH;typedef CHAR *NPSTR;typedef CHAR *LPSTR, *PSTR;typedef CONST CHAR *LPCSTR, *PCSTR;#ifdef UNICODE typedef WCHAR TCHAR, *PTCHAR; typedef WCHAR TBYTE , *PTBYTE ; typedef LPWSTR LPTCH, PTCH; typedef LPWSTR PTSTR, LPTSTR; typedef LPCWSTR PCTSTR, LPCTSTR; typedef LPUWSTR PUTSTR, LPUTSTR; typedef LPCUWSTR PCUTSTR, LPCUTSTR; typedef LPWSTR LP;#else typedef char TCHAR, *PTCHAR; typedef unsigned char TBYTE , *PTBYTE ; typedef LPSTR LPTCH, PTCH; typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;#endif
LPSTR = char*LPCSTR = const char*LPTSTR:如果定義了UNICODE宏,那麼LPTSTR = wchar_t*否則LPTSTR = char*LPCTSTR:如果定義了UNICODE宏,那麼LPCTSTR = const wchar_t*,否則LPCSTR = const char*告訴你方法,"LP"字首是歷史遺留的,在Win32下就是 P ,代表指標的含義。"C"代表const"T"的含義就是如果定義了UNICODE,它就是寬字元版本,否則就是Ansi版本。完整定義如下://Unicode 版本typedef wchar_t WCHAR;typedef WCHAR *PWCHAR;typedef WCHAR *LPWCH, *PWCH;typedef CONST WCHAR *LPCWCH, *PCWCH;typedef WCHAR *NWPSTR;typedef WCHAR *LPWSTR, *PWSTR;typedef WCHAR UNALIGNED *LPUWSTR, *PUWSTR;typedef CONST WCHAR *LPCWSTR, *PCWSTR;typedef CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR;// Ansi版本typedef CHAR *PCHAR;typedef CHAR *LPCH, *PCH;typedef CONST CHAR *LPCCH, *PCCH;typedef CHAR *NPSTR;typedef CHAR *LPSTR, *PSTR;typedef CONST CHAR *LPCSTR, *PCSTR;#ifdef UNICODE typedef WCHAR TCHAR, *PTCHAR; typedef WCHAR TBYTE , *PTBYTE ; typedef LPWSTR LPTCH, PTCH; typedef LPWSTR PTSTR, LPTSTR; typedef LPCWSTR PCTSTR, LPCTSTR; typedef LPUWSTR PUTSTR, LPUTSTR; typedef LPCUWSTR PCUTSTR, LPCUTSTR; typedef LPWSTR LP;#else typedef char TCHAR, *PTCHAR; typedef unsigned char TBYTE , *PTBYTE ; typedef LPSTR LPTCH, PTCH; typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;#endif