C++ createprocess 打开word
#define FileName _TEXT("E:\\DuplicateHandle伪句柄与实句柄的应用.docx")
void CMFCApplication1Dlg::OnBnClickedButton3()
{
STARTUPINFO si = {sizeof(si)};
PROCESS_INFORMATION pi;
TCHAR tcPath[] = _TEXT("\"D:\\Program Files\\Microsoft Office\\Office14\\WINWORD.EXE \"") FileName;//EXE路径+文件名
CreateProcess(NULL, tcPath, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
}
版权声明:本文为博主原创文章,未经博主允许不得转载。