Ocx : how to read MajorVer, MinorVer and RevisionVer ?

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
 
F

Family Tree Mike

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
 
P

Patrice Dargenton

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}]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top