AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Cpu Usage fur Core2duo/Core2quad

Cpu Usage fur Core2duo/Core2quad

Ein Thema von Razor · begonnen am 19. Aug 2007 · letzter Beitrag vom 5. Mai 2008
Antwort Antwort
Seite 1 von 2  1 2   
Razor
(Gast)

n/a Beiträge
 
#1

Cpu Usage fur Core2duo/Core2quad

  Alt 19. Aug 2007, 19:14
This is fairly impossible i tried carbon cpu commponents and adcpuusage component all show error on core2duo.
Is there any special way for this,if so please tell.

Thanks!
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#2

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 21. Aug 2007, 23:34
Obviosly if i waited you guys to respond it wouldnt happen but it did and i figured out

Delphi-Quellcode:
 unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxCpu40Nv, ExtCtrls, StdCtrls, ComCtrls,cxCpu40;

type
  TForm1 = class(TForm)
    ProgressBar1: TProgressBar;
    ProgressBar2: TProgressBar;
    ProgressBar3: TProgressBar;
    ProgressBar4: TProgressBar;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Timer1: TTimer;
    cxCpu402: TcxCpu40;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if cxCpu402.Available.Available=1 then begin
ProgressBar1.position:=cxCpu[1].Usage.Value.Asnumber; //single core processors
 Label1.Visible:=true;

 ProgressBar1.Visible:=true;

 end;
if cxCpu402.Available.Available=2 then begin

ProgressBar1.position:=cxCpu[1].Usage.Value.Asnumber;
ProgressBar2.position:=cxCpu[2].Usage.Value.Asnumber;
  ProgressBar1.Visible:=true;
  ProgressBar2.Visible:=true;
 Label1.Visible:=true; //dual core processors
 Label2.Visible:=true;

    end;
if cxCpu402.Available.Available=4 then begin

ProgressBar1.position:=cxCpu[1].Usage.Value.Asnumber;
ProgressBar2.position:=cxCpu[2].Usage.Value.Asnumber;
ProgressBar3.position:=cxCpu[3].Usage.Value.Asnumber;
ProgressBar4.position:=cxCpu[4].Usage.Value.Asnumber;

  ProgressBar1.Visible:=true;
  ProgressBar2.Visible:=true;
  ProgressBar3.Visible:=true;
  ProgressBar4.Visible:=true;

 Label1.Visible:=true;
 Label2.Visible:=true;
 Label3.Visible:=true; //quad core processors
 Label4.Visible:=true;

    end;


end;



end.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#3

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 09:44
Your code snippet is useless. I attached the unit you are using that anybody will be able to get the same results.

Delphi-Quellcode:
{********************************************************************************************************}
{                                                                                                        }
{ Carbonsoft cxCpu Processor Detection Toolkit Release 4                                                 }
{                                                                                                        }
{ Copyright © 1995-2004 Kev French, Carbonsoft. All rights reserved.                                     }
{ [url]http://www.carbonsoft.com/cxcpu/[/url]                                                                       }
{                                                                                                        }
{ IMPORTANT INFORMATION                                                                                  }
{ This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy        }
{ of this license, visit [url]http://creativecommons.org/licenses/by-sa/1.0/[/url] or send a letter to Creative     }
{ Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.                                       }
{                                                                                                        }
{ You are free:                                                                                          }
{   - to copy, distribute, display, and perform the work                                                 }
{   - to make derivative works                                                                           }
{   - to make commercial use of the work                                                                 }
{                                                                                                        }
{ Under the following conditions:                                                                        }
{   - Attribution. You must give the original author credit                                              }
{   - Share Alike. If you alter, transform, or build upon this work, you may distribute the              }
{                  resulting work only under a license identical to this one                             }
{                                                                                                        }
{ - For any reuse or distribution, you must make clear to others the license terms of this work          }
{ - Any of these conditions can be waived if you get permission from the author.                         }
{                                                                                                        }
{ For more information please contact [email]licensing@carbonsoft.com[/email]                                           }
{                                                                                                        }
{********************************************************************************************************}
Source from: krugle.com
Angehängte Dateien
Dateityp: pas cxcpu40_905.pas (118,6 KB, 41x aufgerufen)
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#4

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 10:19
You can't say its useless,+ you provided wrong stuff you must attach adcpuusage.pas
Angehängte Dateien
Dateityp: zip cxcpu4_r4200_119.zip (467,1 KB, 67x aufgerufen)
  Mit Zitat antworten Zitat
Benutzerbild von negaH
negaH

Registriert seit: 25. Jun 2003
Ort: Thüringen
2.950 Beiträge
 
#5

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 11:40
Matthias provide wrong stuff for your code snippet ?

Regards, Hagen
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#6

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 11:41
Zitat von Razor:
You can't say its useless,+ you provided wrong stuff you must attach adcpuusage.pas
You are wrong. Your code is usesless without the unit posted by Matze. You provided unused stuff. Where in your uses clauses are you using the adcpuusage.pas? Where?

Delphi-Quellcode:
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxCpu40Nv, ExtCtrls, StdCtrls, ComCtrls,cxCpu40;
You only use cxCPU40xx unit - posted by Matze...

Will you ever learn to getting down and stop being snooty?
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#7

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 11:43
Ok i just wanted to say he could accually post the accuall package couse carbon softs component doesnt provide cpu usage,Alexey's Dynnikov Adcpuusage does the thing .


cxCpu40Nv> uses his (adcpuusage.pas) component.Cxcpu is only there for core detection.
Compile,test and see!

Afterall i made the code snippet so,little respect please..
  Mit Zitat antworten Zitat
markusj

Registriert seit: 9. Dez 2005
Ort: Kandel
408 Beiträge
 
#8

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 12:02
Hmm, maybe it would be not absolutely senseless, if you attach the needed units ... your code may be nice, but no person could use it without having those units ... so matze did some of _your_ work ... code without the corresponding units is nearly worthless ...

Regards
Markus

PS: which kind of tool are you coding? it seems that you collect lots of informations about hardware-analysis!
Markus
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#9

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 12:05
He added a unit now he did almost whole work,is this a joke

Yes i am colecting lots of information about hardware,i am doing a tool that will contain what the best tools nowadays contain,its still a secret.

If i posted the picture right now it would be a havoc.But i wont
  Mit Zitat antworten Zitat
OlafSt

Registriert seit: 2. Mär 2007
Ort: Hamburg
284 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#10

Re: Cpu Usage fur Core2duo/Core2quad

  Alt 22. Aug 2007, 12:51
Hmm... Still a secret, huh ?

Up till now I haven't seen anything spectacular now - but I'm always ready for a surprise
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2   

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz