public class CallbackProxy extends java.lang.Object implements IDispatchCallback
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Class<?> |
comEventCallbackInterface |
(package private) IComEventCallbackListener |
comEventCallbackListener |
DispatchListener |
dispatchListener |
(package private) java.util.Map<OaIdl.DISPID,java.lang.reflect.Method> |
dsipIdMap |
(package private) ObjectFactory |
factory |
(package private) Guid.REFIID |
listenedToRiid |
IID_IDISPATCH
IID_IUNKNOWN
Constructor and Description |
---|
CallbackProxy(ObjectFactory factory,
java.lang.Class<?> comEventCallbackInterface,
IComEventCallbackListener comEventCallbackListener) |
Modifier and Type | Method and Description |
---|---|
int |
AddRef() |
(package private) java.util.Map<OaIdl.DISPID,java.lang.reflect.Method> |
createDispIdMap(java.lang.Class<?> comEventCallbackInterface) |
(package private) Guid.REFIID |
createRIID(java.lang.Class<?> comEventCallbackInterface) |
(package private) int |
fetchDispIdFromName(ComEventCallback annotation) |
WinNT.HRESULT |
GetIDsOfNames(Guid.REFIID riid,
WString[] rgszNames,
int cNames,
WinDef.LCID lcid,
OaIdl.DISPIDByReference rgDispId)
Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used
on subsequent calls to Invoke.
|
Pointer |
getPointer() |
WinNT.HRESULT |
GetTypeInfo(WinDef.UINT iTInfo,
WinDef.LCID lcid,
PointerByReference ppTInfo)
Retrieves the type information for an object, which can then be used to get the type information for an interface.
|
WinNT.HRESULT |
GetTypeInfoCount(WinDef.UINTByReference pctinfo)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).
|
WinNT.HRESULT |
Invoke(OaIdl.DISPID dispIdMember,
Guid.REFIID riid,
WinDef.LCID lcid,
WinDef.WORD wFlags,
OleAuto.DISPPARAMS.ByReference pDispParams,
Variant.VARIANT.ByReference pVarResult,
OaIdl.EXCEPINFO.ByReference pExcepInfo,
IntByReference puArgErr)
Provides access to properties and methods exposed by an object.
|
(package private) void |
invokeOnThread(OaIdl.DISPID dispIdMember,
Guid.REFIID riid,
WinDef.LCID lcid,
WinDef.WORD wFlags,
OleAuto.DISPPARAMS.ByReference pDispParams) |
WinNT.HRESULT |
QueryInterface(Guid.REFIID refid,
PointerByReference ppvObject) |
int |
Release() |
ObjectFactory factory
java.lang.Class<?> comEventCallbackInterface
IComEventCallbackListener comEventCallbackListener
Guid.REFIID listenedToRiid
public DispatchListener dispatchListener
java.util.Map<OaIdl.DISPID,java.lang.reflect.Method> dsipIdMap
public CallbackProxy(ObjectFactory factory, java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener)
Guid.REFIID createRIID(java.lang.Class<?> comEventCallbackInterface)
java.util.Map<OaIdl.DISPID,java.lang.reflect.Method> createDispIdMap(java.lang.Class<?> comEventCallbackInterface)
int fetchDispIdFromName(ComEventCallback annotation)
void invokeOnThread(OaIdl.DISPID dispIdMember, Guid.REFIID riid, WinDef.LCID lcid, WinDef.WORD wFlags, OleAuto.DISPPARAMS.ByReference pDispParams)
public Pointer getPointer()
getPointer
in interface IUnknownCallback
public WinNT.HRESULT GetTypeInfoCount(WinDef.UINTByReference pctinfo)
IDispatch
GetTypeInfoCount
in interface IDispatch
pctinfo
- The number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0.public WinNT.HRESULT GetTypeInfo(WinDef.UINT iTInfo, WinDef.LCID lcid, PointerByReference ppTInfo)
IDispatch
GetTypeInfo
in interface IDispatch
iTInfo
- The type information to return. Pass 0 to retrieve type information for the IDispatch implementation.lcid
- The locale identifier for the type information.
An object may be able to return different type information for different languages. This is important
for classes that support localized member names. For classes that do not support localized member names,
this parameter can be ignored.ppTInfo
- The requested type information object.public WinNT.HRESULT GetIDsOfNames(Guid.REFIID riid, WString[] rgszNames, int cNames, WinDef.LCID lcid, OaIdl.DISPIDByReference rgDispId)
IDispatch
GetIDsOfNames
in interface IDispatch
riid
- Reserved for future use. Must be IID_NULL.rgszNames
- The array of names to be mapped.cNames
- The count of the names to be mapped.lcid
- The locale context in which to interpret the names.rgDispId
- Caller-allocated array, each element of which contains an identifier (ID) corresponding to one of the names passed in
the rgszNames array. The first element represents the member name. The subsequent elements represent each of the member's parameters.public WinNT.HRESULT Invoke(OaIdl.DISPID dispIdMember, Guid.REFIID riid, WinDef.LCID lcid, WinDef.WORD wFlags, OleAuto.DISPPARAMS.ByReference pDispParams, Variant.VARIANT.ByReference pVarResult, OaIdl.EXCEPINFO.ByReference pExcepInfo, IntByReference puArgErr)
IDispatch
Invoke
in interface IDispatch
dispIdMember
- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier.riid
- Reserved for future use. Must be IID_NULL.lcid
- The locale context in which to interpret arguments. The lcid is used by the GetIDsOfNames function, and is also
passed to Invoke to allow the object to interpret its arguments specific to a locale.
Applications that do not support multiple national languages can ignore this parameter. For more information,
refer to Supporting Multiple National Languages and Exposing ActiveX Objects.wFlags
- Flags describing the context of the Invoke call.
DISPATCH_METHOD
The member is invoked as a method. If a property has the same name, both this and the DISPATCH_PROPERTYGET flag can be set.
DISPATCH_PROPERTYGET
The member is retrieved as a property or data member.
DISPATCH_PROPERTYPUT
The member is changed as a property or data member.
DISPATCH_PROPERTYPUTREF
The member is changed by a reference assignment, rather than a value assignment. This flag is valid only when the property accepts a reference to an object.pDispParams
- Pointer to a DISPPARAMS structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.pVarResult
- Pointer to the location where the result is to be stored, or NULL if the caller expects no result. This argument is ignored if DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF is specified.pExcepInfo
- Pointer to a structure that contains exception information. This structure should be filled in if DISP_E_EXCEPTION is returned. Can be NULL.puArgErr
- The index within rgvarg of the first argument that has an error. Arguments are stored in pDispParams->rgvarg in reverse order,
so the first argument is the one with the highest index in the array. This parameter is returned only when the resulting return
value is DISP_E_TYPEMISMATCH or DISP_E_PARAMNOTFOUND. This argument can be set to null. For details, see Returning Errors.public WinNT.HRESULT QueryInterface(Guid.REFIID refid, PointerByReference ppvObject)
QueryInterface
in interface IUnknown