Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modify or add resources in compiled exe
#5
Hi Gintaras,
I try to replace mdb database with UpdateResource function. The function work fine and replace database in my exe but this code corrupts my DB.


Code:
Copy      Help
str tempexesave.from(_qmdir "temp.exe")
str mdbtosave.from(_qmdir "data.mdb")

;create a exe copy
cop ExeFullPath  tempexesave

;replace old database
int r=BeginUpdateResource(tempexesave 0)
str filedainc.getfile(mdbtosave)
long lenfiledainc=filedainc.len
UpdateResource(r +10 +200 0 &filedainc lenfiledainc)
r=EndUpdateResource(r 0)


What is wrong?

Thank's
Alessandro


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)