Base Types

To prevent the problems that implementation-dependent data types can cause on varying computer architectures, MIDL defines its own base data types:

Base type Description
boolean Data item that can have the value TRUE or FALSE.
byte An 8-bit data item guaranteed to be transmitted without any change.
char An 8-bit unsigned character data item.
double A 64-bit floating-point number.
float A 32-bit floating-point number.
handle_t Primitive handle that can be used for RPC binding or data serializing.
hyper A 64-bit integer that can be declared as either signed or unsigned. (Can also be referred to as _int64.)
int A 32-bit integer that can be declared as either signed or unsigned.
long A 32-bit integer that can be declared as either signed or unsigned.
short A 16-bit integer that can be declared as either signed or unsigned.
small An 8-bit integer that can be declared as either signed or unsigned.
wchar_t Wide-character type that is supported as a Microsoft extension to IDL. Therefore, this type is not available if you compile using the /osf switch.

The header file RPCNDR.H provides definitions for most of these base data types. The keyword int is recognized and is remoteable on 32-bit platforms. On 16-bit platforms, the int data type requires a modifier, such as short or long, to specify its length.

Although void * is recognized as a generic pointer type by the ANSI C standard, MIDL restricts its usage. Each pointer used in a remote or serializing operation must point to either base types or types constructed from base types. (There is an exception: context handles are defined as void * types. For more information see Context Handles.)