public class ComService extends Object
initialize()
should be called before using COM interface
and uninitialize()
should be called after the end of using
COM interface.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ComService() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int CLSCTX_INPROC_SERVER
public static final int CLSCTX_INPROC_HANDLER
public static final int CLSCTX_LOCAL_SERVER
public static final int CLSCTX_REMOTE_SERVER
public static final int CLSCTX_ALL
public static IUnknown newIUnknown(ResourceManager resourceManager, long ptr, boolean permanent)
resourceManager
- ptr
- permanent
- the resource is permanent or notpublic static IDispatch newIDispatch(ResourceManager resourceManager, long ptr, boolean permanent)
resourceManager
- ptr
- permanent
- the resource is permanent or notpublic static IAccessible newIAccessible(ResourceManager resourceManager, long ptr, boolean permanent)
resourceManager
- ptr
- permanent
- the resource is permanent or notpublic static IDispatch newIDispatch(IUnknown iunk)
iunk
- the target IUnknown objectpublic static IAccessible newIAccessible(IUnknown iunk)
iunk
- the target IUnknown objectpublic static void initialize()
public static void uninitialize()
public static IUnknown coCreateInstance(ResourceManager rm, String rclsid, int dwClsContext)
rm
- rclsid
- dwClsContext
-