org.eclipse.actf.util.win32.comclutch
Class ComService

java.lang.Object
  extended by org.eclipse.actf.util.win32.comclutch.ComService

public class ComService
extends Object

ComService provides functions to make COM objects and interact with COM objects. initialize() should be called before using COM interface and uninitialize() should be called after the end of using COM interface.


Field Summary
static int CLSCTX_ALL
           
static int CLSCTX_INPROC_HANDLER
           
static int CLSCTX_INPROC_SERVER
           
static int CLSCTX_LOCAL_SERVER
           
static int CLSCTX_REMOTE_SERVER
           
 
Constructor Summary
ComService()
           
 
Method Summary
static IUnknown coCreateInstance(ResourceManager rm, String rclsid, int dwClsContext)
          It calls CoCreateInstance with the rclsid, (pUnkOuter = NULL), the dwClsContext, and (riid = IID_IUnknown).
static IDispatch createDispatch(String clsidFlash)
           
static void initialize()
          It should be call before using COM interface.
static IAccessible newIAccessible(IUnknown iunk)
          Change the wrapper of the object from IUnknown to IAccessible
static IAccessible newIAccessible(ResourceManager resourceManager, long ptr, boolean permanent)
          Create a wrapped IAccessible object from ptr using resourceManager The ptr should refers to an native IAccessible object.
static IDispatch newIDispatch(IUnknown iunk)
          Change the wrapper of the object from IUnknown to IDispatch
static IDispatch newIDispatch(ResourceManager resourceManager, long ptr, boolean permanent)
          Create a wrapped IDispatch object from ptr using resourceManager The ptr should refers to an native IDispatch object.
static IUnknown newIUnknown(ResourceManager resourceManager, long ptr, boolean permanent)
          Create a wrapped IUnknown object from ptr using resourceManager.
static void uninitialize()
          It should be call after the end of using COM interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLSCTX_INPROC_SERVER

public static final int CLSCTX_INPROC_SERVER
See Also:
Constant Field Values

CLSCTX_INPROC_HANDLER

public static final int CLSCTX_INPROC_HANDLER
See Also:
Constant Field Values

CLSCTX_LOCAL_SERVER

public static final int CLSCTX_LOCAL_SERVER
See Also:
Constant Field Values

CLSCTX_REMOTE_SERVER

public static final int CLSCTX_REMOTE_SERVER
See Also:
Constant Field Values

CLSCTX_ALL

public static final int CLSCTX_ALL
See Also:
Constant Field Values
Constructor Detail

ComService

public ComService()
Method Detail

newIUnknown

public static IUnknown newIUnknown(ResourceManager resourceManager,
                                   long ptr,
                                   boolean permanent)
Create a wrapped IUnknown object from ptr using resourceManager. The ptr should refers to an native IUnknown object.

Parameters:
resourceManager -
ptr -
permanent - the resource is permanent or not
Returns:
new IUnknown object

newIDispatch

public static IDispatch newIDispatch(ResourceManager resourceManager,
                                     long ptr,
                                     boolean permanent)
Create a wrapped IDispatch object from ptr using resourceManager The ptr should refers to an native IDispatch object.

Parameters:
resourceManager -
ptr -
permanent - the resource is permanent or not
Returns:
new IDispatch object

newIAccessible

public static IAccessible newIAccessible(ResourceManager resourceManager,
                                         long ptr,
                                         boolean permanent)
Create a wrapped IAccessible object from ptr using resourceManager The ptr should refers to an native IAccessible object.

Parameters:
resourceManager -
ptr -
permanent - the resource is permanent or not
Returns:
new IAccessible object

newIDispatch

public static IDispatch newIDispatch(IUnknown iunk)
Change the wrapper of the object from IUnknown to IDispatch

Parameters:
iunk - the target IUnknown object
Returns:
the re-wrapped IDispatch object

newIAccessible

public static IAccessible newIAccessible(IUnknown iunk)
Change the wrapper of the object from IUnknown to IAccessible

Parameters:
iunk - the target IUnknown object
Returns:
the re-wrapped IAccessible object

initialize

public static void initialize()
It should be call before using COM interface.


uninitialize

public static void uninitialize()
It should be call after the end of using COM interface.


coCreateInstance

public static IUnknown coCreateInstance(ResourceManager rm,
                                        String rclsid,
                                        int dwClsContext)
It calls CoCreateInstance with the rclsid, (pUnkOuter = NULL), the dwClsContext, and (riid = IID_IUnknown). And it create new wrapped IUnknown obejct with the ppv; see http://msdn.microsoft.com/en-us/library/ms686615.aspx

Parameters:
rm -
rclsid -
dwClsContext -
Returns:

createDispatch

public static IDispatch createDispatch(String clsidFlash)
Parameters:
clsidFlash -
Returns: