多進程實現DOS重定向輸出,界面如下:
主要的代碼實現如下:
MAXREADBUFFERLEN (60 * 1000) CString strCommand, strFileName(_T( m_strCommand.TrimRight(_T( (m_strCommand == _T( strCommand.Format(_T( ZeroMemory(&si, si.cb = si.wShowWindow = si.dwFlags = STARTF_USESHOWWINDOW | BOOL res = CreateProcess(NULL, strCommand.GetBuffer( NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW, NULL, NULL, &si, & (! AfxMessageBox(_T( TCHAR szBuff[MAXREADBUFFERLEN] = { BOOL bSuccess = file.Read((TCHAR* bSuccess = Sleep( m_strResult.Format(_T(), (TCHAR* AfxMessageBox(_T(), MB_ICONERROR | }
下載地址:http://pan.baidu.com/s/1eQl6pTC