




3.3.3 Data conversion when calling Automation methods
The arguments and return values to Automation methods are restricted to a small number of simple types, which map to Lisp types as follows:
Automation types, VT codes and their corresponding Lisp types
Automation type
|
VT code
|
Lisp type
|
null value
|
VT_NULL
|
the symbol
:null
|
empty value
|
VT_EMPTY
|
the symbol
:empty
|
SHORT
|
VT_I2
|
integer
|
LONG
|
VT_I4
|
integer
|
FLOAT
|
VT_R4
|
single-float
|
DOUBLE
|
VT_R8
|
double-float
|
CY
|
VT_CY
|
not suppported
|
DATE
|
VT_DATE
|
not suppported
|
BSTR
|
VT_BSTR
|
string
|
IDispatch*
|
VT_DISPATCH
|
FLI
(:pointer i-dispatch)
|
SCODE
|
VT_ERROR
|
integer
|
VARIANT_BOOL
|
VT_BOOL
|
nil
or
t
|
VARIANT*
|
VT_VARIANT
|
recursively convert
|
IUknown*
|
VT_UNKNOWN
|
FLI
(:pointer i-unknown)
|
DECIMAL
|
VT_DECIMAL
|
not suppported
|
BYTE
|
VT_UI1
|
integer
|
SAFEARRAY
|
VT_ARRAY
|
array
|
dynamic
|
dynamic
|
lisp-variant
|
When an Automation argument is a
lisp-variant
object, its type is used to set the VT code. See make-lisp-variant and set-variant.
In
and
in-out
parameters are passed as positional arguments in the calling forms and
out
and
in-out
parameters are returned as additional values. If there is an argument with the
retval
attribute then it is returned as the first value.
LispWorks COM/Automation User Guide and Reference Manual - 22 Dec 2009




