public abstract class COMUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
COMUtils.COMInfo
The Class COMInfo.
|
Modifier and Type | Field and Description |
---|---|
static int |
E_UNEXPECTED |
static int |
S_FALSE |
static int |
S_OK
The Constant CO_E_NOTINITIALIZED.
|
Constructor and Description |
---|
COMUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkRC(WinNT.HRESULT hr)
Throw new exception.
|
static void |
checkRC(WinNT.HRESULT hr,
OaIdl.EXCEPINFO pExcepInfo,
IntByReference puArgErr)
Check status of HRESULT if it indicates a failed call a COMInvokeException
is reaised.
|
static boolean |
comIsInitialized()
Check if COM was initialized correctly.
|
static boolean |
FAILED(int hr)
Failed.
|
static boolean |
FAILED(WinNT.HRESULT hr)
Failed.
|
static java.util.ArrayList<COMUtils.COMInfo> |
getAllCOMInfoOnSystem()
Gets the all com info on system.
|
static boolean |
SUCCEEDED(int hr)
Succeeded.
|
static boolean |
SUCCEEDED(WinNT.HRESULT hr)
Succeeded.
|
public static final int S_OK
public static final int S_FALSE
public static final int E_UNEXPECTED
public static boolean SUCCEEDED(WinNT.HRESULT hr)
hr
- the hrpublic static boolean SUCCEEDED(int hr)
hr
- the hrpublic static boolean FAILED(WinNT.HRESULT hr)
hr
- the hrpublic static boolean FAILED(int hr)
hr
- the hrpublic static void checkRC(WinNT.HRESULT hr)
hr
- the hrpublic static void checkRC(WinNT.HRESULT hr, OaIdl.EXCEPINFO pExcepInfo, IntByReference puArgErr)
The string members of the pExcepInfo are freed in this call and can't be used afterwards. The structure is not freeed, as it is expected, that is allocated via the Memory object of JNA.
hr
- the hrpExcepInfo
- the excep info, it is expectedpuArgErr
- the pu arg errpublic static java.util.ArrayList<COMUtils.COMInfo> getAllCOMInfoOnSystem()
public static boolean comIsInitialized()
This is a debug function, not for normal usage!