Salesforce

Variant Storage Types (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Variant Storage Types (Magic xpa 4.x)

Table 1 – Basic Types

The following table shows the VARTYPE values that indicate valid Variant types.

VARTYPE value

Enumeration Symbol

Description

Range (for numbers)

0

VT_EMPTY

No value specified

1

VT_NULL

SQL-style Null

2

VT_I2

Signed 2-byte integer

–32,768 to 32,767

3

VT_I4

Signed 4-byte integer

–2,147,483,648 to 2,147,483,647

4

VT_R4

Signed 4-byte real

1.1E -38 to 3.4E +38
(7 digits)

5

VT_R8

Signed 8-byte real

2.2E -308 to 1.7 E +308
(15 digits)

6

VT_CY

Currency

7

VT_DATE

Date

8

VT_BSTR

Automation string

9

VT_DISPATCH

A pointer to an object that implements IDispatch

10

VT_ERROR

SCODE

11

VT_BOOL

Boolean

12

VT_VARIANT

13

VT_UNKNOWN

A pointer to an object that implements IUnknown

14

VT_DECIMAL

Decimal

16

VT_I1

1-byte character

–128 to 127

17

VT_UI1

Unsigned 1-byte character

0 to 255

18

VT_UI2

Unsigned 2-byte integer

0 to 65,535

19

VT_UI4

Unsigned 4-byte integer

0 to 4,294,967,295

22

VT_INT

Signed machine integer

23

VT_UINT

Unsigned machine integer

36

VT_RECORD

User defined type

Example:
The 3 value represents a signed 4-byte integer value, which is indicated by VT_I4,

Table 2 – Arrays and References

The following values are used for Bit-Wise Logical OR operations. These values should be used in addition to the values in Table 1. They are not valid alone.

VARTYPE Value

Enumeration Symbol

Description

8192

VT_ARRAY

An array of data type

16384

VT_BYREF

A reference to data type


Note:

The symbol | is used in the documentation to indicate a Bit-Wise Logical OR operation and is common when indicating variants, such as VT_I2|VT_BYREF. When you use the values from Table 2, you should use the arithmetical ADD operation, instead of the symbol |.

Example for Array

8195 represents an array that is a signed 4-byte integer,
indicated by VT_I4|VT_ARRAY (8195 is a result of 3 + 8192).

Example for “By Reference”

16387 represents a reference that is a signed 4-byte integer,
indicated by VT_I4|VT_BYREF (16387 is a result of 3 + 16384).

List of Exceptions

  1. VT_VARIANT cannot be used alone and must be used with a value from Table 2.

  2. The following combinations are not valid:

VT_NULL | VT_BYREF

VT_EMPTY | VT_BYREF

VT_NULL | VT_ARRAY

VT_EMPTY | VT_ARRAY

Reference
Attachment 
Attachment