User`s guide

Data Conversion Rules
VARIANT Type Codes Supported (Continued)
VARIANT Type Code
(C/C++) C/C++ Type
Variant
Type Code
(Visual Basic)
Visual
Basic
Type Definition
<anything>|VT_BYREF
——
Bitwise combine
VT_BYREF with any
basictypetodeclare
as a reference to a
value
+
Denotes Windows-specific type. Not part of standard C/C++.
ThefollowingtableliststherulesforconvertingfromMATLABtoCOM.
MATLAB to COM VARIANT Conversion Rules
MATLAB Data
Type
VARIANT Type for
Scalar Data
VARIANT Type for
Array Data Comments
cell
A 1 -by-1 cell array
converts to a single
VARIANT with a type
conforming to the
conversion rule for the
MATLAB data type of
the cell contents.
A multidimensional
cell array converts
to a
VARIANT of type
VT_VARIANT|VT_ARRAY
with the type of
each array mem ber
conforming to the
conversion rule for the
MATLAB data type of
the corresponding cell.
structure VT_DISPATCH VT_DISPATCH
A MATLAB struct
array is converted to
an
MWStruct object.
(See “Class MWStruct”
on page C-16.) This
object is passed as a
VT_DISPATCH type.
B-5