DelphiFAQ Home Search:

Expert enumerates all installed components

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

Question:

How can my IDE Add-In expert enumerate all installed components?

Answer:

Borland's interface for IDE services provides the function GetComponentName() which takes two arguments - the index of the package and the index of the component within a package. It can be used as shown below.

library IDEAddInExpert;

uses
  ToolsApi;

//..

procedure EnumerateInstalledComponents;
var
  a,
  i: integer;
begin { EnumerateInstalledComponents }
  with BorlandIDEServices as IOTAPackageServices do
  begin
    for a := 0 to GetPackageCount-1 do
    begin
      for i := 0 to GetComponentCount(a)-1 do
      begin
        sName := GetComponentName(a, i); // name of installed component
      end; { for i }
    end; { for a }
  end; { with }
end; { EnumerateInstalledComponents }

//..

end.
You don't like the formatting? Check out SourceCoder then!

Comments:

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.