Base Types
To prevent the problems that implementation-dependent data types can cause on different computer architectures, MIDL defines its own base data types.
Base type | Description |
---|---|
boolean | A 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 | A 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. |
__int3264 | A keyword that specifies an integral type that has either 32-bit or 64-bit properties. |
long | A modifier for int that indicates a 32-bit integer. Can be declared as either signed or unsigned. |
short | A 16-bit integer that can be declared as either signed or unsigned. |
small | A modifier for int that indicates an 8-bit integer. 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 transmittable 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.)