在vc 中调用 ansys??
各位豪杰: 我想在vc 中调用 ansys,怎么解决啊?{
// TODO: Add your control notification handler code here
STARTUPINFO StartupInfo;
PROCESS_INFORMATION ProcessInfo;
memset(&StartupInfo,0,sizeof(STARTUPINFO)); //分配内存
StartupInfo.cb=sizeof(STARTUPINFO); // 初始化
StartupInfo.dwFlags=STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow=SW_SHOWMAXIMIZED;
if(!::CreateProcess(NULL,"C:\\Program Files\\Ansys Inc\\v100\\ANSYS\\bin\\intel\\ansysb",NULL,NULL,FALSE,0,NULL,NULL,&StartupInfo,&ProcessInfo))
{
AfxMessageBox("error!");
GetLastError();
} // 创建进程
pHandle = ProcessInfo.hProcess; //创建的进程的句柄
CDialog::OnOK();
}