VC++ 字符串Dword、LPSTR、LPWSTR、LPCSTR、LPCWSTR、LPTSTR、LPCTSTR
类 型 | MBCS | UNICODE |
TCHAR | char | char |
WCHAR | wchar_t | wchar_t |
LPSTR | char* | char* |
LPCSTR | const char* | const char* |
LPWSTR | wchar_t* | wchar_t* |
LPCWSTR | const wchar_t* | const wchar_t* |
LPTSTR | TCHAR* | TCHAR* |
LPCTSTR | const TCHAR* | const TCHAR* |
相互转换方法: LPWSTR->LPTSTR: W2T(); LPTSTR->LPWSTR: T2W(); LPCWSTR->LPCSTR: W2CT(); LPCSTR->LPCWSTR: T2CW(); ANSI->UNICODE: A2W(); UNICODE->ANSI: W2A();