{*******************************************************} { } { System Information Library } { 2006, Gullb3rg } { Codius } { } {*******************************************************} Unit unSystemInformation; Interface uses Windows, Winsock, Registry, SysUtils, NB30; Type TRSystemInformation = Record UserName : String; ComputerName : String; Location : String; LocalIP : String; WinVersion : String; Build : Cardinal; WindowsID : String; ServicePack : String; VolumeSerial : String; DefultBrowser : String; MACAdress : String; WinEdition : String; end; TCSystemInformation = Class Private CSystemInformation : TCSystemInformation; Function GetUser : String; Function GetComputerNetName : String; Function GetLanguage(cType: Cardinal) : String; Function GetOS : String; Function GetUpTime : String; Function GetLocalIP : String; Function GetWinVersion : String; Function GetBuild : Cardinal; Function GetWindowsID : String; Function GetServicePack : String; Function FindVolumeSerial(const Drive : PChar) : String; Function GetDefultBrowser : String; Function GetMACAdress : String; Function GetWinEdition : String; Function ViewUser : String; Function ViewComputerNetName : String; Function ViewLanguage : String; Function ViewOS : String; Function ViewUpTime : String; Function ViewLocalIP : String; Function ViewWinVersion : String; Function ViewBuild : Cardinal; Function ViewWindowsID : String; Function ViewServicePack : String; Function ViewVolumeSerial : String; Function ViewDefultBrowser : String; Function ViewMACAdress : String; Function ViewWinEdition : String; Public Constructor Create; Procedure Refresh; Property UserName : String Read ViewUser; Property ComputerName : String Read ViewComputerNetName; Property Language : String Read ViewLanguage; Property OS : String Read ViewOS; Property UpTime : String Read ViewUpTime; Property LocalIP : String Read ViewLocalIP; Property WinVersion : String Read ViewWinVersion; Property Build : Cardinal Read ViewBuild; Property WindowsID : String Read ViewWindowsID; Property ServicePack : String Read ViewServicePack; Property VolumeSerial : String Read ViewVolumeSerial; Property DefultBrowser : String Read ViewDefultBrowser; Property MACAdress : String Read ViewMACAdress; Property WinEdition : String Read ViewWinEdition; end; implementation { IntToStr This function is used to convert integers to strings. } Function IntToStr(Const Value: Integer): String; Var s : String[11]; Begin Str(Value, s); Result := s; End; { StrToInt This function is used to convert strings to integers. } Function StrToInt(Const s: String): Integer; Var e : integer; Begin val(s, Result, e); End; { TCSystemInformation.Create This constructor will initialize the system information record. } Constructor TCSystemInformation.Create; Begin Inherited; Refresh; End; { TCProcessorInformation.Refresh This routine will refresh the processor record. } Procedure TCSystemInformation.Refresh; Begin RSystemInformation. end; end.