Restored from previous forum. Originally posted by plopzz.
Hi all
My question : it is possible to "inject" somes files in my exe ? (same as delphi with ressources or others)
I try to join some files (dll, exe, jpg ...) in 1 exe and write files in a temp directory while exe running..
Thanks
inject file(s) in executable
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
Could look something like this:
Enjoy!
Edited by - Pupil on 03 August 2002 17:08:11
You can always use the IncludeBinary command to include files in your exe and then write them back to disk when run.Hi all
My question : it is possible to "inject" somes files in my exe ? (same as delphi with ressources or others)
I try to join some files (dll, exe, jpg ...) in 1 exe and write files in a temp directory while exe running..
Thanks
Could look something like this:
Code: Select all
; write to disk
if CreateFile(0, "tmp\file.jpg")
WriteData(?StartLabel, ?EndLabel-?StartLabel)
EndIf
... ; rest of code
End
; Included Data
StartLabel:
IncludeBinary "image.jpg"
EndLabel:
Edited by - Pupil on 03 August 2002 17:08:11
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi plopzz
If you only want to save some stuff, like pictures, sound temporay to disk for later use in your pogram i.e. - you can include the stuff and grab then using:
Result = CatchSound(#Sound, MemoryAddress)
Result = CatchImage(#Image, MemoryAddress)
Result = CatchSprite(#Sprite, MemoryAddress, Mode)
Result = CatchJPEGSprite(#Sprite, MemoryAddress, JPEGLength, Mode)
Maybe this is what you looking for...!? ,-)
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Hi plopzz
If you only want to save some stuff, like pictures, sound temporay to disk for later use in your pogram i.e. - you can include the stuff and grab then using:
Result = CatchSound(#Sound, MemoryAddress)
Result = CatchImage(#Image, MemoryAddress)
Result = CatchSprite(#Sprite, MemoryAddress, Mode)
Result = CatchJPEGSprite(#Sprite, MemoryAddress, JPEGLength, Mode)
Maybe this is what you looking for...!? ,-)
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten