|
-
Mar 4th, 2002, 03:33 AM
#1
Thread Starter
New Member
EXE in a resource file
I'm making a simple installer program for a little program a group of us made, I placed the EXE in a resource file, put it in the installer project, but when extracting it to an EXE file there are 12 extra bytes added to the front of the program, causing it to not work.
this is the code I'm using to try and write it from the res file to an EXE.
kioskexe = LoadResData("KIOSK.EXE", "CUSTOM")
KioskICO = LoadResData("KIOSK.ICO", "CUSTOM")
'Extracts Kiosk.exe from Kiosk Install.exe
Open frm_install4.InstallDir & "\kiosk.exe" For Binary As #1
Put #1, , kioskexe
Close #1
Anyone got an idea why it isn't working
-
Mar 4th, 2002, 05:04 AM
#2
Retired VBF Adm1nistrator
Um why not just remove the first 12 bytes then ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 4th, 2002, 05:22 AM
#3
Thread Starter
New Member
I did that but now I notice other files I have in the resource file also have this problem,, but the number of bytes in front of what should be seems dependent on how large the file is.
The data in the resource file is fine, I checked it in debug mode and it is how it should be after taking it out of the resource file, but on write it's adding these stupid extra bytes.
I would have to open the file, input it all, clear out the excess and output it again, creating the same problem.
God only knows why it's adding this excess stuff.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|