Registriert seit: 16. Aug 2004
165 Beiträge
Delphi 7 Enterprise
|
AW: Prozessor herausfinden, neuere Version ?
7. Dez 2011, 19:21
Oder anstelle einer unmittelbaren Ausgabe per writeln() (besser ?) indirekt gleich so:
Code:
procedure GetOleObjectInfo(msg: string; obj: Olevariant);
begin
if not VarIsNull(obj) then
begin
if VarIsStr(obj) then
Writeln(Format('%s: %s', [msg, string(obj)]))
else
if VarIsNumeric(obj) then
Writeln(Format('%s: %d', [msg, Integer(obj)]))
else
Writeln(Format('%s: <unknown OleVariant Type>', [msg]));
end
else
Writeln(Format('%s: not available', [msg]));
end;
Also dann statt:
Code:
Writeln(Format('AddressWidth %d',[Integer(FWbemObject.AddressWidth)]));
vielmehr:
Code:
GetOleObjectInfo('AddressWidth',FWbemObject.AddressWidth);
|
|
Zitat
|