我用vc调用rar程序,不管压缩或解压都会闪出来DOS窗口.
请问如何不让DOS窗口显示,只是后台运行.
我用的方法是
CreateProcess();

解决方案 »

  1.   

    //调用外部程序进行压缩操作
    BOOL bSuccess=CreateProcess(NULL , /* filename */       
      cmd ,  /* full command line for child */       
      NULL,  /* process security descriptor */       
      NULL,  /* thread security descriptor */       
      FALSE,  /* inherit handles? Also use if STARTF_USESTDHANDLES */       
      CREATE_NO_WINDOW,  /* creation flags */       本行为隐藏窗口标志
      NULL,  /* inherited environment address */       
      NULL,  /* startup dir; NULL = start in current */       
      &si,  /* pointer to startup info (input) */       
      &pi);  /* pointer to process info (output) */