简体   繁体   中英

Accessing c++ com object (version info) from .Net

I have a .Net project where we access COM objects written in C++.

In my About box (in the .Net part) I wish to display the version of the used COM objects.

I currently have version info on the COM objects (visible in Windows Explorer->Properties->Version).

How can I read the version (and preferably Copyright ect) from C# code?

Thanks for any input,

Anders, Denmark

  FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(path);
  string version = string.Format("Version {0}",fileVersion.FileVersion);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM