Page 1 of 1
Posted: Fri Nov 16, 2001 4:41 am
by BackupUser
Restored from previous forum. Originally posted by PB.
If I use the IncludeBinary command to wrap a file into my exe, how can I extract it back to disk later during runtime? I assume it's got to do with the WriteMemory commands, but I'm unsure of how to proceed. Thanks!
PB - Registered PureBasic Coder
Edited by - PB on 16 November 2001 04:45:29
Posted: Sat Nov 24, 2001 10:37 am
by BackupUser
Restored from previous forum. Originally posted by PB.
If I use the IncludeBinary command to wrap a file into my exe, how can I extract it back to disk later during runtime?
Replying to my own post here, with an answer provided by Fred by E-Mail:
Code: Select all
r=openfile(1,"c:\file.exe")
if r0
WriteData(?MyFile,xxx) ; xxx = File size (in bytes) of included binary.
closefile(1)
endif
end
MyFile:
IncludeBinary "c:\file.exe"
PB - Registered PureBasic Coder
Posted: Sat Nov 24, 2001 5:22 pm
by BackupUser
Restored from previous forum. Originally posted by Rings.
Interresting, a Pointer to a label inside the code.
This gives us the chance to make 'Selfmodified Code'.
Siggi
Posted: Sun Nov 25, 2001 2:54 am
by BackupUser
Restored from previous forum. Originally posted by fred.
Interresting, a Pointer to a label inside the code.
This gives us the chance to make 'Selfmodified Code'.
You're crazy ;-D.. BTW, I think than under windows code is as read-only (default behavior, so it wouldn't work..
Fred - AlphaSND