Basic Types

The basic types are predefined types, which can be used within a composite type definition.

Numeric Types

Numeric types are BYTE, WORD, DWORD, and QWORD and may be preceded by a representation specifier. The valid representation specifiers are HEX (hexadecimal), SIGNED (signed decimal), and UNSIGNED (unsigned decimal). If no representation is specified, HEX is assumed by default.

struct RgbColor {
  unsigned byte Red;
  unsigned byte Green;
  unsigned byte Blue;

In the above example the structure RgbColor consists of three byte-sized unsigned decimals.

Floating Point Types

Floating point types FLOAT and DOUBLE represent 32-bit and 64-bit floating point numbers. Example:

float Vector[3];

introduces an array type Vector consisting of three 32-bit floating point numbers.

Character Types

The character types are CHAR and WCHAR, which represent correspondingly one byte ANSI character and two byte UNICODE character. These types are used for defining strings.

struct PascalString {
  unsigned byte StrLength;
  char String[StrLength];

Date and Time

FlexHEX supports the following date/time data types:

  • FILETIME - 64-bit date/time,
  • DATE - 64-bit floating-point OLE date/time,
  • TIME_T - 32-bit standard time_t date/time type.

Globally Unique Identifier

The GUID type is 16 bytes long and is used to represent Class IDs (CLSIDs) or Interface IDs (IIDs):

struct Server {
  guid Class;
  guid Interface;