The Road to Delphi

Delphi – Free Pascal – Oxygene

WMI Tasks using Delphi – Computer Hardware

14 Comments

Determine how much free memory a computer has

Use the class Win32_OperatingSystem and the FreePhysicalMemory property.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT FreePhysicalMemory FROM Win32_OperatingSystem','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  if oEnum.Next(1, FWbemObject, iValue) = 0 then
  begin
    Writeln(Format('Available Physical Memory %d',[Integer(FWbemObject.FreePhysicalMemory)]));
    FWbemObject:=Unassigned;
  end;
end;

Determine whether a computer has a DVD drive

Use the Win32_CDROMDrive class and check for the acronym DVD in the Name or DeviceID property.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_CDROMDrive','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    Writeln(Format('DeviceID    %s',[FWbemObject.DeviceID]));
    Writeln(Format('Description %s',[FWbemObject.Description]));
    Writeln(Format('Name        %s',[FWbemObject.Name]));
    Writeln('');
    FWbemObject:=Unassigned;
  end;
end;

Determine how much RAM is installed in a computer

Use the Win32_ComputerSystem class and check the value of the TotalPhysicalMemory property.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT TotalPhysicalMemory FROM Win32_ComputerSystem','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  if oEnum.Next(1, FWbemObject, iValue) = 0 then
  begin
    Writeln(Format('Total Physical Memory %d',[Integer(FWbemObject.TotalPhysicalMemory)]));
    FWbemObject:=Unassigned;
  end;
end;

Determine if a computer has more than one processor

Use the Win32_ComputerSystem class and the property NumberOfProcessors.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT NumberOfProcessors FROM Win32_ComputerSystem ','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  if oEnum.Next(1, FWbemObject, iValue) = 0 then
  begin
    Writeln(Format('Number Of Processors %d',[Integer(FWbemObject.NumberOfProcessors)]));
    FWbemObject:=Unassigned;
  end;
end;

Determine whether a computer has a PCMCIA slot

Use the Win32_PCMCIAController class.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
  c             : Integer;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT DeviceID FROM Win32_PCMCIAController','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  c:=0;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    inc(c);
    FWbemObject:=Unassigned;
  end;
  Writeln(Format('Number of PCMCIA slots %d',[c]));
end;

Identify devices that are not working (those marked with an exclamation point icon in Device Manager)

Use the Win32_PnPEntity class and use the following clause in your WQL query. WHERE ConfigManagerErrorCode <> 0.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_PnPEntity WHERE ConfigManagerErrorCode <> 0','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    Writeln(Format('Class GUID %s',[String(FWbemObject.ClassGUID)]));
    Writeln(Format('Description %s',[String(FWbemObject.Description)]));
    Writeln(Format('Device ID %s',[String(FWbemObject.DeviceID)]));
    Writeln(Format('Manufacturer %s',[String(FWbemObject.Manufacturer)]));
    Writeln(Format('Name %s',[String(FWbemObject.Name)]));
    Writeln(Format('PNP Device ID %s',[String(FWbemObject.PNPDeviceID)]));
    Writeln('');
    FWbemObject:=Unassigned;
  end;
end;

Determine the properties of the mouse used on computer

Use the Win32_PointingDevice class. This returns the properties of all pointing devices, not just mouse devices.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_PointingDevice','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    Writeln(Format('Device ID               %s',[String(FWbemObject.DeviceID)]));
    Writeln(Format('Description             %s',[String(FWbemObject.Description)]));
    Writeln(Format('Manufacturer            %s',[String(FWbemObject.Manufacturer)]));
    Writeln(Format('Device Interface        %s',[String(FWbemObject.DeviceInterface)]));
    Writeln(Format('PNP Device ID           %s',[String(FWbemObject.PNPDeviceID)]));

    if not VarIsNull(FWbemObject.DoubleSpeedThreshold) then
      Writeln(Format('Double Speed Threshold  %d',[Integer(FWbemObject.DoubleSpeedThreshold)]));

    if not VarIsNull(FWbemObject.Resolution) then
      Writeln(Format('Resolution %d',[Integer(FWbemObject.Resolution)]));

    if not VarIsNull(FWbemObject.SampleRate) then
      Writeln(Format('Sample Rate  %d',[Integer(FWbemObject.SampleRate)]));

    if not VarIsNull(FWbemObject.Synch) then
      Writeln(Format('Synch  %d',[Integer(FWbemObject.Synch)]));

    Writeln('');
    FWbemObject:=Unassigned;
  end;
