|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming | |
[C#]How to access System.Machine object?
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
Programmer
|
I tried directly accessing it but it says it doesn't exist in my namespace. Not sure what to do about this.
__________________
|
|||||||||||||
|
|
|
|
#2 (permalink) | ||||||||||
|
Intel Overclocker
|
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.
|
||||||||||
|
|
|
|
#3 (permalink) | |||
|
Performance...
|
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.
__________________
Push the limit one more time ... ![]()
Last edited by linskingdom : 05-06-08 at 09:45 AM. |
|||
|
|
|
|
#4 (permalink) | |||||||||||||||
|
Programmer
|
Quote:
Quote:
__________________
|
|||||||||||||||
|
|
|
|
#5 (permalink) | ||||||||||||
|
Ouch, that MHz!
|
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
__________________
|
||||||||||||
|
|
|
|
#6 (permalink) | ||||||||||||||
|
Programmer
|
Quote:
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.)
__________________
|
||||||||||||||
|
|
|
|
#7 (permalink) | ||||||||||
|
Intel Overclocker
|
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
|
||||||||||
|
|
|
|
#8 (permalink) | ||||||||||||||
|
Programmer
|
Quote:
__________________
|
||||||||||||||
|
|
|
|
#9 (permalink) | ||||
|
Performance...
|
Quote:
ManagementObjectSearcher Srch1 = new ManagementObjectSearcher("SELECT * FROM Win32_BIOS"); foreach (ManagementObject mobj in Srch1.Get()) { Console.WriteLine(Srch1.ToString()); }
__________________
Push the limit one more time ... ![]()
Last edited by linskingdom : 05-07-08 at 10:37 AM. |
||||
|
|
|
|
#10 (permalink) | ||||||||||||||
|
Programmer
|
Quote:
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
__________________
|
||||||||||||||
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|