Quote: " This will crash if you use any form of PE Compression either on your EXE or part of your DLLs."
Got a sample exe, I would like to try and fix it.
Quote: "you always make the coolest little helper apps!"
Thanks
Quote: "how do you see inside the exe - does the program extract the contents of the exe to a temp directory, like dbpro does when you run the exe?"
It's fairly easy to see inside an exe.
Dbpro exes are made up of a loader exe which takes up the first 73,728 bytes of the exe. The exact size of the loader exe varies between versions but it is usually safe to assume that a string "PADDINGXXPAD" will be the last data before the appended files.
Know you know where the files are stored and each file is stored in the exe as
long length - the lenght of the filename
filename
long length - the length of the filedata
Here is some dbpro code that will open a dbpro exe and list the files in it. The exe needs to be compiled with the latest version of dbpro.
sync on : sync
length as integer : i as integer : b as integer
name as string
open to read 1,"temp.exe"
`skip to filedata
skip bytes 1,73728
repeat
name = ""
`read name length
read long 1,length
`read name
for i = 1 to length
read byte 1,b
name = name + chr$(b)
next i
print name : sync
`skip filedata
read long 1,i
skip bytes 1,i
until length = 0
close file 1
wait key