Strings. TCHAR LPWCS LPCTSTR CString. Whats what here, simple quick

后端 未结 2 1229
眼角桃花
眼角桃花 2020-12-20 03:25
TCHAR szExeFileName[MAX_PATH]; 
GetModuleFileName(NULL, szExeFileName, MAX_PATH);

CString tmp;
lstrcpy(szExeFileName, tmp);
CString out;
out.Format(\"\\nInstall32 a         


        
2条回答
  •  清歌不尽
    2020-12-20 03:38

    My guess is you are compiling in Unicode mode.

    Try enclosing your format string in the _T macro, which is designed to provide an always-correct method of providing constant string parameters, regardless of whether you're compiling in Unicode or ANSI mode:

    out.Format(_T("\nInstall32 at %s\n"), tmp);
    

提交回复
热议问题