Solved

How to get the version of a  ActiveX control?

Posted on 2001-07-23
6
149 Views
Last Modified: 2010-04-06
I have a ocx file, but I don't know It's version ,how to get it? thinks
0
Comment
Question by:luxee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6311042
Have you tried GetVersionOfFile?
0
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
ID: 6311740
I'm using these two functions:

function GetFileVersion(file_: string) : int64;
var len, hnd : dword;
    buf      : string;
    pfi      : PVsFixedFileInfo;
begin
  result := 0;
  len := GetFileVersionInfoSize(pchar(file_), hnd);
  if len <> 0 then begin
    SetLength(buf, len);
    if GetFileVersionInfo(pchar(file_), hnd, len, pointer(buf)) and
       VerQueryValue(pointer(buf), '\', pointer(pfi), len) then
      result := int64(pfi^.dwFileVersionMS) shl 32 + int64(pfi^.dwFileVersionLS);
  end;
end;

function FileVersionToStr(version: int64) : string;
begin
  result := IntToStrEx( version shr 48           ) + '.' +
            IntToStrEx((version shr 32) and $FFFF) + '.' +
            IntToStrEx((version shr 16) and $FFFF) + '.' +
            IntToStrEx( version         and $FFFF);
end;

Regards, Madshi.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6311896
Hmmm... May I ask: What was missing for an A grade?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:luxee
ID: 6311909
Oh,sorry,but how to select a grade for you now?
0
 

Author Comment

by:luxee
ID: 6311950
Oh,sorry,but how to select a grade for you now?
0
 

Author Comment

by:luxee
ID: 6312039
Oh,sorry,but how to select a grade for you now?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connection between libmysql.dll and MySQL Versions 7 132
LAN or WAN ? 11 121
CheckListBox usage 3 98
Formating a integer number to float 2 9
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question