A foreign pointer to an object of type
A keyword specifying the type of value.
The value to store in variant.
set-variant can be used to set the type and value of a
VARIANT object. It is useful if the default type provided by the automatic conversion for
VARIANT return values is incorrect. The value of meaning of type is an specified below
If type is
nil then the actual VT code is chosen dynamically according to the Lisp type of value (see Automation types, VT codes and their corresponding Lisp types).
If type is a cons of the form
(:array . type
) for some keyword type, then variant is set to contain an array of objects of type. Each element of value is expected to be suitable for conversion to type.
If type is
:array or another list starting with
:array then variant is set to contain an array of
VARIANT objects with the same dimensions as value. Each element of value is converted as if by calling
set-variant with a type chosen as follows:
nilis passed as the element type.
)then array should be an array with the same dimensions as value. The element type is taken from the corresponding element of array.
)then types should be a suitable value for the
make-arrayto make an array of types with the same dimensions as value. The element type is taken from the corresponding element of that array. In particular, if value is a
vectorof length n then type should be a list of the form
(set-variant v :null)
(set-variant v :short 10)
(set-variant v '(:pointer :short) ptr)
(set-variant v '(:array :short :int) #(1 2))
LispWorks COM/Automation User Guide and Reference Manual - 14 Feb 2015