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 |
| handle |
VT_LPWSTR VT_LPSTR VT_BSTR VT_FILETIME VT_ERROR VT_DECIMAL VT_CLSID VT_DATE
| wide null terminated
stringnull terminated
stringOLE 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_I8 | signed int64 | int64 |
VT_UI8 | unsigned int64 | uint64 |
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( |
VT_SAFEARRAY | use VT_ARRAY in VARIANT | SAFEARRAY |
VT_SAFEARRAY | VT_BYREF | SAFEARRAY (pointer) |