Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What is better for getting hardware information, Interop or Object management?
Posted

1 solution

There are no such alternatives. Not clear what do you mean by "Object management".

The problem is simple: some access to hardware information can be provided by .NET libraries, but a lot more is only accessible through a the native OS. Essentially, nearly everything is accessible via Interop (P/Invoke), only a part of it is bundled with .NET Framework and placed in GAC (Global Assembly Cache) and some you have to do by yourself.

See:
http://en.wikipedia.org/wiki/P/Invoke[^],
http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx[^].

Another thing you need to know is WMI and Hardware Inventory:
http://en.wikipedia.org/wiki/Windows_Management_Instrumentation[^],
http://msdn.microsoft.com/en-us/library/system.management.aspx[^],
http://technet.microsoft.com/en-us/library/cc180952.aspx[^].

See also this CodeProject article: WMI Hardware/Software Enumeration Script[^].

The rest of it depends on what hardware are you interested in and what kind of information do you need.

—SA
 
Share this answer
 
v2
Comments
DaveyM69 22-Nov-11 15:27pm    
Fixed a minor typo ;-)
Sergey Alexandrovich Kryukov 22-Nov-11 15:54pm    
Thank you, Davey.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900