Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 05-05-08   #1 (permalink)
Programmer
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,526
Blog Entries: 3

Rep: 247 Licht is acknowledged by manyLicht is acknowledged by manyLicht is acknowledged by many
Unique Rep: 165
Folding Team Rank: 844
Trader Rating: 0
Default [C#]How to access System.Machine object?

I tried directly accessing it but it says it doesn't exist in my namespace. Not sure what to do about this.

System: AMD-AMD-ATI
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Licht's Gallery   Reply With Quote
Old 05-06-08   #2 (permalink)
Intel Overclocker
 
njNET's Avatar
 
intel nvidia

Join Date: Apr 2008
Posts: 95

Rep: 29 njNET is acknowledged by some
Unique Rep: 27
Folding Team Rank: 385
Trader Rating: 2
Default

Licht, not sure if you added the System.Machine reference to your project, but what you need to do is from the solution explorer, select the project. Then on the project menu choose "Add Reference". From there you should be able to select the .NET Components and then select System.Machine.

Let me know how that works out for you... i'll try it on one of my dev boxes and make sure the above is correct... just speaking from memory atm.
__________________
System: My System
CPU
INTEL Core 2 Duo E8400 3.00 GHz 1333 MHz 775 6MB
Motherboard
EVGA 132-CK-NF78-A1 NVIDIA nForce 780i
Memory
4gb Corsair Dominator Series TWIN2X2048-8500C5D
Graphics Card
2x eVGA GeForce 8800 GTS 640
Hard Drive
4x Western Digital 150gb Raptor 10,000 RPM
Sound Card
Razer Barraccuda AC-1
Case
Antec Nine Hundred
OS
Microsoft Vista x64 Ultimate
Monitor
2x Samsung 226BW 22" Monitors
njNET is offline I fold for Overclock.net   Reply With Quote
Old 05-06-08   #3 (permalink)
Performance...
 
linskingdom's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: In Office
Posts: 8,735

Rep: 2154 linskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legend
Unique Rep: 932
Trader Rating: 3
Default

I am not aware of C# has System.Machine namespace but the System.Management namespace should have all functionalities to retrieve all information from the local machine.

System: QD65D45
CPU
65Q/D&45D
Motherboard
DFI/Asus/Gigabyte

Last edited by linskingdom : 05-06-08 at 09:45 AM.
linskingdom is offline Overclocked Account linskingdom's Gallery   Reply With Quote
Old 05-06-08   #4 (permalink)
Programmer
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,526
Blog Entries: 3

Rep: 247 Licht is acknowledged by manyLicht is acknowledged by manyLicht is acknowledged by many
Unique Rep: 165
Folding Team Rank: 844
Trader Rating: 0
Default

Quote:
Originally Posted by njNET View Post
Licht, not sure if you added the System.Machine reference to your project, but what you need to do is from the solution explorer, select the project. Then on the project menu choose "Add Reference". From there you should be able to select the .NET Components and then select System.Machine.

Let me know how that works out for you... i'll try it on one of my dev boxes and make sure the above is correct... just speaking from memory atm.
I can't find it in .Net 3.5 (latest.)

Quote:
I am not aware of C# has System.Machine namespace but the System.Management namespace should have all functionalities to retrieve all information from the local machine.
I'm more looking for CPU name and other information along those lines.

System: AMD-AMD-ATI
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Licht's Gallery   Reply With Quote
Old 05-06-08   #5 (permalink)
Ouch, that MHz!
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Hamilton, ON
Posts: 1,730

Rep: 270 C-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 205
FAQs Submitted: 6
Folding Team Rank: 184
Hardware Reviews: 9
Trader Rating: 1
Default

Do you have to specifically use System.Machine? I'm not at home at the moment, but this looks promising:

http://www.codeproject.com/KB/system...formation.aspx

System: RAID0R
CPU
Intel E2180 3.3GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair CMPSU-550VX
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business 32-Bit
Monitor
HP F2105 21" & Samsung 712N
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery   Reply With Quote
Old 05-06-08   #6 (permalink)
Programmer
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,526
Blog Entries: 3

Rep: 247 Licht is acknowledged by manyLicht is acknowledged by manyLicht is acknowledged by many
Unique Rep: 165
Folding Team Rank: 844
Trader Rating: 0
Default

Quote:
Originally Posted by C-bro View Post
Do you have to specifically use System.Machine? I'm not at home at the moment, but this looks promising:

http://www.codeproject.com/KB/system...formation.aspx
I like how much info is there that i can access! Even voltage... Thank you, thank you! I'll definitely see about using this. (Busy at the moment though.)

System: AMD-AMD-ATI
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Licht's Gallery   Reply With Quote
Old 05-06-08   #7 (permalink)
Intel Overclocker
 
njNET's Avatar
 
intel nvidia

Join Date: Apr 2008
Posts: 95

Rep: 29 njNET is acknowledged by some
Unique Rep: 27
Folding Team Rank: 385
Trader Rating: 2
Default

BTW, forgot to add, the System.Machine namespace is in the SDK for the windows sidebar.

http://msdn.microsoft.com/en-us/libr...60(VS.85).aspx
__________________
System: My System
CPU
INTEL Core 2 Duo E8400 3.00 GHz 1333 MHz 775 6MB
Motherboard
EVGA 132-CK-NF78-A1 NVIDIA nForce 780i
Memory
4gb Corsair Dominator Series TWIN2X2048-8500C5D
Graphics Card
2x eVGA GeForce 8800 GTS 640
Hard Drive
4x Western Digital 150gb Raptor 10,000 RPM
Sound Card
Razer Barraccuda AC-1
Case
Antec Nine Hundred
OS
Microsoft Vista x64 Ultimate
Monitor
2x Samsung 226BW 22" Monitors
njNET is offline I fold for Overclock.net   Reply With Quote
Old 05-06-08   #8 (permalink)
Programmer
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,526
Blog Entries: 3

Rep: 247 Licht is acknowledged by manyLicht is acknowledged by manyLicht is acknowledged by many
Unique Rep: 165
Folding Team Rank: 844
Trader Rating: 0
Default

Quote:
Originally Posted by njNET View Post
BTW, forgot to add, the System.Machine namespace is in the SDK for the windows sidebar.

http://msdn.microsoft.com/en-us/libr...60(VS.85).aspx
Also very good information, that SDK may be useful in the future.

System: AMD-AMD-ATI
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Licht's Gallery   Reply With Quote
Old 05-07-08   #9 (permalink)
Performance...
 
linskingdom's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: In Office
Posts: 8,735

Rep: 2154 linskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legendlinskingdom is a legend
Unique Rep: 932
Trader Rating: 3
Default

Quote:
Originally Posted by Licht View Post
I can't find it in .Net 3.5 (latest.)



I'm more looking for CPU name and other information along those lines.
The System.Management has it all - software as well as hardware information.

ManagementObjectSearcher Srch1 = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
foreach (ManagementObject mobj in Srch1.Get())
{
Console.WriteLine(Srch1.ToString());
}

System: QD65D45
CPU
65Q/D&45D
Motherboard
DFI/Asus/Gigabyte

Last edited by linskingdom : 05-07-08 at 10:37 AM.
linskingdom is offline Overclocked Account linskingdom's Gallery   Reply With Quote
Old 07-10-08   #10 (permalink)
Programmer
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 8,526
Blog Entries: 3

Rep: 247 Licht is acknowledged by manyLicht is acknowledged by manyLicht is acknowledged by many
Unique Rep: 165
Folding Team Rank: 844
Trader Rating: 0
Default

Quote:
Originally Posted by linskingdom View Post
The System.Management has it all - software as well as hardware information.

ManagementObjectSearcher Srch1 = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS");
foreach (ManagementObject mobj in Srch1.Get())
{
Console.WriteLine(Srch1.ToString());
}
Time to revive an old thread.

Your code throws this.

Code:
Error    1    The type or namespace name 'ManagementObjectSearcher' could not be found (are you missing a using directive or an assembly reference?)    C:UsersLichtDocumentsDoubleMarkDoubleMarkForm1.cs    18    9    DoubleMark

System: AMD-AMD-ATI
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
2x 1Gb Kingston && 2x 1Gb Wintec
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Licht's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 04:12 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.20744 seconds with 9 queries