Obtaining build number of .exe or .dll

Obtaining build number of .exe or .dll

Post by c2NvdH » Sun, 25 Dec 2005 07:02:02


Using windows explorer, right-clicking on a .exe or .dll, selecting
properties, and then selecting the version tab displays the
major/minor/revision/build number of the object. I want to do this in my
program. What windows api call or .net function retrieves this information.
I tried using System.Reflection.AssemblyName, but it only returns a value for
a small number of .exe/.dll programs. Windows explorer displays the version
info for many more.
 
 
 

Obtaining build number of .exe or .dll

Post by v-phuan » Tue, 27 Dec 2005 17:58:14

Hi

I think you may try to use Win32 API GetFileVersionInfo.
Here is link about how to use that in C#.
Unsafe Code Tutorial
http://www.yqcomputer.com/
vcwlkunsafecodetutorial.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.