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
Extracting IncludeBinary files to disk?
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
PB - Registered PureBasic Coder
Replying to my own post here, with an answer provided by Fred by E-Mail:If I use the IncludeBinary command to wrap a file into my exe, how can I extract it back to disk later during runtime?
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
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm