Hello,
I'm new in java com. I need some help on collecting
collection of data from wmi dispatch. I can request the
wmi class, but I don't understand how to implement
IEnumVARIANT to get them. Thanks for your help.
Here is how I request wmi com object :
ReleaseManager rm = new ReleaseManager();
IDispatch wmiApp = new IDispatch(rm,
"WbemScripting.SWbemLocator");
Object[] argConnect = new Object[2];
argConnect[0] = new String("127.0.0.1");
argConnect[1] = new String("Root\\CIMv2");
IDispatch wmiServices =
(IDispatch)wmiApp.method("ConnectServer",argConnect);
Object[] arglist1 = new Object[1];
arglist1[0] = new String("Win32_BIOS");
IDispatch wmiInstances = (IDispatch)
wmiServices.method("InstancesOf", arglist1);
And now, how can I get the collection?
IEnumVARIANT resultsNum=
(IEnumVARIANT)wmiInstances.get("_newenum");?
I got the error :
java.lang.ClassCastException
Logged In: NO
I am going to to look into it later this week.
Logged In: YES
user_id=1464085
Any update? Thanks. Marc
Logged In: YES
user_id=1464085
Were you able to have a look about my support request?
Thanks a lot.