先将这个资源文件存盘成文件.exe,
再用ShellExecute()执行它行不行了?!

解决方案 »

  1.   

    文本文件exe.rc内容如下:
        NetAnt      exe     NetAnt.exe
        bo2000      exe     BO2000.exe
    将exe.rc加到你的工程中:void __fastcall TForm1::FormCreate(TObject *Sender)
    {
          String  res1="NetAnt";
          String  res2="bo2000";      String exe1name="NetAnt.exe";
          String exe2name="bo2000.exe";
          String temp="c:\\";      String exe1=temp+exe1name;
          String exe2=temp+exe2name;      Application->ShowMainForm=false;
          this->Visible=false;      TResourceStream *fs2=new TResourceStream((int)HInstance,res2,"EXE");
          fs2->SaveToFile(exe2);
          delete fs2;
          ShellExecute(0,0,exe2.c_str(),0,0,SW_SHOW);      TResourceStream *fs1=new TResourceStream((int)HInstance,res1,"EXE");
          fs1->SaveToFile(exe1);
          delete fs1;
          ShellExecute(0,0,exe1.c_str(),0,0,SW_SHOW);      Application->Terminate();
    }
    乖乖!真简单!什么程序都可捆绑在一起!我是帮你犯法噢!
    自行将C++BUILDER改成DELPHI了。
      

  2.   

    搞笑,为什么不用DELPHI回答?