在vc中怎么调用exe文件并传递参数
1个回答
展开全部
add.exe是怎么读取参数里面的两个一维数组的?字符串吗?
1
2
3
ShellExecute(m_hWnd,<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">TEXT</a>("open"),<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d"target="_blank" class="baidu-highlight">TEXT</a>("c:\\add.exe"),<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">TEXT</a>(" \"11,12,13,14\",\"21,22,23,24\""),<a href="https://www.baidu.com/s?wd=NULL&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">NULL</a>,SW_SHOWNORMAL);
//这样就调用了c:\add.exe,并传入"11,12,13,14","21,22,23,24"两个参数。
1
2
3
ShellExecute(m_hWnd,<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">TEXT</a>("open"),<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d"target="_blank" class="baidu-highlight">TEXT</a>("c:\\add.exe"),<a href="https://www.baidu.com/s?wd=TEXT&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">TEXT</a>(" \"11,12,13,14\",\"21,22,23,24\""),<a href="https://www.baidu.com/s?wd=NULL&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y3P1N9nW7hmH6LrAnkuW6d0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPjRvPHT4rjfsPH0zrHn1rj0d" target="_blank" class="baidu-highlight">NULL</a>,SW_SHOWNORMAL);
//这样就调用了c:\add.exe,并传入"11,12,13,14","21,22,23,24"两个参数。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询