Data type compatibilities
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Data type compatibilities
For each parameter definition, you must specify a data type that is compatible with the standard C data type of the corresponding DLL routine parameter. Many data types referenced by DLL routines have the same memory size and usage.
The following table lists each supported memory size and usage, examples of corresponding C data types, and the ABL DLL parameter data type you must use for each one.
| Example C data type | DLL parameter data type | Data type size and usage |
|---|---|---|
char
|
BYTE
|
8-bit unsigned integer |
short
|
SHORT
|
16-bit signed integer |
unsigned short
|
UNSIGNED-SHORT
|
16-bit unsigned integer |
int (UNIX; Windows)
|
LONG
|
32-bit signed integer |
unsigned int |
UNSIGNED-LONG
|
32-bit unsigned integer |
_int64 (Windows)
|
INT64
|
64-bit signed integer |
float
|
FLOAT
|
4-byte floating point |
double
|
DOUBLE
|
8-byte floating point |
char*
|
CHARACTER
|
Address (32 bits for 32-bit platforms, 64 bits for 64-bit platforms.) |
| c-data-type1 |
HANDLE TO
parameter-data-type
1 |
Address (32 bits for 32-bit platforms, 64 bits for 64-bit platforms.) |
char*, output-pointer (which can
be char**, short**, and so on), or a pointer to a
structure |
MEMPTR
|
Address (32 bits for 32-bit platforms, 64 bits for 64-bit platforms.) |
To indicate that the DLL or UNIX shared library parameter is
a pointer to a value rather than the value itself, use the HANDLE option. The HANDLE option
is required when the DLL routine expects a pointer to the value.
Note that the CHARACTER data type implies the HANDLE option,
whether or not you specify it. The TO keyword aids
readability but has no meaning.