Tabnine Logo
org.jinterop.dcom.core
Code IndexAdd Tabnine to your IDE (free)

How to use org.jinterop.dcom.core

Best Java code snippets using org.jinterop.dcom.core (Showing top 20 results out of 315)

origin: stackoverflow.com

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 );
origin: org.kohsuke.jinterop/j-interop

/**Retrieves the contained object as <code>String</code>.
 *
 * @return
 * @throws JIException
 */
public String getObjectAsString2() throws JIException
{
  checkValidity();
  return  ((VariantBody)member.getReferent()).getObjectAsString().getString();
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

@Override
public IJIComObject queryInterface ( final String iid ) throws JIException
{
  checkLocal ();
  return this.session.getStub ().getInterface ( iid, this.ptr.getIPID () );
}
origin: org.kohsuke.jinterop/j-interop

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
}
origin: org.kohsuke.jinterop/j-interop

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);
}
origin: org.jinterop/j-interop

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);
}
origin: org.kohsuke.jinterop/j-interop

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);
}
origin: org.kohsuke.jinterop/j-interop

/**
 * <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;
}
origin: org.kohsuke.jinterop/j-interop

/** Returns the contained object.
 *
 * @return
 * @throws JIException
 */
public Object getObject() throws JIException
{
  checkValidity();
  return ((VariantBody)member.getReferent()).getObject();
}
origin: org.kohsuke.jinterop/j-interop

/**Retrieves the contained object as <code>int</code>.
 *
 * @return
 * @throws JIException
 */
public int getObjectAsInt() throws JIException
{
  checkValidity();
  return ((VariantBody)member.getReferent()).getObjectAsInt();
}
origin: org.kohsuke.jinterop/j-interop

/**Retrieves the contained object as <code>boolean</code>.
 *
 * @return
 * @throws JIException
 */
public boolean getObjectAsBoolean() throws JIException
{
  checkValidity();
  return ((VariantBody)member.getReferent()).getObjectAsBoolean();
}
origin: org.kohsuke.jinterop/j-interop

/**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();
}
origin: org.jinterop/j-interop

/**Retrieves the contained object as <code>short</code>.
 * 
 * @return
 * @throws JIException 
 */
public short getObjectAsShort() throws JIException
{
  checkValidity();
  return ((VariantBody)member.getReferent()).getObjectAsShort();
}
 
origin: org.jinterop/j-interop

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);
}
origin: org.openscada.jinterop/org.openscada.jinterop.core

/**
 * Retrieves the contained object as <code>String</code>.
 * 
 * @return
 * @throws JIException
 */
public String getObjectAsString2 () throws JIException
{
  checkValidity ();
  return ( (VariantBody)this.member.getReferent () ).getObjectAsString ().getString ();
}
origin: org.jinterop/j-interop

public IJIComObject queryInterface(String iid) throws JIException 
{
  checkLocal();
  return session.getStub().getInterface(iid,ptr.getIPID());
}
 
origin: org.kohsuke.jinterop/j-interop

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);
}
origin: org.jinterop/j-interop

/**Retrieves the contained object as <code>String</code>.
 * 
 * @return
 * @throws JIException
 */
public String getObjectAsString2() throws JIException
{
  checkValidity();
  return  ((VariantBody)member.getReferent()).getObjectAsString().getString();
}
 
origin: org.kohsuke.jinterop/j-interop

public IJIComObject queryInterface(String iid) throws JIException 
{
  checkLocal();
  return session.getStub().getInterface(iid,ptr.getIPID());
}
 
origin: org.jinterop/j-interop

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);
}
org.jinterop.dcom.core

Most used classes

  • JIString
    Class representing a COM string. The Wide Char (LPWSTR) and the BSTR are both encoded by the server
  • JIVariant
    Class representing the VARIANT datatype. Please use the byRef flag based constructors for by refe
  • IJIComObject
    Represents a Windows COM Object. Instances of this interface can be retrieved by the following ways
  • JIArray
    Represents a C++ array which can display both conformant and standard behaviors. Since this class fo
  • JIComServer
    Startup class representing a COM Server. Sample Usage :- JISession session = JISession.createSession
  • JIClsid,
  • JIProgId,
  • JICallBuilder,
  • JICurrency,
  • JIFrameworkHelper,
  • JILocalCoClass,
  • JILocalInterfaceDefinition,
  • JILocalMethodDescriptor,
  • JILocalParamsDescriptor,
  • JIPointer,
  • JIStruct,
  • JIComObjectImpl,
  • JIComObjectImplWrapper,
  • JIComOxidDetails
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now