Dim process = GetObject("winmgmts://./root/novadigm:NVD_Agent") Dim method = process.Methods_("GetValue") Dim inParameters = method.inParameters.SpawnInstance_() inParameters.Path = strObject Dim outParameters = process.ExecMethod_("NumberOfInstances", inParameters) Dim StrHeaps = (outParameters.InstanceCount) num_TextBox.Text = StrHeaps For i = 0 To StrHeaps Step +1 inParameters.Index = i inParameters.Property = "ZOBJNAME" outParameters = process.ExecMethod_("GetValue", inParameters) Dim Value1 As String = outParameters.Value inParameters.Property = "ZAVIS" outParameters = process.ExecMethod_("GetValue", inParameters) Dim Value2 As String = outParameters.Value inParameters.Property = "NAME" outParameters = process.ExecMethod_("GetValue", inParameters) Dim Value3 As String = outParameters.Value inParameters.Property = "#" outParameters = process.ExecMethod_("GetValue", inParameters) Dim Value4 As String = outParameters.Value Dim item1 As New ListViewItem(0) item1.SubItems.Add(Value1) item1.SubItems.Add(Value2) item1.SubItems.Add(Value3) ListView1.Items.Add(item1) ListView1.FullRowSelect = True Next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)