Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.453 Beiträge
Delphi 12 Athens
|
AW: Zugriff auf Classes\CLSID
4. Jul 2020, 23:16
Zum Beispiel dies hier:
Delphi-Quellcode:
program Project700;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.Classes,
System.Win.Registry,
Winapi.Windows;
procedure Main;
var
FilePath: string;
PRegKey: TRegistry;
subKeyFilePath: TStringList;
begin
subKeyFilePath := TStringList.Create();
try
PRegKey := TRegistry.Create;
try
PRegKey.RootKey := HKEY_LOCAL_MACHINE;
FilePath := ' SOFTWARE\Classes\CLSID\';
if PRegKey.OpenKeyReadOnly(FilePath) then
begin
if PRegKey.HasSubKeys then
begin
PRegKey.GetKeyNames(subKeyFilePath);
PRegKey.CloseKey;
end;
end;
finally
PRegKey.Free;
end;
Writeln(subKeyFilePath.Text);
finally
subKeyFilePath.Free;
end;
end;
begin
try
Main;
except
on E: Exception do
Writeln(E.ClassName, ' : ', E. Message);
end;
Readln;
end.
|