VC++中string、char* 转换为LPCSTR

CHAR   wsz[1024];
 wsprintf(wsz,   L"%S",   pszMsg);

CHAR   wsz[1024];
 wsprintf(wsz,   L"%S",   str.c_str());

注意:其中%S要大写 

原文地址:https://www.cnblogs.com/tuzhiye/p/1682367.html