Как узнать доступен ли DCOM?
Материал из DRKB
function IsDCOMEnabled: Boolean;
var
Ts: string;
R: TRegistry;
begin
r := TRegistry.Create;
try
r.RootKey := HKEY_LOCAL_MACHINE;
r.OpenKey('Software\Microsoft\OLE', False);
ts := AnsiUpperCase(R.ReadString('EnableDCOM'));
finally
r.Free;
end;
Result := (Ts = 'Y');
end;
Source: Взято с Delphi Knowledge Base: http://www.baltsoft.com/
ID: 04328
function IsDCOMInstalled: Boolean;
var
OLE32: HModule;
begin
Result := not (IsWin95 or IsWin95OSR2);
if not Result then
begin
OLE32 := LoadLibrary(COLE32DLL);
if OLE32 > 0 then
try
Result := GetProcAddress(OLE32, PChar('CoCreateInstanceEx')) <> nil;
finally
FreeLibrary(OLE32);
end;
end;
end;
Source: Взято с Delphi Knowledge Base: http://www.baltsoft.com/
ID: 04329