return (IJIDispatch) JIObjectFactory.narrowObject( wbemLocatorComObj.createInstance().queryInterface( IJIDispatch.IID ) ); return (IJIDispatch) JIObjectFactory.narrowObject( comObjectAsVariant.getObjectAsComObject() ); wbemLocator.callMethodA( "ConnectServer", new Object[] { new JIString( host ), new JIString( WMI_DEFAULT_NAMESPACE ), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), new Integer( 0 ), JIVariant.OPTIONAL_PARAM() } ); wbemServices.callMethodA( "ExecNotificationQuery", new Object[] { new JIString( QUERY_FOR_ALL_LOG_EVENTS ), new JIString( "WQL" ), new JIVariant( new Integer( RETURN_IMMEDIATE + FORWARD_ONLY ) ) } ); IJIDispatch wbemEventSource = (IJIDispatch) JIObjectFactory.narrowObject( ( eventSourceSet[ 0 ] ).getObjectAsComObject() ); String asText = objTextAsVariant.getObjectAsString().getString(); System.out.println( asText );
/**Retrieves the contained object as <code>String</code>. * * @return * @throws JIException */ public String getObjectAsString2() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsString().getString(); }
@Override public IJIComObject queryInterface ( final String iid ) throws JIException { checkLocal (); return this.session.getStub ().getInterface ( iid, this.ptr.getIPID () ); }
public SampleTestServer(String address, String[] args) throws JIException, UnknownHostException { this.address = address; session = JISession.createSession(args[1], args[2], args[3]); comStub = new JIComServer(JIProgId.valueOf("SampleTestServer.TestServer"), address, session); IJIComObject unknown = comStub.createInstance(); comObject = (IJIComObject) unknown.queryInterface("1F438B1C-02BA-462E-A971-8E0640C141E5"); //ITestServer }
public MSExcel(String address,String[] args) throws JIException, UnknownHostException { session = JISession.createSession(args[1],args[2],args[3]); comServer = new JIComServer(JIProgId.valueOf("Excel.Application"),address,session); }
public MSExcel2_Test(String address, String[] args) throws JIException, UnknownHostException { session = JISession.createSession(args[1],args[2],args[3]); session.useSessionSecurity(true); comServer = new JIComServer(JIProgId.valueOf("Excel.Application"),address,session); }
public MSPowerPoint(String address, String[] args) throws JIException, UnknownHostException { JISession session = JISession.createSession(args[1],args[2],args[3]); comStub = new JIComServer(JIClsid.valueOf("91493441-5A91-11CF-8700-00AA0060263B"),address,session); }
/** * <code>VARIANT</code> for <code>([out] IDispatch*)</code>. This is not Thread Safe , hence a new instance must be taken each time. * <br/>Note that this must also be used when the interface pointer is a subclass of <code>IDispatch</code> i.e. supports automation (or is a * <code>dispinterface</code>). */ public static JIVariant OUT_IDISPATCH() { JIVariant retval = new JIVariant(new JIComObjectImpl(null, new JIInterfacePointer(null,-1,null)),true); retval.setFlag(JIFlags.FLAG_REPRESENTATION_IDISPATCH_NULL_FOR_OUT | JIFlags.FLAG_REPRESENTATION_SET_JIINTERFACEPTR_NULL_FOR_VARIANT); return retval; }
/** Returns the contained object. * * @return * @throws JIException */ public Object getObject() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObject(); }
/**Retrieves the contained object as <code>int</code>. * * @return * @throws JIException */ public int getObjectAsInt() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsInt(); }
/**Retrieves the contained object as <code>boolean</code>. * * @return * @throws JIException */ public boolean getObjectAsBoolean() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsBoolean(); }
/**Retrieves the contained object as <code>IJIComObject</code>. Return value must be "narrowed" to get the expected type. * <p>for example :- If expected type is an <code>IJIDispatch</code>, * then the return value must pass through <code>JIObjectFactory.narrowInstance(IJIComObject)</code> to get to the right type. * * @return * @throws JIException */ public IJIComObject getObjectAsComObject() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsComObject(); }
/**Retrieves the contained object as <code>short</code>. * * @return * @throws JIException */ public short getObjectAsShort() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsShort(); }
public MSPowerPoint2(String address, String[] args) throws JIException, UnknownHostException { JISession session = JISession.createSession(args[1],args[2],args[3]); comStub = new JIComServer(JIProgId.valueOf("PowerPoint.Application"),address,session); }
/** * Retrieves the contained object as <code>String</code>. * * @return * @throws JIException */ public String getObjectAsString2 () throws JIException { checkValidity (); return ( (VariantBody)this.member.getReferent () ).getObjectAsString ().getString (); }
public IJIComObject queryInterface(String iid) throws JIException { checkLocal(); return session.getStub().getInterface(iid,ptr.getIPID()); }
public MSADO(String address, String[] args) throws JIException, UnknownHostException { session = JISession.createSession(args[1],args[2],args[3]); comServer = new JIComServer(JIProgId.valueOf("ADODB.Connection"),address,session); }
/**Retrieves the contained object as <code>String</code>. * * @return * @throws JIException */ public String getObjectAsString2() throws JIException { checkValidity(); return ((VariantBody)member.getReferent()).getObjectAsString().getString(); }
public IJIComObject queryInterface(String iid) throws JIException { checkLocal(); return session.getStub().getInterface(iid,ptr.getIPID()); }
public MSTypeLibraryBrowser(String address, String args[]) throws JIException, UnknownHostException { JISession session = JISession.createSession(args[1],args[2],args[3]); comServer = new JIComServer(JIProgId.valueOf("InternetExplorer.Application"),address,session); }