Top Description Inners Fields Constructors Methods
com.sun.jna.platform.win32.COM

public abstract Class COMUtils

extends Object
Class Inheritance
Imports
com.sun.jna.LastErrorException, .Native, .Pointer, java.util.ArrayList, com.sun.jna.platform.win32.Advapi32, .Advapi32Util, .Advapi32Util.EnumKey, .Advapi32Util.InfoKey, .Kernel32Util, .OaIdl.EXCEPINFO, .Ole32, .OleAuto, .W32Errors, .WinNT, .WinNT.HRESULT, .WinReg, .WinReg.HKEYByReference, com.sun.jna.ptr.IntByReference

The Class COMUtils.
Author
[email protected] The Class COMUtils.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
COMUtils.COMInfo

The Class COMInfo.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
S_OK

The Constant CO_E_NOTINITIALIZED.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
checkRC(WinNT.HRESULT
the hr
hr
)

Throw new exception.

public static void
checkRC(WinNT.HRESULT
the hr
hr
,
OaIdl.EXCEPINFO
the excep info, it is expected
pExcepInfo
,
IntByReference
the pu arg err
puArgErr
)

Check status of HRESULT if it indicates a failed call a COMInvokeException is reaised.

public static boolean

Returns:

whether COM has been initialized
comIsInitialized
()

Check if COM was initialized correctly.

public static boolean

Returns:

true, if successful
FAILED
(WinNT.HRESULT
the hr
hr
)

Failed.

public static boolean

Returns:

true, if successful
FAILED
(int
the hr
hr
)

Failed.

public static ArrayList<COMUtils.COMInfo>

Returns:

the all com info on system
getAllCOMInfoOnSystem
()

Gets the all com info on system.

public static boolean

Returns:

true, if successful
SUCCEEDED
(WinNT.HRESULT
the hr
hr
)

Succeeded.

public static boolean

Returns:

true, if successful
SUCCEEDED
(int
the hr
hr
)

Succeeded.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

E_UNEXPECTEDback to summary
public static final int E_UNEXPECTED
S_FALSEback to summary
public static final int S_FALSE
S_OKback to summary
public static final int S_OK

The Constant CO_E_NOTINITIALIZED.

Constructor Detail

COMUtilsback to summary
public COMUtils()

Method Detail

checkRCback to summary
public static void checkRC(WinNT.HRESULT hr)

Throw new exception.

Parameters
hr:WinNT.HRESULT

the hr

checkRCback to summary
public 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.

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:WinNT.HRESULT

the hr

pExcepInfo:OaIdl.EXCEPINFO

the excep info, it is expected

puArgErr:IntByReference

the pu arg err

comIsInitializedback to summary
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:boolean

whether COM has been initialized

FAILEDback to summary
public static boolean FAILED(WinNT.HRESULT hr)

Failed.

Parameters
hr:WinNT.HRESULT

the hr

Returns:boolean

true, if successful

FAILEDback to summary
public static boolean FAILED(int hr)

Failed.

Parameters
hr:int

the hr

Returns:boolean

true, if successful

getAllCOMInfoOnSystemback to summary
public static ArrayList<COMUtils.COMInfo> getAllCOMInfoOnSystem()

Gets the all com info on system.

Returns:ArrayList<COMUtils.COMInfo>

the all com info on system

SUCCEEDEDback to summary
public static boolean SUCCEEDED(WinNT.HRESULT hr)

Succeeded.

Parameters
hr:WinNT.HRESULT

the hr

Returns:boolean

true, if successful

SUCCEEDEDback to summary
public static boolean SUCCEEDED(int hr)

Succeeded.

Parameters
hr:int

the hr

Returns:boolean

true, if successful

com.sun.jna.platform.win32.COM back to summary

public Class COMUtils.COMInfo

extends Object
Class Inheritance

The Class COMInfo.
Author
[email protected] The Class COMInfo.

Field Summary

Modifier and TypeField and Description
public String
clsid

The clsid.

public String
inprocHandler32

The inproc handler32.

public String
inprocServer32

The inproc server32.

public String
localServer32

The local server32.

public String
progID

The prog id.

public String
typeLib

The type lib.

Constructor Summary

AccessConstructor and Description
public
COMInfo()

Instantiates a new cOM info.

public
COMInfo(String
the clsid
clsid
)

Instantiates a new cOM info.

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clsidback to summary
public String clsid

The clsid.

inprocHandler32back to summary
public String inprocHandler32

The inproc handler32.

inprocServer32back to summary
public String inprocServer32

The inproc server32.

localServer32back to summary
public String localServer32

The local server32.

progIDback to summary
public String progID

The prog id.

typeLibback to summary
public String typeLib

The type lib.

Constructor Detail

COMInfoback to summary
public COMInfo()

Instantiates a new cOM info.

COMInfoback to summary
public COMInfo(String clsid)

Instantiates a new cOM info.

Parameters
clsid:String

the clsid