Solved

Detecting an OCX

Posted on 1998-10-21
3
207 Views
Last Modified: 2010-04-06
How can I detect if an OCX, let's say ABC123.OCX,
is already registered, so that I don't have to register
it again ???
0
Comment
Question by:fussel
[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
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
ID: 1343599
Hi,
the easiest way I know is using the fact that every OLE related object has a Unique id called CLSID in the registry. So,

1 - Determine the CLSID of the OCX you seek
  - install the OCX in your machine and open registry
  - search values for its name for example ABC123.OCX and note its root CLSID assume it is {0D84B381-8CA2-1069-AB1D-08000948F534}

2 - Determining if it is installed on any machine

function IsABCRegistered:boolean;
var
  R : TRegistry;
begin
  Result := false;
  R := TRegistry.Create;
  try
    R.RootKey := HKEY_CLASSES_ROOT;
    R.OpenKey('CLSID', false);
    Result := R.KeyExists('{BD84B381-8CA2-1069-AB1D-08000948F534}');
    R.CloseKey;
  finally
    R.Free;
  end;
end;

regards, igor
0
 

Author Comment

by:fussel
ID: 1343600
Thanks for your help !!
0
 
LVL 5

Expert Comment

by:inter
ID: 1343601
You are welcome ;-)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

696 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