I have written 2 programs, they are both compiled, and both contain "STRINGTABLES" resources added via .rc files.
So, let's call App #1 "app1.exe" and App #2 "app2.exe".
Here is my issue. In app2.exe, I have a string table that looks like this:
STRINGTABLE
{
1000, "Hello"
1001, "There"
}
When I run app1.exe, I am attempting to update resources stored in app2.exe via the Win32 API UpdateResource()
function.
I can use Delphi's LoadStr()
function to load the strings from the stringtable just fine.
My problem is I need to understand how to use UpdateResource()
in order to change JUST THE STRINGS in that stringtable. So, for example, I want app1.exe to change app2.exe's string table from what you see above to this:
STRINGTABLE
{
1000, "Thank"
1001, "You!"
}
I am sorry that I do not have any source code, however I am starting from scratch and cannot seem to figure this out.
I am using RAD Studio XE7.
If you guys need more to go on, just say so and I will update this as much as possible, but like I said I am just starting out learning about TResourceStream
and all this resource stuff so I don't have much to show. All I can tell you is that I am not new to programming. I catch on to stuff very quickly. I have already created a THandle
and gotten the app1.exe to look into the app2.exe's resources. I can add stuff to it, but it seems that when I try to add String
data from a TEdit
or TMemo
component it shows up as some weird strange Chinese lettering inside the app2.exe's resources. So I am wondering how to format these strings so that they show up properly inside the resources and stuff.
To shed some more light on this, when I run app1.exe and attempt to enter the string "Hello"
into app2.exe's stringtable, it gives me this:
00230BF8 00 00 00 00 ••••
Any clues why ?
I am using an app called "Resource Hacker" to check the resources after I run the programs.