The ActiveX Control Integrator wizard supports the following OLE Automation types.
This table shows the value ranges for the various OLE Automation and Adelia types. You can use the table to set the correspondences established on the second page of the wizard and to adjust them individually on the subsequent pages, based on the user's understanding of ActiveX. Where there is more than one possible choice for a numerical type, it is not always possible to have the same value range correspondence.
OLE Automation type |
Description |
Value range |
Corresponding Adelia types |
Value range and notes |
BSTR |
Automation string (each character is coded on two bytes). |
|
ALPHA(n) |
|
DATE |
Contains a date and/or time, but without any fractions of a second. |
|
TIMESTAMP DATE TIME |
Any fractions of a second contained in a TIMESTAMP variable are lost in an OLE Automation DATE variable. |
float |
Four-byte real floating point number. |
Negative values: -3.402823 x 10e38 to -1.401298 x 10e-45 Positive values: 1.401298 x 10e-45 to 3.402823 x 10e38 |
NUM_E(len,dec) NUM_P(len,dec) NUM_BIN_4 |
Depends on len and dec.
The NUM_BIN_4 type is useful in cases where the variable only contains integers. |
double |
Eight-byte real floating point number. |
Negative values: -1.79769313486232 x 10e308 to -4.94065645841247 x 10e-324 Positive values: 4.94065645841247 x 10e-324 to 1.79769313486232 x 10e308 |
NUM_E(len,dec) NUM_P(len,dec) |
Depends on len and dec. |
CURRENCY |
Currency (fixed-point real number with 15 integer positions and 4 decimal positions). |
-922,337,203,685,477.5808 to 922,337,203,685,477.5807 |
NUM_E(len,dec) NUM_P(len,dec) |
If len = 15 and dec = 4, the range is: -9 999 999 999,9999 to 9,999,999,999.9999 |
unsigned char |
Unsigned character (1 byte). |
0 to 255 |
ALPHA(1)
NUM_BIN_2 |
The character has an ANSI code between 0 and 255.
-32,768 to 32,767 |
char |
Signed character (1 byte). |
-128 to 127 |
NUM_BIN_2
ALPHA(1) |
-32,768 to 32,767
In practice, the char type generally contains a positive value, and is therefore used as a character. |
unsigned short |
Unsigned short integer (2 bytes). |
0 to 65,535 |
NUM_BIN_4 NUM_BIN_2 |
-2,147,483,648 to 2,147,483,647 -32,768 to 32,767
The NUM_BIN_2 type is sufficient if the variable only contains positive values. |
short |
Signed short integer (2 bytes). |
-32,768 to 32,767 |
NUM_BIN_2 |
Same range as the OLE Automation type. |
unsigned int |
Unsigned machine integer (4 bytes). |
0 to 4,294,967,295 |
NUM_E(len,dec) NUM_P(len,dec) NUM_BIN_4 |
If len = 10 and dec = 0 The range is 0 to 9,999,999,999.
The NUM_BIN_4 type is sufficient if the variable only contains positive values. |
int |
Signed machine integer (4 bytes). |
-2,147,483,648 to 2,147,483,647 |
NUM_BIN_4 |
Same range as the OLE Automation type. |
unsigned long |
Unsigned long integer (4 bytes). |
0 to 4,294,967,295 |
NUM_E(len,dec) NUM_P(len,dec) NUM_BIN_4 |
If len = 10 and dec = 0 The range is 0 to 9,999,999,999.
The NUM_BIN_4 type is sufficient if the variable only contains positive values. |
Long |
Signed long integer (4 bytes). |
-2,147,483,648 to 2,147,483,647 |
NUM_BIN_4 |
Same range as the OLE Automation type. |
HRESULT |
Result code. |
-2,147,483,648 to 2,147,483,647 |
NUM_BIN_4 |
Same range as the OLE Automation type. |
__int64 |
Signed 64-bit integer (8 bytes). |
–9223372036854775808 to 9223372036854775807 |
NUM_BIN_8 |
Same range as the OLE Automation type. |
unsigned __int64 |
Unsigned 64-bit integer (8 bytes). |
0 to 18446744073709551615 |
NUM_BIN_8 |
The NUM_BIN_8 type does not allow to handle correctly values over 9223372036854775807. |
SCODE |
Status code. |
-2,147,483,648 to 2,147,483,647 |
NUM_BIN_4 |
Same range as the OLE Automation type. |
VARIANT_BOOL |
OLE Automation Boolean variable. |
|
BOOL |
Same notions of True and False. |
VARIANT |
Structure that can contain a variety of simple types or pointers, plus the information that specifies which type it contains. |
|
Any Adelia type (variable or list) and a constant that sets the VARIANT type |
A type internal to the Visual Adelia language, similar to the VARIANT type, is used.
(See the VARIANT management section below.) |
IDispatch* |
|
POINTER *IDISPATCH |
|
|
IUnknown* |
|
POINTER *IUNKNOWN |
|
Special case: management of the VARIANT type and related constants
The OLE Automation VARIANT type can be described in approximate terms as a structure, i.e. a grouping-together of various types that are then treated as a new type of variable. This structure can contain all of the above types, a pointer (memory address) to one of these types or to an array, and the information that specifies what type is actually contained by a particular VARIANT variable.
During the integration process, a VARIANT property will be managed as a read method, plus a write method if the property is not a read-only property. A VARIANT method or event parameter is managed in Adelia using two parameters, the first of which can be an Adelia variable of any type or a non-composite list (i.e. a list defined by a single Adelia variable), and the second is the OLE variant's type.
Where a variant is used as a method input parameter, i.e. when the Visual Adelia program supplies the variant to the ActiveX, this second parameter is used to create a variant of a particular type, with the same value as the Adelia variable, after being converted if necessary, depending on the required variant type.
With variants used exclusively as output parameters, i.e. where the ActiveX supplies a variant to the Visual Adelia program, the second parameter specifies that the variant is output-only, and identifies the exact type contained by the variant. In addition, during development work, this approach may make it possible to use an Adelia variable of a type better suited to the variant's content, given that the content can be converted to fit the Adelia variable type.
Input-output variants represent a combination of the aforementioned cases.
The parameter values that identify the variant type are shown in the list below. These constants are systematically generated as constants of any graphical objects that contain a variant parameter.
Constant name |
Value |
OLE Automation type contained in the variant |
Note |
__VT_EMPTY |
0 |
|
Appropriate value for an output variant. |
__VT_NULL |
1 |
|
Do not use. This value may be returned by an output variant. |
__VT_I2 |
2 |
short |
|
__VT_I4 |
3 |
long |
|
__VT_R4 |
4 |
float |
|
__VT_R8 |
5 |
double |
|
__VT_CY |
6 |
CURRENCY |
|
__VT_DATE |
7 |
DATE |
|
__VT_BSTR |
8 |
BSTR |
|
__VT_DISPATCH |
9 |
IDispatch* |
|
__VT_ERROR |
10 |
SCODE |
|
__VT_BOOL |
11 |
VARIANT_BOOL |
|
__VT_VARIANT |
12 |
VARIANT* |
Do not use. This value may be returned by an output variant. |
__VT_UNKNOWN |
13 |
IUnknown* |
|
|
|
|
|
__VT_I1 |
16 |
char |
|
__VT_UI1 |
17 |
unsigned char |
|
__VT_UI2 |
18 |
unsigned short |
|
__VT_UI4 |
19 |
unsigned long |
|
__VT_I8 |
20 |
__int64 |
|
__VT_UI8 |
21 |
Unsigned __int64 |
|
__VT_INT |
22 |
int |
|
__VT_UINT |
23 |
unsigned int |
|
|
|
|
|
__VT_ARRAY |
8192 |
The variant contains an array of one of the above types. |
Value that must be added to that of the relevant type. |
__VT_BYREF |
16384 |
The variant contains the address of one of the above types. |
Do not use. This value may be returned by an output variant. |
For example, to set a variant containing an array of long integers as a parameter, the user must set the first parameter as a NUM_BIN_4 list Adelia variable, and set the second parameter as the sum of (__VT_ARRAY + __VT_I4).
Back to Selecting the ActiveX Control to Integrate.