c调用exe

来源:互联网 发布:用单片机实现电子音响 编辑:程序博客网 时间:2024/05/16 06:20

 

 

#include "stdafx.h"

#define WIN32_LEAN_AND_MEAN

#include <windows.h>

#include <shellapi.h>

#include <shlwapi.h>

#include <wininet.h>

#include <strsafe.h>

 

int _tmain(int argc, _TCHAR* argv[])

{

SHELLEXECUTEINFO   ShExecInfo   =   {0};  

ShExecInfo.cbSize   =   sizeof(SHELLEXECUTEINFO);  

ShExecInfo.fMask   =   SEE_MASK_NOCLOSEPROCESS;  

ShExecInfo.hwnd   =   NULL;  

ShExecInfo.lpVerb   =   _T("open");  

ShExecInfo.lpFile   =   _T("Lib_ActiveSeg//segment.exe");                          

ShExecInfo.lpParameters   =   _T("Lib_ActiveSeg//100000.jpg -f Lib_ActiveSeg//point.txt");              

ShExecInfo.lpDirectory   =   NULL;  

ShExecInfo.nShow   =   SW_HIDE;  

ShExecInfo.hInstApp   =   NULL;              

ShellExecuteEx(&ShExecInfo); 

return 0;

}