Data Types

In the CALL, REGISTER, and REGISTER.ID functions, the type_text argument specifies the data type of the return value and the data types of all arguments to the DLL function or code resource. The first character of type_text specifies the data type of the return value. The remaining characters indicate the data types of all the arguments. For example, a DLL function that returns a floating-point number and takes an integer and a floating-point number as arguments would require "BIB" for the type_text argument.

The following table contains a complete list of the data type codes that Microsoft Excel recognizes, a description of each data type, how the argument or return value is passed, and a typical declaration for the data type in the C programming language.

Code

Description

Pass by

C Declaration

A

Logical
(FALSE = 0), TRUE = 1)

Value

short int

B

IEEE 8-byte floating-point number

Value (Windows)

Reference (Macintosh)

double (Windows)

double * (Macintosh)

C

Null-terminated string (maximum string length = 255)

Reference

char *

D

Byte-counted string
(first byte contains length of string, maximum string length = 255 characters)

Reference

Unsigned char *

E

IEEE 8-byte floating-point number

Reference

double *

F

Null-terminated string (maximum string length = 255 characters)

Reference
(modify in place)

char *

G

Byte-counted string
(first byte contains length of string, maximum string length = 255 characters)

Reference
(modify in place)

unsigned char *

H

Unsigned 2-byte integer

Value

unsigned short int

I

Signed 2-byte integer

Value

short int

J

Signed 4-byte integer

Value

long int

K

Array

Reference

FP *

L

Logical
(FALSE = 0, TRUE = 1)

Reference

short int *

M

Signed 2-byte integer

Reference

short int *

N

Signed 4-byte integer

Reference

long int *

O

Array

Reference

Three arguments are passed:
unsigned short int *
unsigned short int *
double [ ]

P

Microsoft Excel OPER data structure

Reference

OPER *

R

Microsoft Excel XLOPER data structure

Reference

XLOPER *


Remarks