Mirror

How to detect if DCOM is enabled (Views: 100)


Problem/Question/Abstract:

How to detect if DCOM is enabled

Answer:

function IsDCOMEnabled: Boolean;
var
  Ts: string;
  R: TRegistry;
begin
  r := TRegistry.Create;
  r.RootKey := HKEY_LOCAL_MACHINE;
  r.OpenKey('Software\Microsoft\OLE', False);
  ts := AnsiUpperCase(R.ReadString('EnableDCOM'));
  r.Free;
  Result := (Ts = 'Y');
end;

<< Back to main page