Hi
I've wrapped .NET FileVersionInfo class. If someone is interested in then there's the code:
C# source code for SnapDevelop is here.
Exported PB2021 object and compiled .NET Framework 2.0 DLL are attached. The DLL has no dependency.
using System;
using System.Diagnostics;
namespace eclipse
{
namespace eclVersion
{
public class Version
{
private FileVersionInfo data;
public void GetVersion(string filePath)
{
data = FileVersionInfo.GetVersionInfo(filePath);
}
public void GetVersion()
{
GetVersion(FullPath());
}
private String FullPath()
{
Process myProc = Process.GetCurrentProcess(); // Or whatever method you are using
return myProc.MainModule.FileName;
}
public bool IsPreRelease { get { return data.IsPreRelease; } }
public int ProductPrivatePart { get { return data.ProductPrivatePart; } }
public string ProductName { get { return data.ProductName; } }
public int ProductMinorPart { get { return data.ProductMinorPart; } }
public int ProductMajorPart { get { return data.ProductMajorPart; } }
public int ProductBuildPart { get { return data.ProductBuildPart; } }
public string PrivateBuild { get { return data.PrivateBuild; } }
public string OriginalFilename { get { return data.OriginalFilename; } }
public string LegalTrademarks { get { return data.LegalTrademarks; } }
public string LegalCopyright { get { return data.LegalCopyright; } }
public string Language { get { return data.Language; } }
public bool IsSpecialBuild { get { return data.IsSpecialBuild; } }
public bool IsPrivateBuild { get { return data.IsPrivateBuild; } }
public string ProductVersion { get { return data.ProductVersion; } }
public string SpecialBuild { get { return data.SpecialBuild; } }
public bool IsDebug { get { return data.IsDebug; } }
public string InternalName { get { return data.InternalName; } }
public string FileVersion { get { return data.FileVersion; } }
public int FilePrivatePart { get { return data.FilePrivatePart; } }
public string FileName { get { return data.FileName; } }
public int FileMinorPart { get { return data.FileMinorPart; } }
public int FileMajorPart { get { return data.FileMajorPart; } }
public string FileDescription { get { return data.FileDescription; } }
public int FileBuildPart { get { return data.FileBuildPart; } }
public string CompanyName { get { return data.CompanyName; } }
public string Comments { get { return data.Comments; } }
public bool IsPatched { get { return data.IsPatched; } }
}
}
}