ranunez
asked on
WinAPI Dialog Resource
Using WinAPI, how do I get the Caption of a Dialog Resource in a DLL, without first creating the Dialog (Hidden or not) and then reading the caption.
ASKER
How would I reference the Dialog structure in Delphi once the resource is in memory. I can load the DLL, load the Resource, and I think I know how to get the Caption, but I don't know how to reference the Dialog Resource Structure.
Ok, I do not have time to write this, but this is how you should do it.
In your delphix\demo folder load in resXplorer
look at TExeImage.CreateImage
resexplorer will show you a hex dump of the Dialog. the easiestway to read this is to look at every alternate character.
I think you are looking for the first 3 or 4 readable characters in a row after the first 22 bytes. The title normally starts between 22 and 40 bytes in. There may be a better offset you can grab, but the readable character thing should work
In your delphix\demo folder load in resXplorer
look at TExeImage.CreateImage
resexplorer will show you a hex dump of the Dialog. the easiestway to read this is to look at every alternate character.
I think you are looking for the first 3 or 4 readable characters in a row after the first 22 bytes. The title normally starts between 22 and 40 bytes in. There may be a better offset you can grab, but the readable character thing should work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I should have said that the dialog strings (for caption and other) are in Wide Charater (2 byte)
You maybe able to load the DLL (using LoadLibrary) then try and load the dialog resouce into memory using a resource stream, then see if the caption is there.
You are going to have to load the library whether you want to or not anyway simply to get a handle.
Stu