Package com.sun.jna.platform.win32.COM
Class COMUtils
java.lang.Object
com.sun.jna.platform.win32.COM.COMUtils
The Class COMUtils.
- Author:
- [email protected] The Class COMUtils.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
The Constant CO_E_NOTINITIALIZED. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Check if COM was initialized correctly.static boolean
FAILED
(int hr) Failed.static boolean
FAILED
(WinNT.HRESULT hr) Failed.static ArrayList<COMUtils.COMInfo>
Gets the all com info on system.static boolean
SUCCEEDED
(int hr) Succeeded.static boolean
Succeeded.
-
Field Details
-
S_OK
public static final int S_OKThe Constant CO_E_NOTINITIALIZED.- See Also:
-
S_FALSE
public static final int S_FALSE- See Also:
-
E_UNEXPECTED
public static final int E_UNEXPECTED- See Also:
-
-
Constructor Details
-
COMUtils
public COMUtils()
-
-
Method Details
-
SUCCEEDED
Succeeded.- Parameters:
hr
- the hr- Returns:
- true, if successful
-
SUCCEEDED
public static boolean SUCCEEDED(int hr) Succeeded.- Parameters:
hr
- the hr- Returns:
- true, if successful
-
FAILED
Failed.- Parameters:
hr
- the hr- Returns:
- true, if successful
-
FAILED
public static boolean FAILED(int hr) Failed.- Parameters:
hr
- the hr- Returns:
- true, if successful
-
checkRC
Throw new exception.- Parameters:
hr
- the hr
-
checkRC
Check status of HRESULT if it indicates a failed call a COMInvokeException is reaised.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.
- Parameters:
hr
- the hrpExcepInfo
- the excep info, it is expectedpuArgErr
- the pu arg err
-
getAllCOMInfoOnSystem
Gets the all com info on system.- Returns:
- the all com info on system
-
comIsInitialized
public static boolean comIsInitialized()Check if COM was initialized correctly. The initialization status is not changed!This is a debug function, not for normal usage!
- Returns:
- whether COM has been initialized
-