Version resource and /Version option 
Author Message
 Version resource and /Version option

Hi,

I know how to retrieve the version information from EXE or DLL file
using GetFileVersionInfo and VerQueryValue (thanks to multiple postings
to this newsgroup).

But did anybody here ever use the /Version option for command-line LINK
utility or its Project/Settings/Link/Output equivalent for IDE, which
allows (as help says) to specify just the version number for EXE or DLL
as a pair of two decimal numbers?

How can I get the version number specified in this way?

Thank you,
-Leo

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 23 Jun 2002 03:00:00 GMT  
 Version resource and /Version option
When calling VerQueryValue, have you tried specifying only "\\" to retrieve a
VS_FIXEDFILEINFO structure?
Quote:

> Hi,

> I know how to retrieve the version information from EXE or DLL file
> using GetFileVersionInfo and VerQueryValue (thanks to multiple postings
> to this newsgroup).

> But did anybody here ever use the /Version option for command-line LINK
> utility or its Project/Settings/Link/Output equivalent for IDE, which
> allows (as help says) to specify just the version number for EXE or DLL
> as a pair of two decimal numbers?

> How can I get the version number specified in this way?

> Thank you,
> -Leo

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sun, 23 Jun 2002 03:00:00 GMT  
 Version resource and /Version option
Yes, I have. The VS_FIXEDFILEINFO structure returned by VerQueryValue
contains the data from the version resource and ignores the version
number assigned with /version option.
By the way, you can't use GetFileVersionInfo and VerQueryValue without
creating version resource for your project.

-Leo


Quote:

> When calling VerQueryValue, have you tried specifying only "\\" to
retrieve a
> VS_FIXEDFILEINFO structure?


> > Hi,

> > I know how to retrieve the version information from EXE or DLL file
> > using GetFileVersionInfo and VerQueryValue (thanks to multiple
postings
> > to this newsgroup).

> > But did anybody here ever use the /Version option for command-line
LINK
> > utility or its Project/Settings/Link/Output equivalent for IDE,
which
> > allows (as help says) to specify just the version number for EXE or
DLL
> > as a pair of two decimal numbers?

> > How can I get the version number specified in this way?

> > Thank you,
> > -Leo

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 23 Jun 2002 03:00:00 GMT  
 Version resource and /Version option
OK, sorry.  I'm unaware of what the /version linker command line option does.


Mon, 24 Jun 2002 03:00:00 GMT  
 Version resource and /Version option
The help says:
"The Version Information (/VERSION:major[.minor]) option tells the
linker to put a version number in the header of the .EXE or DLL. (To
find this option in the development environment, click Settings on the
Project menu. Then click the Link tab, and click Output in the Category
box.)
The major and minor arguments are decimal numbers in the range 0 through
65,535. The default is version 0.0"

And no word about how to get this information...

-Leo


Quote:

> OK, sorry.  I'm unaware of what the /version linker command line
option does.

Sent via Deja.com http://www.deja.com/
Before you buy.


Mon, 24 Jun 2002 03:00:00 GMT  
 Version resource and /Version option

Quote:
>"The Version Information (/VERSION:major[.minor]) option tells the
>linker to put a version number in the header of the .EXE or DLL.

Check out the article "Peering Inside the PE: A Tour of the Win32
Portable Executable File Format" by Matt Pietrek - it's on MSDN.

These fields are described in the IMAGE_OPTIONAL_HEADER section:

"WORD    MajorImageVersion
WORD    MinorImageVersion

A user-definable field. This allows you to have different versions of
an EXE or DLL. You set these fields via the linker /VERSION switch.
For example, "LINK /VERSION:2.0 myobj.obj".
"

Dave
--
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Tue, 25 Jun 2002 03:00:00 GMT  
 Version resource and /Version option
Thank you, Dave!

-Leo


Quote:

> >"The Version Information (/VERSION:major[.minor]) option tells the
> >linker to put a version number in the header of the .EXE or DLL.

> Check out the article "Peering Inside the PE: A Tour of the Win32
> Portable Executable File Format" by Matt Pietrek - it's on MSDN.

> These fields are described in the IMAGE_OPTIONAL_HEADER section:

> "WORD    MajorImageVersion
> WORD    MinorImageVersion

> A user-definable field. This allows you to have different versions of
> an EXE or DLL. You set these fields via the linker /VERSION switch.
> For example, "LINK /VERSION:2.0 myobj.obj".
> "

> Dave
> --
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.

Sent via Deja.com http://www.deja.com/
Before you buy.


Tue, 25 Jun 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. C++ Compiler option for using version 5 under version 6

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

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

4. Microsoft C Version 7.00 compiler option question

5. What version or upgrade options

6. how to add version resource into a DLL that does not contain any version resource?

7. Debug version - Release version

8. Is version 3.0 the latest version of Borland Turbo C++ for DOS

9. Debug version ok but release version problem

10. Debug Version and Release Version

11. Win32 debug version and Win32 release version

12. Why the Font size is not same between Debug version and Release Version

 

 
Powered by phpBB® Forum Software