Ocx : how to read MajorVer, MinorVer and RevisionVer ?

  • Thread starter Thread starter Patrice Dargenton
  • Start date Start date
P

Patrice Dargenton

Hello, I am looking for a trick to read the file version of an ocx in
dotnet, the file version that is showed in the file explorer : I want to be
sure that the version of the registered ocx is correct before continuing to
run a software which depends on the ocx. Does anyone has a solution ?
Thanks.

Example in the Windows file explorer :
File version : 2.0.0.16

VB6 ocx version :
MajorVer=2
MinorVer=0
RevisionVer=16
 
Patrice Dargenton said:
Hello, I am looking for a trick to read the file version of an ocx in
dotnet, the file version that is showed in the file explorer : I want to be
sure that the version of the registered ocx is correct before continuing to
run a software which depends on the ocx. Does anyone has a solution ?
Thanks.

Example in the Windows file explorer :
File version : 2.0.0.16

VB6 ocx version :
MajorVer=2
MinorVer=0
RevisionVer=16

-------------------------------------------------------
Patrice Dargenton
(e-mail address removed)
http://patrice.dargenton.free.fr/index.html
-------------------------------------------------------



.

To get the version information on a file, use the FileVersionInfo class.
The class documentation is available here:
http://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo.aspx

Mike
 
Thank you very much !
I just have to read the path of the ocx registered in the registry :
[HKEY_CLASSES_ROOT\CLSID\{xxx}\InprocServer32]
via
[HKEY_CLASSES_ROOT\CLSID\{xxx}]
 
Back
Top