Exe or DLL version

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do i get the exe version of a .exe or a .dll program, currently I'm doing
it like this:

System::Reflection::Assembly^ _asmb =
System::Reflection::Assembly::LoadFrom(mFileName);
String^ mName = _asmb->get_FullName();
Char delimiter[] = L","->ToCharArray();
String^ mParts[] = mName->Split(delimiter);
String^ mVersion = mParts->get_Item(1)->ToString();

but the problem is that i cannot move this .exe file during this process, i
can move it when this process stops but i need to copy it during the process.

does anybody knows how to unload it or how to get the program version?
 
does anybody knows how to unload it or how to get the program version?

Use FileVersionInfo::GetVersionInfo() if you want the file version, or
AssemblyName::GetAssemblyName() if you wnat the assembly version.


Mattias
 
thank you very much!!

this FileVersionInfo::GetVersionInfo() thing worked pretty good for me
 
Back
Top