Custom version resource editor. 
Author Message
 Custom version resource editor.

Good morning.

Ok, I have looked into writing a 'custom' resource editor (rather than
using the ones provided by Borland & Microsoft) so that I may edit the
contents of an exe/dll files resources (more specifically - the
versioninfo resource) without recompiling.

I have got the initial code in place, but the UpdateResource function
requires that the data to be written:
"is the raw binary data stored in the executable file, not the data
provided by LoadIcon, LoadString, or other resource-specific load
functions".

This is where I am stumped.  How can I figure out what the binary
representation of the data I want written into the file looks like.
For example, to change the 'Company Name' field (found when you
right-click and select properties of a dll/exe), I would just like to
specify the new company name, not the binary representation of what
this looks like after compile.

I have tried searching MSDN and MSJ for 'DLL file formats' and
'resource formats', and pretty well anything else that made sense
without any luck.

Ideally, I need to know the location (offset) and binary
representation that the versioninfo resource has within a dll/exe.

Below is a sample versioninfo resource I have cut and pasted by
viewing the contents of a dll with notepad.  Some of it is binary, but
most of the user-defined fields are text.

----------------------------------->begin<-----------------------
??????????
4   V S _ V E R S I O N _ I N F O     ? ?t  

               L
    S t r i n g F i l e I n f o   (
    0 4 0 9 0 4 E 4   T  
 C o m p a n y N a m e     M o d i f i e d   c o m p a n y   t e s t .
. .     n #
 F i l e D e s c r i p t i o n     H o n e y w e l l   S D S   I / O
D r i v e r   f o r   W a l t z     .  
 F i l e V e r s i o n     2 . 2 0         2  
 P r o d u c t V e r s i o n   2 . 2 0         (  
 I n t e r n a l N a m e   S D S   ? 1
 L e g a l C o p y r i g h t   C o p y r i g h t   ?   1 9 9 6   T a y
l o r   I n d u s t r i a l   S o f t w a r e   I n c       8  
 O r i g i n a l F i l e n a m e   S D S . I O D   D     V a r F i l e
I n f o     $     T r a n s l a t i o n          ?

----------------------------------->end<-----------------------

Any help in this regard would greatly be appreciated.

Thanks in advance.

<Take the UNSPAM out of my address to email me>
Robert Gagnon
Taylor Industrial Software

403-420-2042 x4029



Sat, 31 Mar 2001 03:00:00 GMT  
 Custom version resource editor.
Maybe this is what you're looking for:

Microsoft Developer Network ->
    Specifications ->
        Platforms ->
            Win32 Binary Resource Formats

--
Tomas Restrepo

http://members.xoom.com/trestrep/


Quote:
>Good morning.

>Ok, I have looked into writing a 'custom' resource editor (rather than
>using the ones provided by Borland & Microsoft) so that I may edit the
>contents of an exe/dll files resources (more specifically - the
>versioninfo resource) without recompiling.



Sat, 31 Mar 2001 03:00:00 GMT  
 Custom version resource editor.
Hello,

If you have access to the MSDN, search for Win32 Binary Resource
Format. It gives the formats for the various resources.

Tommy



Quote:
>Good morning.

>Ok, I have looked into writing a 'custom' resource editor (rather than
>using the ones provided by Borland & Microsoft) so that I may edit the
>contents of an exe/dll files resources (more specifically - the
>versioninfo resource) without recompiling.

>I have got the initial code in place, but the UpdateResource function
>requires that the data to be written:
>"is the raw binary data stored in the executable file, not the data
>provided by LoadIcon, LoadString, or other resource-specific load
>functions".

>This is where I am stumped.  How can I figure out what the binary
>representation of the data I want written into the file looks like.
>For example, to change the 'Company Name' field (found when you
>right-click and select properties of a dll/exe), I would just like to
>specify the new company name, not the binary representation of what
>this looks like after compile.

>I have tried searching MSDN and MSJ for 'DLL file formats' and
>'resource formats', and pretty well anything else that made sense
>without any luck.

>Ideally, I need to know the location (offset) and binary
>representation that the versioninfo resource has within a dll/exe.

>Below is a sample versioninfo resource I have cut and pasted by
>viewing the contents of a dll with notepad.  Some of it is binary, but
>most of the user-defined fields are text.

>----------------------------------->begin<-----------------------
>??????????
>4   V S _ V E R S I O N _ I N F O     ? ?t  

>               L
>    S t r i n g F i l e I n f o   (
>    0 4 0 9 0 4 E 4   T  
> C o m p a n y N a m e     M o d i f i e d   c o m p a n y   t e s t .
>. .     n #
> F i l e D e s c r i p t i o n     H o n e y w e l l   S D S   I / O
>D r i v e r   f o r   W a l t z     .  
> F i l e V e r s i o n     2 . 2 0         2  
> P r o d u c t V e r s i o n   2 . 2 0         (  
> I n t e r n a l N a m e   S D S   ? 1
> L e g a l C o p y r i g h t   C o p y r i g h t   ?   1 9 9 6   T a y
>l o r   I n d u s t r i a l   S o f t w a r e   I n c       8  
> O r i g i n a l F i l e n a m e   S D S . I O D   D     V a r F i l e
>I n f o     $     T r a n s l a t i o n              ?

>----------------------------------->end<-----------------------

>Any help in this regard would greatly be appreciated.

>Thanks in advance.

><Take the UNSPAM out of my address to email me>
>Robert Gagnon
>Taylor Industrial Software

>403-420-2042 x4029



Sat, 14 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Displaying custom controls in resource editor

2. locked resources in resource editor

3. Cool Resources Editor/Viewer for .NET + sourcecode (.resources/.resX)

4. What is the difference in the /version link switch and the version Resources

5. Version resource and /Version option

6. Linking...CVTRES : fatal error CVT1100: duplicate resource resource -- type:VERSION, name:1, language:0x0409

7. Custom controls and VC.NET dialog editor

8. Collection Editor for my Custom Control

9. Custom DataSet not exposing members in editor

10. How to Make a Custom Collection Editor

11. How do you use a custom property editor?

12. Adding Custom Controls To Dialog Editor Toolbox

 

 
Powered by phpBB® Forum Software