为什么程序中使用GetObject函数得不到数据
程序段:Private Sub cmdGetMAC_Click()
Dim strmac As String
Dim objwmiservice As Object
Dim colitems As Object
Dim objitem As Object
Set objwmiservice = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!//" & "." & "/root/cimv2")
Set colitems = objwmiservice.execquery("select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objitem In colitems
strmac = objitem.macaddress
lstMAC.AddItem Replace(Trim(strmac), ":", "-")
Next
End Sub