Well, you can use PInvoke and call the kernel32.dll libraries. For example,
to get the hard disk information, you could use GetVolumeInformation. Take a
look at this site for an example (it's in italian, but the C# code is
written in english):
While this is a good suggestion, it might be easier to just use the
classes in the System.Management namespace to access this information. They
provide an abstract for a good amount of information on the machine, and
would reduce the need for a number of disparate P/Invoke calls.