The following data types are recognized by MkTypLib:
Type | Description | |
---|---|---|
boolean | Data item that can have the value True or False. The size maps to VARIANT_BOOL. | |
char | 8-bit signed data item. | |
double | 64-bit IEEE floating-point number. | |
int | Signed integer, whose size is system dependent. | |
float | 32-bit IEEE floating point number. | |
long | 32-bit signed integer. | |
short | 16-bit signed integer. | |
wchar_t | Unicode character accepted only for 32-bit type libraries. | |
BSTR | Length-prefixed string, as described in Chapter 5, "Dispatch Interface and API Functions." | |
CURRENCY | 8-byte, fixed-point number. | |
DATE | 64-bit floating-point fractional number of days since December 30, 1899. | |
DECIMAL | 96-bit unsigned binary integer scaled by a variable power of 10. Provides a size and scale for a number (as in coordinates). | |
SCODE | Built-in error type that corresponds to VT_ERROR. An SCODE (used in 16-bit systems only) does not contain the additional error information provided by HRESULT. | |
VARIANT | One of the variant data types as described in Chapter 5, "Dispatch Interface and API Functions." | |
IDispatch * | Pointer to the IDispatch interface. | |
IUnknown * | Pointer to the IUnknown interface. (Any OLE interface can be represented by its IUnknown interface.) | |
SAFEARRAY(TypeName) | TypeName is any of the above types. Array of these types. | |
TypeName* | TypeName is any of the above types. Pointer to a type. | |
void | Allowed only as return type for a function, or in a function parameter list to indicate no arguments. | |
HRESULT | Return type used for reporting error information in interfaces, as described in OLE Programmer's Reference. | |
LPWSTR | Unicode string accepted only for 32-bit type libraries. | |
LPSTR | Zero-terminated string. |
Not all of the above types can be marshaled by Automation to another process or thread. The list of types that can be marshaled are called Automation compatible types, and are listed under the oleautomation attribute description.
The keyword unsigned can be specified before int, char, short, and long.