using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Management; using System.Collections.Generic; using System.Management; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\WMI", "SELECT * FROM MSStorageDriver_ATAPISmartData"); //here ManagementObjectSearcher not found foreach (ManagementObject queryObj in searcher.Get()) { if (queryObj["VendorSpecific"] != null) { byte[] arrVendorSpecific = (byte[])(queryObj["VendorSpecific"]); string temp = arrVendorSpecific[115].ToString(); } } } catch (Exception) { throw; } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)