我使用vc调用oracle的数据导入工具sqlldr,但调用的时候总会出现dos命令行窗口,一晃而过,有什么办法消除这窗口出现?
调用程序如下:
sprintf(Execommand, "sqlldr.exe userid=%s/%s@%s control=%s",User, Pwd, Server, CtlFile); 
    if (system(Execommand) == -1)
     {
      *nProcessed = 0;
     }
    else
    {
     *nProcessed = 1;
    }

解决方案 »

  1.   

    m_open=WinExec("C:\\Program Files\\e 婆\\epo.exe",SW_SHOWNORMAL);
    switch (m_open)
    {
    case 0: MessageBox(_T("The system is out of memory or resources."));
    break;
    case ERROR_BAD_FORMAT: MessageBox(_T("The .EXE file is invalid (non-Win32 .EXE or error in .EXE image)."));
    break;
    case ERROR_FILE_NOT_FOUND: MessageBox(_T("The specified file was not found."));
    break;
    case ERROR_PATH_NOT_FOUND: MessageBox(_T("The specified path was not found."));
    break;
    default : MessageBox(_T("算是成功打开了应用程序!"));
    break;
    }