Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Detecting an OCX

Posted on 1998-10-21
3
Medium Priority
?
210 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 400 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 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