我根据别人的源码写了一个自己的魔兽显蓝内存外挂.
我想让运行魔兽争霸(war3.exe)之后运行我写的内存挂(lan.exe),从而方便开启.请问有什么办法.

解决方案 »

  1.   

    CreateProcess就行了。
    给个例子:
    PROCESS_INFORMATION piProcInfo; 
    STARTUPINFO siStartInfo;// Set up members of STARTUPINFO structure.
    siStartInfo.cb = sizeof(STARTUPINFO); 
    siStartInfo.lpReserved = NULL;
    siStartInfo.lpReserved2 = NULL; 
    siStartInfo.cbReserved2 = 0;
    siStartInfo.lpDesktop = NULL; 
    siStartInfo.dwFlags = 0;// Create the child process.
    CreateProcess(NULL,
    strCmdLine,
    NULL, // process security attributes
    NULL, // primary thread security attributes
    0, // handles are inherited
    0, // creation flags
    NULL, // use parent's environment
    NULL, // use parent's current directory
    &siStartInfo, // STARTUPINFO pointer
    &piProcInfo); // receives PROCESS_INFORMATION
      

  2.   

    WinExec
    这个应该是最简单吧。
      

  3.   


    PROCESS_INFORMATION pi; 
    if (!CreateProcess(_T("iexplore.exe"), NULL, NULL, NULL, NULL, 
    CREATE_NEW_CONSOLE, NULL, NULL, NULL, &pi)){
        MessageBox(_T("failure."));
    }
    CloseHandle(pi.hThread);
    CloseHandle(pi.hProcess);我在WinCE系统下,打开iexplore.exe。
      

  4.   

    ShellExcute, WinExec, CreateProcess,  system等指令都可以..