Main Content

Convert COM Types to MATLAB Types

This table shows how MATLAB® converts data from a COM application into MATLAB types.

COM Variant Type

Description

MATLAB Type

VT_DISPATCH

IDispatch *

handle
VT_LPWSTR
VT_LPSTR
VT_BSTR
VT_FILETIME
VT_ERROR
VT_DECIMAL
VT_CLSID
VT_DATE
wide null terminated string
null terminated string
OLE Automation string
FILETIME
SCODE
16-byte fixed point
Class ID
date
character vector
VT_INT
VT_UINT
VT_I2
VT_UI2
VT_I4
VT_UI4
VT_R4
VT_R8
VT_CY
signed machine int
unsigned machine int
2 byte signed int
unsigned short
4 byte signed int
unsigned long
4 byte real
8 byte real
currency
double
VT_I8signed int64int64
VT_UI8unsigned int64uint64
VT_BOOL  logical
VT_I1
VT_UI1
signed char
unsigned char
char
VT_VARIANT
VT_USERDEFINED
VT_ARRAY
VARIANT *
user-defined type
SAFEARRAY*
variant
VT_VARIANT | VT_BYREF VARIANT *
void* for local use
variant(pointer)
VT_SAFEARRAYuse VT_ARRAY in VARIANTSAFEARRAY
VT_SAFEARRAY | VT_BYREF SAFEARRAY(pointer)

See Also

Related Topics