File Version Info On Windows Mobile 5.0 for PocketPC...

G

Guest

Hello,

I am currently working on a C++ project for a PocketPC with Windows
Mobile 5.0 in Visual Studio 2005. I am currently looking for a way to get
file version information, i.e. file version, product version, file modified
date, file creation date, etc. The only way I could find was using the
functions GetFileVersionInfoSize, GetFileVersionInfo, and then VerQueryValue,
but when I ran it, it gave me an error saying: "The specified resource name
cannot be found in the image file."

I noticed in the documentation that these functions do not work for
16-bit file images, which may be why I am getting the error. Is there
another way to get this information (i.e. one that works on 16-bit file
systems)? If not, what infomation is available? The most important
attributes for my project are the creation/modified dates of a file and the
product version of an exe. Are either of these available? If so, how would
I get them without using these functions?

Any help is appreciated.

-Chris
 
W

William DePalo [MVP VC++]

opswat said:
The only way I could find was using the
functions GetFileVersionInfoSize, GetFileVersionInfo, and then
VerQueryValue,
but when I ran it, it gave me an error saying: "The specified resource
name
cannot be found in the image file."

The data that these functions retrieve has to be explicitly added to an
executable when it is built.
I noticed in the documentation that these functions do not work for
16-bit file images, which may be why I am getting the error. Is there
another way to get this information (i.e. one that works on 16-bit file
systems)?

My memory of the 16 bit platforms is fading, it may be that the version
resource was not added until after the switch to '95.
The most important
attributes for my project are the creation/modified dates of a file and
the
product version of an exe. Are either of these available? If so, how
would
I get them without using these functions?

The timestamps of a file are maintained by the file system. Check the docs
for GetFileTime(). The product version comes from the version resource,
which if the error message above is to believed, simply does not exist in
your case.

Regards,
Will
 
G

Guest

By old tradition, WinCE program files do not contain version resources,
because storage on WinCE device is scarce.
( digital signatures and mainfests are a waste of storage too,
but at least they carry some usual functions )

A PE timestamp and version (32-bit) are put into PE file header by link -
unless the file is converted to a ROM module; then I'm not sure.

--PA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top