end;

Determine the speed of a processor installed in a computer

Use the Win32_Processor class and check the value of the MaxClockSpeed property.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_Processor','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    Writeln(Format('Processor Id     %s',[String(FWbemObject.ProcessorId)]));
    Writeln(Format('Max Clock Speed  %d',[Integer(FWbemObject.MaxClockSpeed)]));

    Writeln('');
    FWbemObject:=Unassigned;
  end;
end;

Determine whether a computer is a tower, a mini-tower, a laptop, and so on

Use the Win32_SystemEnclosure class and check the value of the ChassisType property.

Value Meaning
1
Other
2
Unknown
3
Desktop
4
Low Profile Desktop
5
Pizza Box
6
Mini Tower
7
Tower
8
Portable
9
Laptop
10
Notebook
11
Hand Held
12
Docking Station
13
All in One
14
Sub Notebook
15
Space-Saving
16
Lunch Box
17
Main System Chassis
18
Expansion Chassis
19
SubChassis
20
Bus Expansion Chassis
21
Peripheral Chassis
22
Storage Chassis
23
Rack Mount Chassis
24
Sealed-Case PC
const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
  i             : integer;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_SystemEnclosure','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  if oEnum.Next(1, FWbemObject, iValue) = 0 then
  begin
    for i := VarArrayLowBound(FWbemObject.ChassisTypes, 1) to VarArrayHighBound(FWbemObject.ChassisTypes, 1) do
     Writeln(Format('Chassis Types %d',[Integer(FWbemObject.ChassisTypes[i])]));
    FWbemObject:=Unassigned;
  end;
end;

Get the serial number and asset tag of a computer

Use the Win32_SystemEnclosure class, and the properties SerialNumber and SMBIOSAssetTag.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_SystemEnclosure','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  if oEnum.Next(1, FWbemObject, iValue) = 0 then
  begin
    if not VarIsNull(FWbemObject.PartNumber) then
      Writeln(Format('Part Number      %s',[String(FWbemObject.PartNumber)]));
    if not VarIsNull(FWbemObject.SerialNumber) then
      Writeln(Format('Serial Number    %s',[String(FWbemObject.SerialNumber)]));
    if not VarIsNull(FWbemObject.SMBIOSAssetTag) then
      Writeln(Format('SMBIOS Asset Tag %s',[String(FWbemObject.SMBIOSAssetTag)]));
    FWbemObject:=Unassigned;
  end;
end;

Determine what kind of device is plugged into a USB port

Use the Win32_USBHub class and check the Description property. This property may have a value such as “Mass Storage Device” or “Printing Support”.

const
  wbemFlagForwardOnly = $00000020;
var
  FSWbemLocator : OLEVariant;
  FWMIService   : OLEVariant;
  FWbemObjectSet: OLEVariant;
  FWbemObject   : OLEVariant;
  oEnum         : IEnumvariant;
  iValue        : LongWord;
begin;
  FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
  FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM  Win32_USBHub','WQL',wbemFlagForwardOnly);
  oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while oEnum.Next(1, FWbemObject, iValue) = 0 do
  begin
    if not VarIsNull(FWbemObject.DeviceID) then
      Writeln(Format('Device ID        %s',[String(FWbemObject.DeviceID)]));
    if not VarIsNull(FWbemObject.PNPDeviceID) then
      Writeln(Format('PNP Device ID    %s',[String(FWbemObject.PNPDeviceID)]));
    if not VarIsNull(FWbemObject.Description) then
      Writeln(Format('Description      %s',[String(FWbemObject.Description)]));

    Writeln;
    FWbemObject:=Unassigned;
  end;
end;

This post is based in the MSDN entry WMI Tasks: Computer Hardware

Author: Rodrigo

Just another Delphi guy.

