读书人

shellexecute参数传递(变量)有关问题

发布时间: 2013-04-09 16:45:09 作者: rapoo

shellexecute参数传递(变量)问题
shellexecute执行curl.exe命令,参数-o temp.txt http://m.weather.com.cn/data/101050201.html怎么传递?
char cmd_str[] = "-o temp.txt http://m.weather.com.cn/data/101050201.html";
ShellExecute(NULL, TEXT("open"), TEXT("C:\\curl.exe"),cmd_str, NULL, SW_SHOW); 这种写法哪里错误
也就是函数第四个参数怎么传递变量? shellexecute变量传递 shellexecute参数传递
[解决办法]

TCHAR cmd_str[] = _T("-o temp.txt http://m.weather.com.cn/data/101050201.html");
ShellExecute(NULL, _T("open"), _T("C:\\curl.exe"),cmd_str, NULL, SW_SHOW);

读书人网 >C++

热点推荐