Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Network interface
#36
reviving this...


example using Win32_NetworkAdapterConfiguration

code used:

IDispatch wmi._getfile("winmgmts:")
IDispatch col = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True" @ wbemFlagReturnImmediately|wbemFlagForwardOnly)

IDispatch x
foreach x col
out "----"
VARIANT v=x.ArpAlwaysSourceRoute
out F"0x{v.vt}"
OutVariantType(v)


how to deal when :

1. variable is boolean like boolean ArpAlwaysSourceRoute

0x1
VARIANT type: VT_NULL
QM type:
note: means there is no data

does not work either with int (QM does not seems to hoeld a boolean type)

2.

IDispatch wmi._getfile("winmgmts:")
IDispatch col = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapter" @ wbemFlagReturnImmediately|wbemFlagForwardOnly)

IDispatch x
foreach x col
out "----"
VARIANT v=x.NetworkAddresses

0x1
VARIANT type: VT_NULL
QM type:
note: means there is no data

so how retreive data declared as string but neither str variable or variant v=NULL


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)