wbemListInstanceNames

wbemListInstanceNames(className:     String;
                      instNameArray: HugeStringArray input);

The wbemListInstanceNames method of the Node class retrieves the names of all instances of the Web-Based Enterprise Management (WBEM) class specified by the className parameter for the host machine in which the node of the receiver object is running.

The class name must be a fully qualified WBEM class name. The instance names are inserted as strings into the HugeStringArray specified by the instNameArray parameter. This method always empties the array before inserting the instance names. The caller is responsible for creating and deleting this array.

JADE allows only a subset of the available WBEM classes to be used. The allowed classes are those relating to cache, memory, system, processor, server, disk, and network interface information. You can use the Node class wbemListClasses method to retrieve the fully qualified WBEM class names that can be used.

An exception is raised if a name that is not allowed or recognized is used.

The following example shows the use of the wbemListInstanceNames method.

showWbemInstances();
vars
    hsa : HugeStringArray;
    cls : String;
    inst : String;
begin
    create hsa transient;
    node.wbemListClasses(hsa);
    if hsa.size > 0 then
        cls := hsa[1];
        hsa.purge;
        write "WBEM class : " & cls;
        node.wbemListInstanceNames(cls, hsa);
        foreach inst in hsa do
            write "Instance : " & inst;
        endforeach;
    endif;
epilog
    delete hsa;
end;

The output from the wbemListInstanceNames method shown in the previous example is as follows.

WBEM class : Root.CIMV2.CIM_StatisticalInformation.Win32_Perf.Win32_PerfRawData.Win32_PerfRawData_PerfDisk_LogicalDisk
Instance : C:
Instance : E:
Instance : _Total