<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 9: Use of IEnumVARIANT</title><link>https://sourceforge.net/p/jcom/support-requests/9/</link><description>Recent changes to 9: Use of IEnumVARIANT</description><atom:link href="https://sourceforge.net/p/jcom/support-requests/9/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 06 Apr 2006 07:22:10 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/jcom/support-requests/9/feed.rss" rel="self" type="application/rss+xml"/><item><title>Use of IEnumVARIANT</title><link>https://sourceforge.net/p/jcom/support-requests/9/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br /&gt;
I'm new in java com. I need some help on collecting&lt;br /&gt;
collection of data from wmi dispatch. I can request the&lt;br /&gt;
wmi class, but I don't understand how to implement&lt;br /&gt;
IEnumVARIANT to get them. Thanks for your help. &lt;br /&gt;
Here is how I request wmi com object : &lt;br /&gt;
ReleaseManager rm = new ReleaseManager();&lt;br /&gt;
IDispatch wmiApp = new IDispatch(rm,&lt;br /&gt;
"WbemScripting.SWbemLocator"); &lt;br /&gt;
Object[] argConnect = new Object[2];&lt;br /&gt;
argConnect[0] = new String("127.0.0.1");&lt;br /&gt;
argConnect[1] = new String("Root\\CIMv2");&lt;br /&gt;
IDispatch wmiServices =&lt;br /&gt;
(IDispatch)wmiApp.method("ConnectServer",argConnect);&lt;br /&gt;
Object[] arglist1 = new Object[1];&lt;br /&gt;
arglist1[0] = new String("Win32_BIOS");&lt;br /&gt;
IDispatch wmiInstances = (IDispatch)&lt;br /&gt;
wmiServices.method("InstancesOf", arglist1); &lt;/p&gt;
&lt;p&gt;And now, how can I get the collection? &lt;br /&gt;
IEnumVARIANT resultsNum=&lt;br /&gt;
(IEnumVARIANT)wmiInstances.get("_newenum");? &lt;br /&gt;
I got the error : &lt;br /&gt;
java.lang.ClassCastException &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">marcow68</dc:creator><pubDate>Thu, 06 Apr 2006 07:22:10 -0000</pubDate><guid>https://sourceforge.netd8b288907a4c8bd215ebcbac83cb5fe21c060645</guid></item></channel></rss>