C++ 打开exe文件的方法(VS2008)
#include "stdafx.h" #include <Windows.h> #include <ShellAPI.h> int _tmain(int argc, _TCHAR* argv[]) { SHELLEXECUTEINFO shell = { sizeof(shell) }; shell.fMask = SEE_MASK_FLAG_DDEWAIT; shell.lpVerb = L"open"; shell.lpFile = L"C:\\windows\\NOTEPAD.EXE"; shell.nShow = SW_SHOWNORMAL; BOOL ret = ShellExecuteEx(&shell); return 0; }
作者:Work Hard Work Smart
出处:http://www.cnblogs.com/linlf03/
欢迎任何形式的转载,未经作者同意,请保留此段声明!