14 thoughts on “WMI Tasks using Delphi – Computer Hardware

  1. It appears that FWbemObject.FreePhysicalMemory is not returning the correct result.

    Format( ‘%s’, [ string( FWbemObject.FreePhysicalMemory ) ] ) returns 5,808,468 bytes.

    GlobalMemoryStatusEx( Memory );
    Format( ‘%s’, [IntToStr( Memory.ullAvailPhys ) ) ] returns 6,011,977,728 bytes which is correct.

    Can you confirm this?

  2. this was tested on two different pc’s on Windows 7. FreePhysicalMemory was incorrect on both pc’s.

    • The FreePhysicalMemory property returns the Number, in kilobytes, of physical memory currently unused and available.
      so you must multiply the value returned for this property.

      Check this sample

      const
        wbemFlagForwardOnly = $00000020;
      var
        FSWbemLocator : OLEVariant;
        FWMIService   : OLEVariant;
        FWbemObjectSet: OLEVariant;
        FWbemObject   : OLEVariant;
        oEnum         : IEnumvariant;
        iValue        : LongWord;
        lpBuffer      : TMEMORYSTATUSEX;
        ullAvailPhys  : DWORDLONG;
      begin;
        ZeroMemory(@lpBuffer,SizeOf(lpBuffer));
        lpBuffer.dwLength:=SizeOf(lpBuffer);
        FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
        FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\cimv2', '', '');
        FWbemObjectSet:= FWMIService.ExecQuery('SELECT FreePhysicalMemory FROM Win32_OperatingSystem','WQL',wbemFlagForwardOnly);
        GlobalMemoryStatusEx(lpBuffer);
        oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
        if oEnum.Next(1, FWbemObject, iValue) = 0 then
        begin
          ullAvailPhys:=Integer(FWbemObject.FreePhysicalMemory)*UInt64(1024);
          Writeln(Format('WMI Available Physical Memory    %d',[ullAvailPhys]));
          Writeln(Format('WinApi Available Physical Memory %d',[lpBuffer.ullAvailPhys]));
          FWbemObject:=Unassigned;
        end;
      end;
      

      Remember which can exist small differences because the physical memory can be released or reserved betwen the functions calls.

  3. I get the correct results now…. This is a great blog…
    Thank-you.

  4. Running Windows 7 on a Dell Studio XPS 9100 box. This function returns “Unknown”. System Information Shows:

    Intel(R) ICH10 Family USB Enhanced Host Controller – 3A3A PCI\VEN_8086&DEV_3A3A&SUBSYS_04821028&REV_00\3&11583659&0&EF
    Intel(R) ICH10 Family USB Enhanced Host Controller – 3A3C PCI\VEN_8086&DEV_3A3C&SUBSYS_04821028&REV_00\3&11583659&0&D7
    Intel(R) ICH10 Family USB Universal Host Controller – 3A34 PCI\VEN_8086&DEV_3A34&SUBSYS_04821028&REV_00\3&11583659&0&E8
    Intel(R) ICH10 Family USB Universal Host Controller – 3A35 PCI\VEN_8086&DEV_3A35&SUBSYS_04821028&REV_00\3&11583659&0&E9
    Intel(R) ICH10 Family USB Universal Host Controller – 3A36 PCI\VEN_8086&DEV_3A36&SUBSYS_04821028&REV_00\3&11583659&0&EA
    Intel(R) ICH10 Family USB Universal Host Controller – 3A37 PCI\VEN_8086&DEV_3A37&SUBSYS_04821028&REV_00\3&11583659&0&D0
    Intel(R) ICH10 Family USB Universal Host Controller – 3A38 PCI\VEN_8086&DEV_3A38&SUBSYS_04821028&REV_00\3&11583659&0&D1
    Intel(R) ICH10 Family USB Universal Host Controller – 3A39 PCI\VEN_8086&DEV_3A39&SUBSYS_04821028&REV_00\3&11583659&0&D2

    Did I make a mistake?

    function WMIGetNumberOfPCMCIASlots: string;
    // Get Number Of PCMCIA Slots
    const
    wbemFlagForwardOnly = $00000020;
    var
    FSWbemLocator: OleVariant;
    FWMIService: OleVariant;
    FWbemObjectSet: OleVariant;
    FWbemObject: OleVariant;
    oEnum: IEnumvariant;
    iValue: LongWord;
    begin
    FSWbemLocator := CreateOleObject( ‘WbemScripting.SWbemLocator’ );
    FWMIService := FSWbemLocator.ConnectServer( ‘localhost’, ‘root\cimv2’, ”, ” );
    FWbemObjectSet := FWMIService.ExecQuery( ‘SELECT * FROM Win32_PCMCIAController’, ‘WQL’, wbemFlagForwardOnly );
    oEnum := IUnknown( FWbemObjectSet._NewEnum ) as IEnumvariant;
    if oEnum.Next( 1, FWbemObject, iValue ) = 0 then
    begin
    if not VarIsNull( FWbemObject.Count ) then
    Result := Format( ‘%d’, [ Integer( FWbemObject.Count ) ] )
    else
    Result := ‘Unknown’;
    FWbemObject := Unassigned;
    end
    else
    Result := ‘Unknown’;
    end;

  5. The updated snippet reports: 0… but I have a lot of slots…4-5 on the Dell Box as well as 4 on the monitor. Does this snippet work on your Dell?

  6. Yes I think you are right. The slots are not the card slots on the motherboard but on the front of the Dell Box which typically load camera cards.

  7. I wrote a new function to return the number of processor cores:

    function WMIGetNumberOfCores: string;
    // Get Number Of Processor Cores
    const
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator: OleVariant;
      FWMIService: OleVariant;
      FWbemObjectSet: OleVariant;
      FWbemObject: OleVariant;
      oEnum: IEnumvariant;
      iValue: LongWord;
    begin ;
      FSWbemLocator := CreateOleObject( 'WbemScripting.SWbemLocator' );
      FWMIService := FSWbemLocator.ConnectServer( 'localhost', 'root\cimv2', '', '' );
      FWbemObjectSet := FWMIService.ExecQuery( 'SELECT * FROM  Win32_Processor', 'WQL', wbemFlagForwardOnly );
      oEnum := IUnknown( FWbemObjectSet._NewEnum ) as IEnumvariant;
      if oEnum.Next( 1, FWbemObject, iValue ) = 0 then
      begin
        Result := Format( '%d', [ Integer( FWbemObject.NumberOfCores ) ] );
        FWbemObject := Unassigned;
      end;
    end;
    
    //This returns 4.
    
    //This returns 8:
    function GetNumberOfProcessorCores: string;
    // return the number of Processor Cores from System_Info
    var
      vSystemInfo: Windows._SYSTEM_INFO;
    begin
      GetSystemInfo( vSystemInfo );
      Result := IntToStr( vSystemInfo.dwNumberOfProcessors );
    end;
    

    is WMIGetNumberOfCores correct?

  8. Here are 2 more Win32_Processor functions:

    WMIGetNumberOfCores returns 4 here.
    WMIGetNumberOfLogicalProcessors returns 8 here.

    Feel free to add to your snippets if you like.

    function WMIGetNumberOfCores: string;
    // Get Number Of Processor Cores
    const
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator: OleVariant;
      FWMIService: OleVariant;
      FWbemObjectSet: OleVariant;
      FWbemObject: OleVariant;
      oEnum: IEnumvariant;
      iValue: LongWord;
    begin
      FSWbemLocator := CreateOleObject( 'WbemScripting.SWbemLocator' );
      FWMIService := FSWbemLocator.ConnectServer( 'localhost', 'root\cimv2', '', '' );
      FWbemObjectSet := FWMIService.ExecQuery( 'SELECT * FROM  Win32_Processor', 'WQL', wbemFlagForwardOnly );
      oEnum := IUnknown( FWbemObjectSet._NewEnum ) as IEnumvariant;
      if oEnum.Next( 1, FWbemObject, iValue ) = 0 then
      begin
        Result := Format( '%d', [ Integer( FWbemObject.NumberOfCores ) ] );
        FWbemObject := Unassigned;
      end;
    end;
    
    function WMIGetNumberOfLogicalProcessors: string;
    // Get Number Of NumberOfLogicalProcessors
    const
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator: OleVariant;
      FWMIService: OleVariant;
      FWbemObjectSet: OleVariant;
      FWbemObject: OleVariant;
      oEnum: IEnumvariant;
      iValue: LongWord;
    begin
      FSWbemLocator := CreateOleObject( 'WbemScripting.SWbemLocator' );
      FWMIService := FSWbemLocator.ConnectServer( 'localhost', 'root\cimv2', '', '' );
      FWbemObjectSet := FWMIService.ExecQuery( 'SELECT * FROM  Win32_Processor', 'WQL', wbemFlagForwardOnly );
      oEnum := IUnknown( FWbemObjectSet._NewEnum ) as IEnumvariant;
      if oEnum.Next( 1, FWbemObject, iValue ) = 0 then
      begin
        Result := Format( '%d', [ Integer( FWbemObject.NumberOfLogicalProcessors ) ] );
        FWbemObject := Unassigned;
      end;
    end;
    
  9. Pingback: /*Prog*/ Delphi-Neftalí /*finProg*/ » Comienza un nuevo año… (10/01/2012)

  10. Pingback: Anonymous

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s