function SWbemObjectPropertiesToString(ASWbemObject: TSWbemObject): string; var vSWbemProperty: TSWbemProperty; //olevariant vPropValueV: olevariant; vPropvalueS: string; vCardinal: cardinal; vEnum: IEnumvariant; vVT: TVarType; begin Result := ''; vEnum := IUnknown(ASWbemObject.Properties_._NewEnum) as IEnumVariant; while vEnum.Next(1, vSWbemProperty, vCardinal) = 0 do begin vPropValueV := vSWbemProperty.Value; vVT := VarType(vPropValueV); if vVT > varQWord then vPropValueS := format('Variant de type (%d)', [vVT]) else vPropValueS := vartostrdef(vPropValueV, 'null'); Result += vSWbemProperty.Name + ' = ' + vPropValueS + chr(13) + chr(10); end; end;