public class ComOleHelper
extends java.lang.Object
ComOleOps
instead.Modifier and Type | Field and Description |
---|---|
private static boolean |
isSupported
Flag indicating if the current system has proper support for COM Automation.
|
Constructor and Description |
---|
ComOleHelper() |
Modifier and Type | Method and Description |
---|---|
static BaseDataType[][] |
call(long comId,
java.lang.String methodName,
ComParameter[] aParams)
Execute a COM object method call.
|
static long |
create(java.lang.String comObjectType,
boolean topLevel,
boolean noCreate)
Obtain a reference to an automation.
|
static void |
fire(java.lang.String callback,
BaseDataType[] params)
Fire a new COM event.
|
static java.lang.String |
getName(long comId)
Get the COM object name associated with the given COM object ID.
|
static BaseDataType |
getProperty(long comId,
java.lang.String prop)
Get the specified COM object property.
|
static boolean |
initComBridge()
Performs native initialization for COM Automation subsystem if underlying OS supports COM.
|
static boolean |
isSupported()
Gets COM Automation support level for particular OS.
|
static void |
release(long comId)
Release and destroy the COM object with the specified ID.
|
static boolean |
setProperty(long comId,
java.lang.String prop,
ComParameter val,
ComParameter[] indices)
Set the specified COM object property.
|
static boolean |
valid(long comId)
Reports if this object is valid for use.
|
private static final boolean isSupported
public static boolean initComBridge()
TRUE
in success,
FALSE
for Non-Windows or in case of setup failure.public static void release(long comId)
comId
- The COM object ID.public static long create(java.lang.String comObjectType, boolean topLevel, boolean noCreate)
comObjectType
- The name of the automation.topLevel
- Only return top-level. If the requested comObjectType
is not a top-level,
return null
.noCreate
- Must exist. Do not allow creation of new instances. Only used with topLevel
requests.0
if such automation does not exist
or it does not satisfy the parameter constraints.public static BaseDataType getProperty(long comId, java.lang.String prop)
comId
- The COM object ID.prop
- The COM property name to retrieve.BaseDataType
instance with the COM property's details.public static boolean setProperty(long comId, java.lang.String prop, ComParameter val, ComParameter[] indices)
comId
- The COM object ID.prop
- The COM property name to set.val
- The details about property's new value.indices
- A variable number of indices used to access this property's element.true
if the property was set successfully.public static BaseDataType[][] call(long comId, java.lang.String methodName, ComParameter[] aParams)
comId
- The COM object ID.methodName
- The COM method name to call.aParams
- An array with this call's arguments supplied to the COM object method call.public static java.lang.String getName(long comId)
comId
- The COM object ID.public static boolean valid(long comId)
comId
- The COM object ID.true
if we are valid (can be used).public static void fire(java.lang.String callback, BaseDataType[] params)
callback
- The callback procedure which needs to be executed.params
- The parameters to pass to the callback procedure.public static boolean isSupported()
TRUE
if COM objects are supported, FALSE
otherwise.