Examples of JIString


Examples of org.jinterop.dcom.core.JIString

            throw new IllegalArgumentException("Property name is empty.");
        }
        if(flags != null && flags != 0) {
            throw new IllegalArgumentException("Flags must be zero.");
        }
        callMethod(null, "Remove", new JIString(name), JIVariant.OPTIONAL_PARAM());
    }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

            throw new IllegalArgumentException("Method name is empty.");
        }
        if(flags != null && flags != 0) {
            throw new IllegalArgumentException("Flags must be zero.");
        }
        return callMethod(SWbemMethod.class, "Item", new JIString(methodName), JIVariant.OPTIONAL_PARAM());
    }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

                    iFlags += flag.getValue();
                }
            }
        }
        return callMethod(SWbemObjectSet.class, "Associators_",
                (isEmpty(assocClass)) ? JIVariant.OPTIONAL_PARAM() : new JIString(assocClass),
                (isEmpty(resultClass)) ? JIVariant.OPTIONAL_PARAM() : new JIString(resultClass),
                (isEmpty(resultRole)) ? JIVariant.OPTIONAL_PARAM() : new JIString(resultRole),
                (isEmpty(role)) ? JIVariant.OPTIONAL_PARAM() : new JIString(role),
                (classesOnly == null) ? JIVariant.OPTIONAL_PARAM() : classesOnly,
                (schemaOnly == null) ? JIVariant.OPTIONAL_PARAM() : schemaOnly,
                (isEmpty(requiredAssocQualifier)) ? JIVariant.OPTIONAL_PARAM() : new JIString(requiredAssocQualifier),
                (isEmpty(requiredQualifier)) ? JIVariant.OPTIONAL_PARAM() : new JIString(requiredQualifier),
                (iFlags == null) ? JIVariant.OPTIONAL_PARAM() : iFlags,
                (objwbemNamedValueSet == null) ? JIVariant.OPTIONAL_PARAM() : objwbemNamedValueSet.getDispatch());
    }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

    public SWbemObject execMethod(String methodName, SWbemObject inParameters, Integer flags, SWbemNamedValueSet objWbemNamedValueSet) throws WMIException {
        if(isEmpty(methodName)) { throw new IllegalArgumentException("Method name is empty."); }
        if(flags != null && flags != 0) {
            throw new IllegalArgumentException("Flags must be zero.");
        }
        return callMethod(SWbemObject.class, "ExecMethod_", new JIString(methodName),
                (inParameters == null) ? JIVariant.OPTIONAL_PARAM() : inParameters.getDispatch(),
                JIVariant.OPTIONAL_PARAM(),
                (objWbemNamedValueSet == null) ? JIVariant.OPTIONAL_PARAM() : objWbemNamedValueSet.getDispatch());
    }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

                    iFlags += flag.getValue();
                }
            }
        }
        return callMethod(SWbemObjectSet.class, "ReferencesTo",
                (isEmpty(resultClass)) ? JIVariant.OPTIONAL_PARAM() : new JIString(resultClass),
                (isEmpty(role)) ? JIVariant.OPTIONAL_PARAM() : new JIString(role),
                (classesOnly == null) ? JIVariant.OPTIONAL_PARAM() : classesOnly,
                (schemaOnly == null) ? JIVariant.OPTIONAL_PARAM() : schemaOnly,
                (isEmpty(requiredQualifier)) ? JIVariant.OPTIONAL_PARAM() : new JIString(requiredQualifier),
                (iFlags == null) ? JIVariant.OPTIONAL_PARAM() : iFlags,
                (objWbemNamedValueSet == null) ? JIVariant.OPTIONAL_PARAM() : objWbemNamedValueSet.getDispatch());
    }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

            IJIComObject unknown = comStub.createInstance();
            IJIComObject comobject = unknown.queryInterface(IJIDispatch.IID);
            IJIDispatch shell = (IJIDispatch) JIObjectFactory.narrowObject(comobject);

            Object[] scriptArgs = new Object[]{
                new JIString("%comspec% /c " + cmd)
            };

            // ref: http://stackoverflow.com/questions/6781340/how-to-call-a-remote-bat-file-using-jinterop

            JIVariant results[] = shell.callMethodA("Exec", scriptArgs);
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

            JISystem.getLogger().setLevel(Level.INFO);
            JISystem.setInBuiltLogHandler(false);
            JISystem.setAutoRegisteration(true);

            crazyLongMicrosoftArgs = new Object[]{
                new JIString(bonafides.getHost()),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

    private void setCount() throws WindowsException {
        try {
            JIVariant[] results = dispatch.callMethodA("ConnectServer", crazyLongMicrosoftArgs);
            IJIDispatch wbemServices_dispatch = (IJIDispatch) JIObjectFactory.narrowObject((results[0]).getObjectAsComObject());
            JIVariant[] results2 = wbemServices_dispatch.callMethodA("InstancesOf", new Object[]{new JIString("Win32_Process"), new Integer(0), JIVariant.OPTIONAL_PARAM()});
            IJIDispatch wbemObjectSet_dispatch = (IJIDispatch) JIObjectFactory.narrowObject((results2[0]).getObjectAsComObject());
            variant = wbemObjectSet_dispatch.get("_NewEnum");
            JIVariant Count = wbemObjectSet_dispatch.get("Count");
            count = Count.getObjectAsInt();
        }
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

            IJIComObject unknown = comStub.createInstance();
            IJIComObject comobject = unknown.queryInterface(IJIDispatch.IID);
            IJIDispatch shell = (IJIDispatch) JIObjectFactory.narrowObject(comobject);

            Object[] scriptArgs = new Object[]{
                new JIString("%comspec% /c " + cmd)
            };

            // ref: http://stackoverflow.com/questions/6781340/how-to-call-a-remote-bat-file-using-jinterop

            JIVariant results[] = shell.callMethodA("Exec", scriptArgs);
View Full Code Here

Examples of org.jinterop.dcom.core.JIString

            JISystem.getLogger().setLevel(Level.INFO);
            JISystem.setInBuiltLogHandler(false);
            JISystem.setAutoRegisteration(true);

            crazyLongMicrosoftArgs = new Object[]{
                new JIString(bonafides.getHost()),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
                JIVariant.OPTIONAL_PARAM(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.