Skip navigation links
JNA API 4.2.0
com.sun.jna.platform.win32.COM.util

Class Factory



  • public class Factory
    extends Object
    • Constructor Detail

      • Factory

        public Factory()
        Creates a utility COM Factory and a ComThread on which all COM calls are executed. NOTE: Remember to call factory.getComThread().terminate() at some appropriate point.
      • Factory

        public Factory(ComThread comThread)
    • Method Detail

      • getComThread

        public ComThread getComThread()
      • getRunningObjectTable

        public IRunningObjectTable getRunningObjectTable()
        CoInitialize must be called be fore this method. Either explicitly or implicitly via other methods.
        Returns:
        running object table
      • createProxy

        public <T> T createProxy(Class<T> comInterface,
                                 IDispatch dispatch)
        Creates a ProxyObject for the given interface and IDispatch pointer.
      • createProxy

        <T> T createProxy(Class<T> comInterface,
                          long unknownId,
                          IDispatch dispatch)
        only for use when creating ProxyObjects from Callbacks
        Parameters:
        comInterface -
        unknownId -
        dispatch -
        Returns:
        proxy object
      • createObject

        public <T> T createObject(Class<T> comInterface)
        Creates a new COM object (CoCreateInstance) for the given progId and returns a ProxyObject for the given interface.
      • fetchObject

        public <T> T fetchObject(Class<T> comInterface)
        Gets and existing COM object (GetActiveObject) for the given progId and returns a ProxyObject for the given interface.
      • register

        public void register(ProxyObject proxyObject)
      • unregister

        public void unregister(ProxyObject proxyObject,
                               int d)
      • disposeAll

        public void disposeAll()
JNA API 4.2.0

Copyright © 2007-2015 Timothy Wall. All Rights Reserved.