Free desktop tools and utilities for Windows. Download our software now.Free desktop tools and utilities for Windows. Download our software now.
HomeContact us
molecular biology software
scf trace assembly

Hardware IDExtractor
Hardware serial number extractor library

DNA chromatogram assembly

Main page

 

Full demo - Source code:

 

Here is the free source code of the Hardware ID Extractor application. Tested under Delphi 7.

 

hardware id extractor

 

 

UNIT MainForm;

 

CONST
  MemoryLoad    = 1;                                                         { Total memory used in percents (%)   }
  TotalPhys     = 2;                                                         { Total physical memory in bytes      }
  AvailPhys     = 3;                                                         { Available physical memory (bytes)   }
  TotalPageFile = 4;                                                         { Total page file in (bytes)                  }
  AvailPageFile = 5;                                                         { Available page file (bytes)                 }
  TotalVirtual  = 6;                                                         { Total virtual memory in bytes       }
  AvailVirtual  = 7;                                                         { Available virtual memory (bytes)    }

  CPU_Core1     = 2;                                                         { binary mask for CORE 1              }
  CPU_Core2     = 1;                                                         { binary mask for CORE 2              }

 

 

{ FUNCTIONS IMPORTED FROM DLL: }

function GetCPUSpeed: Double;                      stdcall; external 'HardwareIDExtractor.DLL';
function CPUFamily  : ShortString;                 stdcall; external 'HardwareIDExtractor.DLL';    { Get cpu identifier }
function GetCpuTheoreticSpeed: Integer;            stdcall; external 'HardwareIDExtractor.DLL';    { Get cpu speed (in MHz) }
function IsCPUIDAvailable: Boolean;                stdcall; external 'HardwareIDExtractor.DLL';
function GetCPUID (CpuCore: byte): ShortString;    stdcall; external 'HardwareIDExtractor.DLL';
Function GetCPUVendor: ShortString;                stdcall; external 'HardwareIDExtractor.DLL';
function MemoryStatus    (MemType: Integer): cardinal; stdcall; external 'HardwareIDExtractor.DLL';   { in Bytes }
function MemoryStatus_MB (MemType: Integer): ShortString; stdcall; external 'HardwareIDExtractor.DLL';   { in MB }
function GetPartitionID  (Partition: PChar): ShortString; stdcall; external 'HardwareIDExtractor.DLL';   { Get the ID of the specified patition. Example: 'C:' }
function GetIDESerialNumber(DriveNumber: Byte ): PChar;stdcall; external 'HardwareIDExtractor.DLL';   { DriveNr is from 0 to 4 }

 

 

implementation

 

 

procedure TfrmMain.btnStartClick(Sender: TObject);
VAR sPath: PChar;
begin
 { HDD }
 lblHrdwHDD.Caption:= 'IDE disk drive ID (hardware): '+ Trim(GetIdeSerialNumber(0));
 if   lblHrdwHDD.Caption = ''                                                             { if disk 0 does not exist or it is something else (Flash, CDROM, etc) }
 then lblHrdwHDD.Caption:= 'IDE disk drive ID (hardware): '+ Trim(GetIdeSerialNumber(1)); { get the ID of the next drive }
 sPath:= PChar(DriveCombo.Drive + ':\');
 lblSoftID.Caption:= 'Partition ID: '+ GetPartitionID(sPath);

 

 {CPU}                                                                                  { These functions are always available }
 lblCPUFamily   .Caption:= 'CPU Family: '+ CPUFamily;
 lblGetCPUVendor.Caption:= 'CPU Vendor: '+ GetCPUVendor;
 lblCpuThSpeed  .Caption:= 'CPU Speed: ' + IntToStr(GetCpuTheoreticSpeed)+ ' MHz (theoretic)';
 lblCPUspeed    .Caption:= 'CPU Speed: ' + FloatToStr( GetCPUSpeed )     + ' MHz (current)';


 {CPU-ID}
 if IsCPUIDAvailable          { All modern CPU's should support this function. Probably nobody is using a Pentium I today :) }
 then lblCpuId.Caption  := 'CPU ID: '+ GetCPUID(CPU_Core1)
 else lblCpuId.Caption  := 'CPU ID not available.';
 
 {RAM }
 lblMemoryStatus  .Caption:= 'RAM: '+IntToStr(MemoryStatus (TotalPhys))+ ' bytes';         { in Bytes }
 lblMemoryStatusMB.Caption:= 'RAM: '+string(MemoryStatus_MB (TotalPhys))+ ' MB';           { in MB }
end;

 

end.

 

 

 

 

 

Related words: Get disk serial, real hard drive serial number, hardware ID number, programming code, DLL library, extract hardware info, get CPU producer frequency and producer

contig assembly software
   
                                   Hardware ID Extractor Support