468,249 Members | 1,512 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

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

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
Jul 10 '06 #1
2 3259
"opswat" <op****@discussions.microsoft.comwrote in message
news:FA**********************************@microsof t.com...
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
Jul 11 '06 #2
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

"opswat" wrote:
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
Jul 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by James Proctor | last post: by
2 posts views Thread by Keith Smith | last post: by
1 post views Thread by James Proctor | last post: by
6 posts views Thread by mister.mwa | last post: by
2 posts views Thread by Anna | last post: by
3 posts views Thread by Hugh Janus | last post: by
1 post views Thread by =?Utf-8?B?Q2Vkcmlj?= | last post: by
1 post views Thread by =?Utf-8?B?Q29saW4gQmFrZXI=?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.