# Standard Visual Basic Language Types

The following table describes simple C data types for use in Visual Basic applications whenever the VB API function refers to ESB_xx...x_T (except for user-defined types). Visual Basic does not allows the definition of new data types based on these data types.

Simple Data Types
Bitmask Data Types
Additional Data Types
Pointer Types
Miscellaneous Types
Boolean Flags

## Simple Data Types

Data Type | Essbase Type
As String * 1 | ESB_CHAR_T
As Integer | ESB_SHORT_T
As Long | ESB_LONG_T
As String * 1 | ESB_UCHAR_T
As Integer | ESB_USHORT_T
As Long | ESB_ULONG_T
As Long | ESB_FLOAT_T
As Long | ESB_DOUBLE_T
As Long | ESB_TIME_T
As Long | ESB_DATE_T

## Bitmask Data Types

The values for these data types consist of bit values that are combined to provide additional values when appropriate. For example, a caller needing WRITE access to a database must have the READ and WRITE privileges, thus ESB_ACCESS_WRITE equals the bit values for ESB_PRIV_READ and ESB__PRIV_WRITE. Similarly, ESB_OBJTYPE_BACKUP is a combination of ESB_OBJTYPE_ASCBACKUP and ESB_OBJTYPE_BINBACKUP.

Data Type | Essbase Type | Description
As Integer | ESB_ACCESS_T | Essbase access level. Possible bit values are: ESB_PRIV_NONE - 0x0000 - no privilege ESB_PRIV_READ - 0x0001 - read data ESB_PRIV_WRITE - 0x0002 - write data ESB_PRIV_CALC - 0x0004 - calculate data ESB_PRIV_DBLOAD - 0x0010 - load and unload databases ESB_PRIV_DBDESIGN - 0x0020 - design databases ESB_PRIV_DBCREATE - 0x0040 - create, delete, and edit databases ESB_PRIV_APPLOAD - 0x0100 - load and unload applications ESB_PRIV_APPDESIGN - 0x0200 - design applications ESB_PRIV_APPCREATE - 0x0400 - create, delete, and edit applications ESB_PRIV_USERCREATE - 0x1000 - create, delete, and edit users The access types are combinations of privileges. The valid values are: ESB_ACCESS_NONE - 0x0000 ESB_ACCESS_READ - 0x0111 ESB_ACCESS_WRITE - 0x0113 ESB_ACCESS_CALC - 0x0117 ESB_ACCESS_DBDESIGN - 0x0137 ESB_ACCESS_DBCREATE - 0x0177 ESB_ACCESS_APPDESIGN - 0x0377 ESB_ACCESS_APPCREATE - 0x0777 ESB_ACCESS_FILTER - 0x0110 ESB_ACCESS_DBALL - 0x00ff - full database access ESB_ACCESS_APPALL - 0x0fff - full application/database access ESB_ACCESS_SUPER - 0xffff - supervisor (unrestricted access)
As Integer | ESB_OBJTYPE_T | File object type. Single object types are:
    ESB_OBJTYPE_NONE
    ESB_OBJTYPE_OUTLINE
    ESB_OBJTYPE_CALCSCRIPT
    ESB_OBJTYPE_REPORT
    ESB_OBJTYPE_RULES
    ESB_OBJTYPE_ALIAS
    ESB_OBJTYPE_STRUCTURE
    ESB_OBJTYPE_ASCBACKUP
    ESB_OBJTYPE_BINBACKUP
    ESB_OBJTYPE_EXCEL
    ESB_OBJTYPE_LOTUS2
    ESB_OBJTYPE_LOTUS3
    ESB_OBJTYPE_TEXT
    ESB_OBJTYPE_PARTITION
    ESB_OBJTYPE_LOTUS4
    ESB_OBJTYPE_WIZARD
    ESB_OBJTYPE_SELECTION
    ESB_OBJTYPE_LRO
Combined object types are:
    ESB_OBJTYPE_BACKUP
    ESB_OBJTYPE_WORKSHEET
    ESB_OBJTYPE_DATA
    ESB_OBJTYPE_ALL

## Additional Data Types

Data Type | Essbase Type | Description
ByVal As String * 1 | ESB_BOOL_T | boolean
ByVal As String | *ESB_STR_T | string (array of char)
ByVal As Long | *ESB_HINST_T | API instance handle
ByVal As Long | *ESB_HCTX_T | API context handle
As Any | ESB_VOID_T | void
ByVal As Long | ESB_SIZE_T | size of a memory block
ByVal As Integer | ESB_ACCESS_T | Essbase access level
ByVal As Long | ESB_LOGINID_T | Essbase login id

## Pointer Types

Data Type | Essbase Type | Description
As Integer | *ESB_PSHORT_T | pointer to short
As Long | *ESB_PLONG_T | pointer to long
As Integer | *ESB_PUSHORT_T | pointer to unsigned short
As Long | *ESB_PULONG_T | pointer to unsigned long
As Long | *ESB_PFLOAT_T | pointer to float
As Long | *ESB_PDOUBLE_T | pointer to double
As Any | *ESB_PVOID_T | pointer to void
As Long | *ESB_PSIZE_T | pointer to size of a memory block
As Long | *ESB_PHINST_T | pointer to Essbase VB API instance handle
As Long | *ESB_PHCTX_T | pointer to Essbase VB API context handle
As Integer | *ESB_PACCESS_T | pointer to Essbase access level
As Long | *ESB_PLOGINID_T | pointer to Essbase login id

## Miscellaneous Types

Data Type | Essbase Type | Description
ByVal As Long | ESB_STS_T | return value from API functions
As Long | ESB_FUNC_T | pointer to function

## Boolean Flags

Data Type | Essbase Type | Description
chr$(1) | ESB_TRUE | Boolean TRUE to be used in data structures
chr$(0) | ESB_FALSE | Boolean FALSE to be used in data structures
1 | ESB_YES | YES flag to be used in the list of the VB API function parameters
0 | ESB_NO | NO flag to be used in the list of the VB API function parameters
ByVal 0& | NULL | Null