先上代码.
CString str;
str = lpCmdLine;
str = "bin\\mono.exe \"TingMusicPlayer.exe\" \""+str;
str= str + "\"";
const char* lpcs = NULL;
USES_CONVERSION;
lpcs = T2A(str.GetBuffer(str.GetLength()));
WinExec(lpcs,SW_HIDE); lpCmdLine是C++MFC中_tWinMain的传入参数.
mono.exe是关于.net的一个开源框架,在批处理中
bin\mono.exe "TingMusicPlayer.exe" "72"
pause
能将参数72传给TingMusicPlayer.exe. 但第一段C++代码却不行.求方法.
CString str;
str = lpCmdLine;
str = "bin\\mono.exe \"TingMusicPlayer.exe\" \""+str;
str= str + "\"";
const char* lpcs = NULL;
USES_CONVERSION;
lpcs = T2A(str.GetBuffer(str.GetLength()));
WinExec(lpcs,SW_HIDE); lpCmdLine是C++MFC中_tWinMain的传入参数.
mono.exe是关于.net的一个开源框架,在批处理中
bin\mono.exe "TingMusicPlayer.exe" "72"
pause
能将参数72传给TingMusicPlayer.exe. 但第一段C++代码却不行.求方法.
str += "bin\\mono.exe \"TingMusicPlayer.exe\" \""+str;