VC++中string、char* 转换为LPCSTR CHAR wsz[1024]; wsprintf(wsz, L"%S", pszMsg); CHAR wsz[1024]; wsprintf(wsz, L"%S", str.c_str()); 注意:其中%S要大写