JNA API 4.0.0

com.sun.jna.platform.win32.COM
Class COMObject

java.lang.Object
  extended by com.sun.jna.platform.win32.COM.COMObject

public class COMObject
extends Object

Helper class to provide basic COM support.

Author:
Tobias Wolf, wolf.tobias@gmx.net

Field Summary
protected  IDispatch iDispatch
           
protected  IUnknown iUnknown
           
static WinDef.LCID LOCALE_SYSTEM_DEFAULT
           
static WinDef.LCID LOCALE_USER_DEFAULT
           
 
Constructor Summary
COMObject(IDispatch iDispatch)
           
COMObject(String progId, boolean useActiveInstance)
          Instantiates a new cOM object.
 
Method Summary
protected  void checkFailed(WinNT.HRESULT hr)
           
 IDispatch getIDispatch()
           
 PointerByReference getIDispatchPointer()
           
 IUnknown getIUnknown()
           
 PointerByReference getIUnknownPointer()
           
protected  WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, String name)
           
protected  WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, String name, Variant.VARIANT pArg)
           
protected  WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, String name, Variant.VARIANT[] pArgs)
           
 void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALE_USER_DEFAULT

public static final WinDef.LCID LOCALE_USER_DEFAULT

LOCALE_SYSTEM_DEFAULT

public static final WinDef.LCID LOCALE_SYSTEM_DEFAULT

iUnknown

protected IUnknown iUnknown

iDispatch

protected IDispatch iDispatch
Constructor Detail

COMObject

public COMObject(IDispatch iDispatch)

COMObject

public COMObject(String progId,
                 boolean useActiveInstance)
          throws COMException
Instantiates a new cOM object.

Parameters:
progId - the prog id
useActiveInstance - the use active instance
Throws:
COMException - the automation exception
Method Detail

oleMethod

protected WinNT.HRESULT oleMethod(int nType,
                                  Variant.VARIANT.ByReference pvResult,
                                  IDispatch pDisp,
                                  String name,
                                  Variant.VARIANT[] pArgs)
                           throws COMException
Throws:
COMException

oleMethod

protected WinNT.HRESULT oleMethod(int nType,
                                  Variant.VARIANT.ByReference pvResult,
                                  IDispatch pDisp,
                                  String name,
                                  Variant.VARIANT pArg)
                           throws COMException
Throws:
COMException

oleMethod

protected WinNT.HRESULT oleMethod(int nType,
                                  Variant.VARIANT.ByReference pvResult,
                                  IDispatch pDisp,
                                  String name)
                           throws COMException
Throws:
COMException

checkFailed

protected void checkFailed(WinNT.HRESULT hr)

getIDispatch

public IDispatch getIDispatch()

getIDispatchPointer

public PointerByReference getIDispatchPointer()

getIUnknown

public IUnknown getIUnknown()

getIUnknownPointer

public PointerByReference getIUnknownPointer()

release

public void release()

JNA API 4.0.0

Copyright © 2007-2013 Timothy Wall. All Rights Reserved.