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);

  • 相关阅读:
    C#网络编程.套接字.TcpListener.TcpClient
    GUI原型设计工具
    C#网络编程.2.套接字.TcpListener.TcpClient.服务端客户端通信
    网站开发策略选择
    jsdefinitionguide0221
    jquery0224
    sql trigger
    实现类似51job的选择框
    完美曲线
    MonoDroid
  • 原文地址:https://www.cnblogs.com/quansir/p/2879470.html
Copyright © 2011-2022 走看看