Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / is it possible to get cpu name and speed

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 13th Nov 2010 18:31
I know that it is possible to get name of the current graphics adapter and its memory, but is it possible to get name and speed and maybe number of cpu's of the computer?
bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 13th Nov 2010 18:42
I know the Enhancement pack has some CPU commands: http://www.thegamecreators.com/?m=view_product&id=2083

51fa1db0ec7c4af52d93a6f5d0e86bc5


=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 13th Nov 2010 19:08 Edited at: 13th Nov 2010 19:20


This is how I do it Works with Win XP, Vista and 7

>Edit<
Not a complete snippet, I hacked it out of my Autoreporter function but it should give you the general idea.

>Edit 2<
How are you obtaining the display memory? I've been unable to get system dmem available() to work on Win 7, and Green Gandalf reported that the command was not working on his XP system either, possibly indicating that its Update 7.5 at fault.

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 13th Nov 2010 22:04 Edited at: 13th Nov 2010 22:17
Try this, but just so you know there will be major slowdown on your computer. My system is 32-bit XP and this works fine.



how can i print out second command in your code, and what should i do if someone has more then one processor (multi-core processor)
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 13th Nov 2010 22:27 Edited at: 13th Nov 2010 22:28


This will print it all on the screen in a neat fashion for you. In my original code, it was saved out as a text file so I just cut out the bits which told you the information.

I'm not sure about multiple cpu's, but it works fine for multi core cpu's.

And your snippet crashed in the same way on both my PC's. Are you running the latest update of DBP? (Update 7.5)

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 13th Nov 2010 23:57
yes i have latest update 7.5
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Nov 2010 12:31
=PRoF=

Quote: "Green Gandalf reported that the command was not working on his XP system either, possibly indicating that its Update 7.5 at fault"


Thanks for the reminder - it doesn't work on my 64bit Vista machine either. I've updated your bug report.

And, yes, I'm using U7.5 as well.

Login to post a reply

Server time is: 2026-07-21 18:58:22
Your offset time is: 2026-07-21 18:58:22