Разделение классов
procedure cWMIObj.ConnectServer(Service:ISWbemServices);
var
ObjectSet:ISWbemObjectSet;
SObject:ISWbemObject;
PropSet:ISWbemPropertySet;
SProp:ISWbemProperty;
PropEnum, Enum:IEnumVariant;
TempObj:OleVariant;
Value:Cardinal;
StrValue:string;
begin
SObject:= Service.Get(ObjClassName, wbemFlagUseAmendedQualifiers, nil);
ObjectSet:= SObject.Instances_(0, nil);{здесь ошибка}
Enum:= (ObjectSet._NewEnum) as IEnumVariant;
while Enum.Next(1, TempObj, Value)=S_OK do
begin
SObject:= IUnknown(TempObj) as SWBemObject;
PropSet := SObject.Properties_;
PropEnum := (PropSet._NewEnum) as IEnumVariant;
while (PropEnum.Next(1, TempObj, Value) = S_OK) do
begin
SProp:= IUnknown(TempObj) as SWBemProperty;
StrValue:= '';
Self.Get(SProp);
end;
Self.Show(CurrLV);
end;
end;
Заранее спасибо за помощь.