Willkommen! Melden Sie sich an oder registrieren Sie sich.

Um schreiben oder kommentieren zu können, benötigen Sie ein Benutzerkonto.

Sie haben schon ein Benutzerkonto? Melden Sie sich hier an.

Anmelden

Hier können Sie ein neues Benutzerkonto erstellen.

Neues Benutzerkonto erstellen
  1. Dashboard
  2. Forum
    1. DeviantArt
    2. Twitch
    3. Facebook
    4. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Lexikon
  • Anmelden oder registrieren

    Anmeldung

    Kennwort vergessen

    Registrierung

    Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

    Benutzerkonto erstellen

    Anmeldung über Drittanbieter

    • Mit Facebook anmelden
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Forum
  • Lexikon-Eintrag
  • Marktplatz-Eintrag
  • Partner
  • Banner
  • Erweiterte Suche
  1. Dashboard
  2. Forum
    1. DeviantArt
    2. Twitch
    3. Facebook
    4. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Lexikon
  1. Dashboard
  2. Forum
    1. DeviantArt
    2. Twitch
    3. Facebook
    4. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Lexikon
  1. Generation-FX.eu - deine GFX Community
  2. Forum
  3. Underground Forum
  4. Coding
  5. Delphi, Pascal
  6. Sources
  • Rechte Seitenleiste einblenden
  • Rechte Seitenleiste ausblenden

