Dispatch members in $comval() - 14/12/17 05:38 PM
I've spent the last few hours digging and can't seem to find a way to reference non-primitive members in a returned enumerate. It'd be super helpful if $comval() allowed dispatching/creating references to Individual items in the enumerate:
For a use case of where this is needed:
Code:
$comval(com, 1, dispatch* dispatchedEnumItem)
For a use case of where this is needed:
Code:
alias myips { var %err .comopen loc WbemScripting.SWbemLocator if ($comerr) { %err = Failed to create SWbemLocator } elseif (!$com(loc, ConnectServer, 3, dispatch* ser)) && ($comerr) { %err = Failed to retrieve connected server } ;; Results in an Enumerate being dispatched ;; Enumerate contains: https://msdn.microsoft.com/en-us/library/aa394217(v=vs.85).aspx elseif (!$com(ser, ExecQuery, 3, bstr, Select * from Win32_NetworkAdapterConfiguration WHERE IPEnabled = "True", dispatch* res)) && ($comerr) { %err = Failed to retrieve network adapters } else { ;; mIRC returns nothing when referencing the IPAddress property because its a non-primitive(array) echo -a $comval(res, 1, IPAddress) } :error if ($error || %err) { echo -a /myips: $v1 reseterror } .comclose %lst .comclose %ser .comclose %loc }