|
-
May 21st, 2020, 08:06 PM
#12
Re: [RESOLVED] How to change resource file data of an executable?
 Originally Posted by reexre
Olaf
It do not work for replacing PNG resource.
At then Beginnig I have a PNG in CUSTOM -> 101 -> 1040
and calling "WriteResData" using some Bytes I have both
CUSTOM -> 101 -> 1040
CUSTOM -> 101 -> 0 ( the new one)
Then just do not place that custom-resource (via VB6-res-file, I assume) in the new compiled executable.
That way (when you leave the new compiled exe virginal), the adding of the resource via WriteResData will happen (by default, when the optional Paral was left empty) with LCID=0 ... ensuring the first entry under that LCID...
And later, when you want to overwrite (the existing entry at LCID=0) you will change the PNG-resource (at the same LCID-position) to something else (again using only the WriteResData-routine, with the default LCID=0).
That's working for me without problems, since I never place resources in the compiled Exe via the builtin VB6-mechanism.
-----------------------------------------
Alternatively, you could determine your current LCID on the machine you're running your IDE
(there's APIs for that, which should give you the 1040 for your current italian locale) -
and then pass this pre-determined LCID as the last (Optional) param into the WriteResData-routine.
That way, you'd overwrite the existing VB6-resource (which apparently used the same LCID of the current locale in any fresh compiler-run beforehand).
HTH
Olaf
Last edited by Schmidt; May 21st, 2020 at 08:12 PM.
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
|