Feature #6661
OCX: Implement support for conversion of VARTYPE parameters and properties
0%
History
#1 Updated by Hynek Cihlar over 1 year ago
Implement conversion and runtime support for the polymorphic VARTYPE
data type used in OCX interfaces.
A possible approach (for a hypothetical method foo
declaring a VARTYPE parameter):
1. Identify all the concrete types foo
supports on runtime for the VARTYPE parameter.
2. Define number of foo
methods in the target Java legacy interface. One overload per concrete data type identified in previous step. If the concrete types are an int and a pointer then the overloads will be foo(integer)
and foo(handle)
.
3. The OCX conversion rules will try to match one of the declared methods depending on the argument type. If it finds a match, it will emit native Java method call, otherwise (when the argument is BaseDataType
for example) it will emit ComObject.call
.
To be resolved:
How to handle the cases when OCX method declares multiple (many) VARTYPE parameters? The number of required overloads could easily get out of control.
#2 Updated by Vladimir Tsichevski over 1 year ago
Hynek Cihlar wrote:
... If it finds a match, it will emit native Java method call
It must be an error if more than one matches found.
How to handle the cases when OCX method declares multiple (many) VARTYPE parameters? The number of required overloads could easily get out of control.
That is the point.