Announcement

Collapse
No announcement yet.

Embedding a DLL or an EXE file in my EXE.......

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • William Burns
    replied
    awhile back i posted some source code to embed and extract files like dll, exe, etc.

    see:
    http://www.powerbasic.com/support/pb...ad.php?t=23527



    ------------------
    "i haven't lost my mind... its backed up on tape... i think??"

    Leave a comment:


  • George Bleck
    replied
    Real simple...

    (1) Attach it as a raw data resource
    (2) Extract the resoruce and save it to disk when necessary
    (3) SHELL to where you saved it to run it
    (4) Clean-up (delete) when done running it when your application ends

    ------------------
    Every day I try to learn one thing new,
    but new things to learn are increasing exponentially.
    At this rate I’m becoming an idiot faster and faster !!!
    ------------------
    George W. Bleck
    Lead Computer Systems Engineer
    KeySpan Corporation

    Leave a comment:


  • Steve Hutchesson
    replied
    If you want to actually embeda binary file within an EXE file,
    use a DB sequence to store the data.
    Code:
      label:
        ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
        etc ....
    You will need a utility to do the conversion and they are easy
    enough to write, just load the file into memory and write the
    value for each byte in the above DB format.

    Regards,

    [email protected]

    ------------------

    Leave a comment:


  • Wayne Diamond
    replied
    Elias, yes - the SHELL line in the code above executes the file after it has been extracted



    ------------------
    The PowerBASIC Crypto Archives - My Email - What's mine is yours...

    Leave a comment:


  • Frederic Faure
    replied
    I don't know if you can add an EXE to an EX, but PEBundle among others can add DLL's to an EXE:
    http://www.collakesoftware.com

    Fred.

    ------------------

    Leave a comment:


  • Elias Montoya
    replied

    can i still run it this way? if so, how?

    ------------------
    Learning is not the capacity to retain information, It is the capacity to compare old information with new information... And make new Knowledge.

    Leave a comment:


  • Wayne Diamond
    replied
    The easiest way is just whack it on the end of your exe. Assume your exe is 10000 bytes in size, the code might be something like this:
    Code:
    DIM sFile AS STRING
    OPEN MyExename FOR BINARY ACCESS READ LOCK SHARED AS #1
     GET$ #1, LOF(1) - 10000, sFile
    CLOSE #1
    OPEN "c:\dumped.exe" FOR BINARY ACCESS WRITE LOCK SHARED AS #1
     PUT #1, 1, sFile
    CLOSE #1
    SHELL "c:\dumped.exe"

    ------------------
    The PowerBASIC Crypto Archives - My Email - What's mine is yours...

    Leave a comment:


  • Embedding a DLL or an EXE file in my EXE.......

    I can call external programs using shell o Shellexecute,
    but is there a way to embed an EXE (RAR.exe for example, wich
    is the one o most use) in my Exe?

    or is at least a way to extract some of the functions?

    ------------------
    Learning is not the capacity to retain information, It is the capacity to compare old information with new information... And make new Knowledge.
Working...
X