sysinfo

  • Pallmall
  • 10. März 2009
  • Pallmall
    Schüler
    Punkte
    300
    Beiträge
    47
    • 10. März 2009
    • #1
    Code
    1. [COLOR=#0000af][B]unit[/B][/COLOR] Unit1;
    2. [COLOR=#0000af][B]interface[/B][/COLOR]
    3. [COLOR=#0000af][B]uses[/B][/COLOR]
    4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    5. Dialogs, StdCtrls, Gauges, Registry, ComCtrls, ExtCtrls;
    6. [COLOR=#0000af][B]type[/B][/COLOR]
    7. TForm1 [COLOR=#0000af]=[/COLOR] [COLOR=#0000af][B]class[/B][/COLOR](TForm)
    8. ListBox1: TListBox;
    9. Label1: TLabel;
    10. Label2: TLabel;
    11. Gauge1: TGauge;
    12. Gauge2: TGauge;
    13. Edit1: TEdit;
    14. Edit2: TEdit;
    15. Label3: TLabel;
    16. Label4: TLabel;
    17. Label5: TLabel;
    18. Label6: TLabel;
    19. Label7: TLabel;
    20. Label8: TLabel;
    21. Label9: TLabel;
    22. Label10: TLabel;
    23. Label11: TLabel;
    24. Label12: TLabel;
    25. Label13: TLabel;
    26. Edit3: TEdit;
    27. Edit4: TEdit;
    28. Edit5: TEdit;
    29. Edit6: TEdit;
    30. Edit7: TEdit;
    31. Edit8: TEdit;
    32. Edit9: TEdit;
    33. Edit10: TEdit;
    34. Edit11: TEdit;
    35. Edit12: TEdit;
    36. Edit13: TEdit;
    37. Timer1: TTimer;
    38. Label14: TLabel;
    39. Edit14: TEdit;
    40. [COLOR=#0000af][B]procedure[/B][/COLOR] Timer1Timer(Sender: TObject);
    41. [COLOR=#0000af][B]procedure[/B][/COLOR] FormCreate(Sender: TObject);
    42. [COLOR=#0000af][B]private[/B][/COLOR]
    43. [COLOR=#008000]{ Private-Deklarationen }[/COLOR]
    44. [COLOR=#0000af][B]public[/B][/COLOR]
    45. [COLOR=#008000]{ Public-Deklarationen }[/COLOR]
    46. [COLOR=#0000af][B]end[/B][/COLOR];
    47. [COLOR=#0000af][B]var[/B][/COLOR]
    48. Form1: TForm1;
    49. [COLOR=#0000af][B]implementation[/B][/COLOR]
    50. [COLOR=#008000]{$R *.dfm}[/COLOR]
    51. [COLOR=#008000]//FUNKTIONEN[/COLOR]
    52. [COLOR=#008000]//------------------------------------------------------------------------------[/COLOR]
    53. [COLOR=#008000]//PROZESSORNAME[/COLOR]
    54. [COLOR=#0000af][B]function[/B][/COLOR] GetProzessorName: [COLOR=#0000af][B]string[/B][/COLOR];
    55. [COLOR=#0000af][B]var[/B][/COLOR] reg: TRegistry;
    56. [COLOR=#0000af][B]begin[/B][/COLOR]
    57. result:[COLOR=#0000af]=[/COLOR]'[COLOR=#000080]Unbekannter Prozessor[/COLOR]';
    58. reg:=TRegistry.Create;
    59. [COLOR=#0000af][B]try[/B][/COLOR]
    60. reg.RootKey :[COLOR=#0000af]=[/COLOR] HKEY_LOCAL_MACHINE;
    61. reg.OpenKey('[COLOR=#000080]Hardware\Description\System\CentralProcessor\0[/COLOR]', false);
    62. result:=reg.ReadString('[COLOR=#000080]ProcessorNameString[/COLOR]');
    63. [COLOR=#0000af][B]finally[/B][/COLOR]
    64. reg.free;
    65. [COLOR=#0000af][B]end[/B][/COLOR];
    66. [COLOR=#0000af][B]end[/B][/COLOR];
    67. [COLOR=#008000]//DERZEITIGE PROZESSORAUSLASTUNG[/COLOR]
    68. [COLOR=#0000af][B]function[/B][/COLOR] CalcCPUSpeed: Extended;
    69. [COLOR=#0000af][B]const[/B][/COLOR]
    70. DelayTime [COLOR=#0000af]=[/COLOR] 500; [COLOR=#008000]// measure time in ms[/COLOR]
    71. [COLOR=#0000af][B]var[/B][/COLOR]
    72. TimerHi, TimerLo: DWord;
    73. PriorityClass, Priority: Integer;
    74. [COLOR=#0000af][B]begin[/B][/COLOR]
    75. [COLOR=#0000af][B]try[/B][/COLOR]
    76. PriorityClass :[COLOR=#0000af]=[/COLOR] GetPriorityClass(GetCurrentProcess);
    77. Priority :[COLOR=#0000af]=[/COLOR] GetThreadPriority(GetCurrentThread);
    78. SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
    79. SetThreadPriority(GetCurrentThread,
    80. THREAD_PRIORITY_TIME_CRITICAL);
    81. [COLOR=#0000af][B]try[/B][/COLOR]
    82. Sleep(10);
    83. [COLOR=#0000af][B]asm[/B][/COLOR]
    84. dw 310Fh [COLOR=#008000]// rdtsc[/COLOR]
    85. mov TimerLo, eax
    86. mov TimerHi, edx
    87. [COLOR=#0000af][B]end[/B][/COLOR];
    88. Sleep(DelayTime);
    89. [COLOR=#0000af][B]asm[/B][/COLOR]
    90. dw 310Fh [COLOR=#008000]// rdtsc[/COLOR]
    91. sub eax, TimerLo
    92. sbb edx, TimerHi
    93. mov TimerLo, eax
    94. mov TimerHi, edx
    95. [COLOR=#0000af][B]end[/B][/COLOR];
    96. [COLOR=#0000af][B]finally[/B][/COLOR]
    97. SetThreadPriority(GetCurrentThread, Priority);
    98. SetPriorityClass(GetCurrentProcess, PriorityClass);
    99. [COLOR=#0000af][B]end[/B][/COLOR];
    100. Result :[COLOR=#0000af]=[/COLOR] TimerLo / (1000.0 * DelayTime);
    101. [COLOR=#0000af][B]except[/B][/COLOR]
    102. Result :[COLOR=#0000af]=[/COLOR] 0;
    103. [COLOR=#0000af][B]end[/B][/COLOR];
    104. [COLOR=#0000af][B]end[/B][/COLOR];
    105. [COLOR=#008000]//LAUFWERKE ERMITTELN[/COLOR]
    106. [COLOR=#0000af][B]procedure[/B][/COLOR] GetDrives([COLOR=#0000af][B]const[/B][/COLOR] AItems: TStrings);
    107. [COLOR=#0000af][B]const[/B][/COLOR]
    108. DriveTypeTexts: [COLOR=#0000af][B]array[/B][/COLOR][DRIVE_UNKNOWN..DRIVE_RAMDISK] [COLOR=#0000af][B]of[/B][/COLOR] [COLOR=#0000af][B]string[/B][/COLOR] [COLOR=#0000af]=[/COLOR]
    109. ('[COLOR=#000080]Unbekannt[/COLOR]', '[COLOR=#000080]Kein Wurzelverzeichnis[/COLOR]', '[COLOR=#000080]Diskette[/COLOR]', '[COLOR=#000080]Festplatte[/COLOR]', '[COLOR=#000080]Netzlaufwerk[/COLOR]', '[COLOR=#000080]CDROM[/COLOR]', '[COLOR=#000080]RAMDisk[/COLOR]');
    110. [COLOR=#0000af][B]var[/B][/COLOR]
    111. Drive: Char;
    112. DriveType: Integer;
    113. DriveMask: Integer;
    114. Flag: Integer;
    115. [COLOR=#0000af][B]begin[/B][/COLOR]
    116. DriveMask:=GetLogicalDrives;
    117. flag:=1;
    118. [COLOR=#0000af][B]for[/B][/COLOR] Drive :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]A[/COLOR]' [COLOR=#0000af][B]to[/B][/COLOR] '[COLOR=#000080]Z[/COLOR]' [COLOR=#0000af][B]do[/B][/COLOR]
    119. [COLOR=#0000af][B]begin[/B][/COLOR]
    120. [COLOR=#0000af][B]if[/B][/COLOR] (flag [COLOR=#0000af][B]and[/B][/COLOR] DriveMask)<>0 [COLOR=#0000af][B]then[/B][/COLOR]
    121. [COLOR=#0000af][B]begin[/B][/COLOR]
    122. DriveType :[COLOR=#0000af]=[/COLOR] GetDriveType(PChar(Format('[COLOR=#000080]%S:\[/COLOR]',[Drive]) ) ) ;
    123. AItems.Add(Format('[COLOR=#000080]%s: %s[/COLOR]', [Drive, DriveTypeTexts[DriveType]]));
    124. [COLOR=#0000af][B]end[/B][/COLOR];
    125. flag:=flag [COLOR=#0000af][B]shl[/B][/COLOR] 1;
    126. [COLOR=#0000af][B]end[/B][/COLOR];
    127. [COLOR=#0000af][B]end[/B][/COLOR];
    128. [COLOR=#008000]//ANZAHL DER PROZESSOREN ERMITTELN[/COLOR]
    129. [COLOR=#0000af][B]function[/B][/COLOR] GetNumberOfProcessors: Integer;
    130. [COLOR=#0000af][B]var[/B][/COLOR]
    131. SystemInfo: TSystemInfo;
    132. [COLOR=#0000af][B]begin[/B][/COLOR]
    133. GetSystemInfo(SystemInfo);
    134. Result:=SystemInfo.dwNumberOfProcessors;
    135. [COLOR=#0000af][B]end[/B][/COLOR];
    136. [COLOR=#008000]//WINDOWS UPTIME[/COLOR]
    137. [COLOR=#0000af][B]procedure[/B][/COLOR] GetWindowsUpTime([COLOR=#0000af][B]var[/B][/COLOR] ADay, AHours, AMinutes, ASeconds: Integer);
    138. [COLOR=#0000af][B]const[/B][/COLOR]
    139. OneDay : Integer [COLOR=#0000af]=[/COLOR] 1000 * 60 * 60 * 24;
    140. OneHour : Integer [COLOR=#0000af]=[/COLOR] 1000 * 60 * 60;
    141. OneMinutes : Integer [COLOR=#0000af]=[/COLOR] 1000 * 60;
    142. OneSecond : Integer [COLOR=#0000af]=[/COLOR] 1000;
    143. [COLOR=#0000af][B]var[/B][/COLOR]
    144. Start : Integer;
    145. d, h, m, s: Integer;
    146. [COLOR=#0000af][B]begin[/B][/COLOR]
    147. Start:=GetTickCount;
    148. ADay:=Start [COLOR=#0000af][B]div[/B][/COLOR] OneDay; [COLOR=#008000]//Tage[/COLOR]
    149. d:=Start [COLOR=#0000af][B]mod[/B][/COLOR] OneDay;
    150. AHours:=d [COLOR=#0000af][B]div[/B][/COLOR] OneHour; [COLOR=#008000]//Stunden[/COLOR]
    151. h:=d [COLOR=#0000af][B]mod[/B][/COLOR] OneHour;
    152. AMinutes:=h [COLOR=#0000af][B]div[/B][/COLOR] OneMinutes; [COLOR=#008000]//Minuten[/COLOR]
    153. s:=h [COLOR=#0000af][B]mod[/B][/COLOR] OneMinutes;
    154. ASeconds:=s [COLOR=#0000af][B]div[/B][/COLOR] OneSecond; [COLOR=#008000]//Sekunden[/COLOR]
    155. [COLOR=#0000af][B]end[/B][/COLOR];
    156. [COLOR=#008000]//PROGRAMMSTART[/COLOR]
    157. [COLOR=#008000]//------------------------------------------------------------------------------[/COLOR]
    158. [COLOR=#0000af][B]procedure[/B][/COLOR] TForm1.FormCreate(Sender: TObject);
    159. [COLOR=#0000af][B]var[/B][/COLOR]
    160. Memory: TMemoryStatus;
    161. freeCaller, total: Int64;
    162. [COLOR=#0000af][B]begin[/B][/COLOR]
    163. GetDrives(listbox1.Items);
    164. edit1.text:=GetProzessorName;
    165. edit2.Text :[COLOR=#0000af]=[/COLOR] inttostr(GetNumberOfProcessors);
    166. Memory.dwLength :[COLOR=#0000af]=[/COLOR] SizeOf(Memory);
    167. GlobalMemoryStatus(Memory);
    168. edit6.text:=IntToStr(Memory.dwTotalPhys [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024) +'[COLOR=#000080] MB[/COLOR]';
    169. GetDiskFreeSpaceEx('[COLOR=#000080]c:[/COLOR]', freeCaller, total, [COLOR=#0000af][B]nil[/B][/COLOR]);
    170. edit9.text:=floatToStr(total [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024 / 1024) +'[COLOR=#000080] GB[/COLOR]';
    171. [COLOR=#0000af][B]end[/B][/COLOR];
    172. [COLOR=#0000af][B]procedure[/B][/COLOR] TForm1.Timer1Timer(Sender: TObject);
    173. [COLOR=#0000af][B]var[/B][/COLOR]
    174. Tage, Stunden, Minuten, Sekunden: Integer;
    175. Memory: TMemoryStatus;
    176. SystemPowerStatus: TSystemPowerStatus;
    177. freeCaller, total: Int64;
    178. [COLOR=#0000af][B]begin[/B][/COLOR]
    179. edit4.Text:=IntToStr(Round(CalcCPUSpeed))+ '[COLOR=#000080] MHz[/COLOR]';
    180. GetWindowsUpTime(Tage, Stunden, Minuten, Sekunden);
    181. edit11.text :=Format('[COLOR=#000080]%d Tage %d Stunden %d Minuten %d Sekunden[/COLOR]', [Tage, Stunden, Minuten, Sekunden]);
    182. Memory.dwLength :[COLOR=#0000af]=[/COLOR] SizeOf(Memory);
    183. GlobalMemoryStatus(Memory);
    184. gauge1.MaxValue :[COLOR=#0000af]=[/COLOR] Memory.dwTotalPhys;
    185. gauge1.Progress :[COLOR=#0000af]=[/COLOR] Memory.dwAvailPhys;
    186. gauge2.MaxValue :[COLOR=#0000af]=[/COLOR] Memory.dwTotalPhys;
    187. gauge2.Progress :[COLOR=#0000af]=[/COLOR] Memory.dwTotalPhys - Memory.dwavailPhys;
    188. [COLOR=#008000]//Freier Arbeitsspeicher[/COLOR]
    189. edit7.Text :[COLOR=#0000af]=[/COLOR] inttostr(Memory.dwAvailPhys [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024)+ '[COLOR=#000080] MB[/COLOR]';
    190. edit8.Text :[COLOR=#0000af]=[/COLOR] inttostr(Memory.dwTotalPhys [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024 - Memory.dwavailPhys [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024)+ '[COLOR=#000080] MB[/COLOR]';
    191. GetSystemPowerStatus(SystemPowerStatus);
    192. [COLOR=#0000af][B]with[/B][/COLOR] SystemPowerStatus [COLOR=#0000af][B]do[/B][/COLOR] [COLOR=#0000af][B]begin[/B][/COLOR]
    193. [COLOR=#008000]// Wird das System mit Wechselstrom oder Akku betrieben ?[/COLOR]
    194. [COLOR=#0000af][B]case[/B][/COLOR] ACLineStatus [COLOR=#0000af][B]of[/B][/COLOR]
    195. 0: edit12.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]System wird mit Akku betrieben[/COLOR]';
    196. 1: edit12.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]System wird mit Wechselstrom betrieben[/COLOR]';
    197. [COLOR=#0000af][B]else[/B][/COLOR] Label5.Caption :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Unbekannter Status[/COLOR]';
    198. [COLOR=#0000af][B]end[/B][/COLOR];
    199. [COLOR=#008000]// Ladezustand der Batterie[/COLOR]
    200. [COLOR=#0000af][B]case[/B][/COLOR] BatteryFlag [COLOR=#0000af][B]of[/B][/COLOR]
    201. 1 : edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Hoher Ladezustand[/COLOR]';
    202. 2 : edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Niedriger Ladezustand[/COLOR]';
    203. 4 : edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Kritischer Ladezustand[/COLOR]';
    204. 8 : edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Die Batterie wird geladen[/COLOR]';
    205. 128: edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Es existiert keine System-Batterie[/COLOR]';
    206. 255: edit13.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Unbekannter Status[/COLOR]';
    207. [COLOR=#0000af][B]end[/B][/COLOR];
    208. [COLOR=#008000]// Ladezustand in Prozent[/COLOR]
    209. [COLOR=#0000af][B]if[/B][/COLOR] BatteryLifePercent <> 255 [COLOR=#0000af][B]then[/B][/COLOR]
    210. edit14.text :[COLOR=#0000af]=[/COLOR] IntToStr(BatteryLifePercent) + '[COLOR=#000080] %[/COLOR]'
    211. [COLOR=#0000af][B]else[/B][/COLOR]
    212. edit14.text :[COLOR=#0000af]=[/COLOR] '[COLOR=#000080]Unbekannter Status[/COLOR]';
    213. [COLOR=#0000af][B]end[/B][/COLOR];
    214. Memory.dwLength :[COLOR=#0000af]=[/COLOR] SizeOf(Memory);
    215. GlobalMemoryStatus(Memory);
    216. GetDiskFreeSpaceEx('[COLOR=#000080]c:[/COLOR]', freeCaller, total, [COLOR=#0000af][B]nil[/B][/COLOR]);
    217. edit10.text:=floattostr(freeCaller [COLOR=#0000af][B]div[/B][/COLOR] 1024 [COLOR=#0000af][B]div[/B][/COLOR] 1024 / 1024)+'[COLOR=#000080] GB[/COLOR]';
    218. [COLOR=#0000af][B]end[/B][/COLOR];
    219. [COLOR=#0000af][B]end[/B][/COLOR].
    Alles anzeigen
    • Inhalt melden


Teilen

  • Facebook
  • Twitter
  • WhatsApp
  • Pinterest
  1. Umfragen
  2. Partner
  3. Statistik
  4. Datenschutzerklärung
Community-Software: WoltLab Suite™
Stil: Alpha von cls-design
Stilname
Alpha
Hersteller
cls-design
Designer
Tom
Lizenz
Kostenpflichtige Stile
Hilfe
Supportforum
cls-design besuchen


  1. Navigation
  2. Dashboard
  3. Forum
    1. DeviantArt
    2. Twitch
    3. Facebook
    4. Unerledigte Themen
  4. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  5. Lexikon
  6. Suche
  7. Optionen
    1. (placeholder)
  8. Aktueller Ort
  9. Generation-FX.eu - deine GFX Community
  10. Forum
  11. Underground Forum
  12. Coding
  13. Delphi, Pascal
  14. Sources
  1. Benutzer-Menü
  2. Anmeldung
  3. Registrierung
Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen Schließen