code_junkie

Windows Low Level Disk Question

Nov 10th, 2011
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. using( ManagementClass driveClass = new ManagementClass( "Win32_DiskDrive" ) )
  2. {
  3. using( ManagementObjectCollection physicalDrives = driveClass.GetInstances( ) )
  4. {
  5. foreach( ManagementObject drive in physicalDrives )
  6. {
  7. string cylinders = ( string )drive["TotalCylinders"];
  8. // ... etc ...
  9. drive.Dispose( );
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment