zoukankan      html  css  js  c++  java
  • WinRAR命令

    char str[]="c:\\Program Files\\WinRAR\\WinRAR.exe e -hp11111111 Quan1.rar";  

    PROCESS_INFORMATION   pidInfo;  

    STARTUPINFO           startInfo;  

    BOOL b;

     char *buf=" ";  

    startInfo.cb                     =   sizeof(STARTUPINFO);  

    startInfo.lpReserved     =   NULL;  

    startInfo.lpTitle           =   NULL;  

    startInfo.lpDesktop       =   NULL;  

    startInfo.dwX                   =   0;  

    startInfo.dwY                   =   0;  startInfo.dwXSize           =   0;  

    startInfo.dwYSize           =   0;  startInfo.dwXCountChars         =   0;  

    startInfo.dwYCountChars         =   0;  

    startInfo.dwFlags           =   STARTF_USESTDHANDLES;  

    startInfo.wShowWindow   =   0;   //SW_SHOWDEFAULT;  

    startInfo.lpReserved2   =   NULL;  

    startInfo.cbReserved2   =   0;  

    startInfo.hStdInput       =   GetStdHandle(STD_INPUT_HANDLE);  

    startInfo.hStdOutput     =   GetStdHandle(STD_OUTPUT_HANDLE);  

    startInfo.hStdError       =   GetStdHandle(STD_ERROR_HANDLE);    

    b=CreateProcess(NULL,str,NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&startInfo,&pidInfo);  

    if(!b)  

    {   

    MessageBox(NULL,"failed",NULL,0);  

    }

     WaitForSingleObject(pidInfo.hProcess,INFINITE);

     CloseHandle(pidInfo.hProcess);  

    CloseHandle(pidInfo.hThread);

  • 相关阅读:
    利用百度轻松语音合成,语音识别
    python圆周率计算小程序(非常慢)
    python成语接龙小游戏
    在数组添加元素时报错:IndexError: list index out of range
    Redis-jedis的使用
    Shiro整合SpringMVC简单实例(一)
    容器
    防重提交功能(Token技术的引入)
    PageUtil
    单例设计模式
  • 原文地址:https://www.cnblogs.com/quansir/p/2879470.html
Copyright © 2011-2022 走看看