Embed an application (exe file) into another exe file (mozEmbed like)

后端 未结 4 1503
悲&欢浪女
悲&欢浪女 2021-02-10 03:18

I would like to embed mozilla firefox into my application WITHOUT using any activex control (TWebBrowser wrapper, mozilla ActiveX...). I tried using TWebBrowser (actually bsalsa

4条回答
  •  感动是毒
    2021-02-10 03:57

    The simplest way to embed an EXE into your application is to add it as a resource.

    Make a .RC file with something like the following text:

    OTHER_EXE_FILE  RCDATA "nameofother.exe"
    

    then using brcc32.exe you can compile a .RES file of the same name as the .RC with which you can then include ($I) the new .RES file in your application. The NAMEOFOTHER.EXE has to be in the same folder as the .RC file or be properly pathed, IIRC.

    There is supposededly another way of doing this as well. You don't use the command line brcc32.exe compiler and just include ($I) the .RC file into your program and the compiler the compiles the .RC file on the fly.

    Can't tell you if the second method works or not as I've never tried it.

提交回复
热议问题