본문 바로가기

Software/C/C++

[C++] Windows Data Type

Platform SDK: Windows API

Windows Data Types

The data types supported by Microsoft® Windows® are used to define function return values, function and message parameters, and structure members. They define the size and meaning of these elements. For more information about the underlying C/C++ data types, see Data Type Ranges.

The following table contains the following types: character, integer, Boolean, pointer, and handle. The character, integer, and Boolean types are common to most C compilers. Most of the pointer-type names begin with a prefix of P or LP. Handles refer to a resource that has been loaded into memory.

For more information about handling 64-bit integers, see Large Integers.

Term Description
ATOM Atom. For more information, see Atoms.

This type is declared in WinDef.h as follows:

typedef WORD ATOM;
BOOL Boolean variable (should be TRUE or FALSE).

This type is declared in WinDef.h as follows:

typedef int BOOL;
BOOLEAN Boolean variable (should be TRUE or FALSE).

This type is declared in WinNT.h as follows:

typedef BYTE BOOLEAN;
BYTE Byte (8 bits).

This type is declared in WinDef.h as follows:

typedef unsigned char BYTE;
CALLBACK Calling convention for callback functions.

This type is declared in WinDef.h as follows:

#define CALLBACK __stdcall
CHAR

8-bit Windows (ANSI) character.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef char CHAR;
COLORREF

Red, green, blue (RGB) color value (32 bits).

See COLORREF for information on this type.

This type is declared in WinDef.h as follows:

typedef DWORD COLORREF;
CONST

Variable whose value is to remain

 constant during execution.

This type is declared in WinDef.h as follows:

#define CONST const
DWORD 32-bit unsigned integer.

This type is declared in WinDef.h as follows:

typedef unsigned long DWORD;
DWORDLONG 64-bit unsigned integer.

This type is declared in WinNT.h as follows:

typedef ULONGLONG DWORDLONG;
DWORD_PTR

Unsigned long type for pointer precision.

Use when casting a pointer to a long type

 to perform pointer arithmetic.

 (Also commonly used for general 32-bit

parameters that have been extended

to 64 bits in 64-bit Windows. )


This type is declared in BaseTsd.h as follows:

typedef ULONG_PTR DWORD_PTR;
DWORD32 32-bit unsigned integer.

This type is declared in BaseTsd.h as follows:

typedef unsigned int DWORD32;
DWORD64 64-bit unsigned integer.

This type is declared in BaseTsd.h as follows:

typedef unsigned __int64 DWORD64;
FLOAT Floating-point variable.

This type is declared in WinDef.h as follows:

typedef float FLOAT;
HACCEL Handle to an accelerator table.

This type is declared in WinDef.h as follows:

typedef HANDLE HACCEL;
HALF_PTR

Half the size of a pointer.

Use within a structure that contains

a pointer and two small fields.

This type is declared in Basetsd.h as follows:

#ifdef _WIN64
 typedef int HALF_PTR;
#else
 typedef short HALF_PTR;
#endif
HANDLE Handle to an object.

This type is declared in WinNT.h as follows:

typedef PVOID HANDLE;
HBITMAP Handle to a bitmap.

This type is declared in WinDef.h as follows:

typedef HANDLE HBITMAP;
HBRUSH Handle to a brush.

This type is declared in WinDef.h as follows:

typedef HANDLE HBRUSH;
HCOLORSPACE Handle to a color space.

This type is declared in WinDef.h as follows:

#if(WINVER >= 0x0400)
 typedef HANDLE HCOLORSPACE;
#endif
HCONV

Handle to a dynamic data exchange (DDE)

conversation.

This type is declared in Ddeml.h as follows:

typedef HANDLE HCONV;
HCONVLIST Handle to a DDE conversation list.

This type is declared in Ddeml.h as follows:

typedef HANDLE HCONVLIST;
HCURSOR Handle to a cursor.

This type is declared in WinDef.h as follows:

typedef HICON HCURSOR;
HDC Handle to a device context (DC).

This type is declared in WinDef.h as follows:

typedef HANDLE HDC;
HDDEDATA Handle to DDE data.

This type is declared in Ddeml.h as follows:

typedef HANDLE HDDEDATA;
HDESK Handle to a desktop.

This type is declared in WinDef.h as follows:

typedef HANDLE HDESK;
HDROP Handle to an internal drop structure.

This type is declared in ShellApi.h as follows:

typedef HANDLE HDROP;
HDWP Handle to a deferred window position structure.

This type is declared in WinUser.h as follows:

typedef HANDLE HDWP;
HENHMETAFILE Handle to an enhanced metafile.

This type is declared in WinDef.h as follows:

typedef HANDLE HENHMETAFILE;
HFILE

Handle to a file opened by OpenFile,

not CreateFile.

This type is declared in WinDef.h as follows:

typedef int HFILE;
HFONT Handle to a font.

This type is declared in WinDef.h as follows:

typedef HANDLE HFONT;
HGDIOBJ Handle to a GDI object.

This type is declared in WinDef.h as follows:

typedef HANDLE HGDIOBJ;
HGLOBAL Handle to a global memory block.

This type is declared in WinDef.h as follows:

typedef HANDLE HGLOBAL;
HHOOK Handle to a hook.

This type is declared in WinDef.h as follows:

typedef HANDLE HHOOK;
HICON Handle to an icon.

This type is declared in WinDef.h as follows:

typedef HANDLE HICON;
HINSTANCE Handle to an instance.

This type is declared in WinDef.h as follows:

typedef HANDLE HINSTANCE;
HKEY Handle to a registry key.

This type is declared in WinDef.h as follows:

typedef HANDLE HKEY;
HKL Input locale identifier.

This type is declared in WinDef.h as follows:

typedef HANDLE HKL;
HLOCAL Handle to a local memory block.

This type is declared in WinDef.h as follows:

typedef HANDLE HLOCAL;
HMENU Handle to a menu.

This type is declared in WinDef.h as follows:

typedef HANDLE HMENU;
HMETAFILE Handle to a metafile.

This type is declared in WinDef.h as follows:

typedef HANDLE HMETAFILE;
HMODULE

Handle to a module.

The value is the base address of the module.

This type is declared in WinDef.h as follows:

typedef HINSTANCE HMODULE;
HMONITOR Handle to a display monitor.

This type is declared in WinDef.h as follows:

if(WINVER >= 0x0500) typedef HANDLE HMONITOR;
HPALETTE Handle to a palette.

This type is declared in WinDef.h as follows:

typedef HANDLE HPALETTE;
HPEN Handle to a pen.

This type is declared in WinDef.h as follows:

typedef HANDLE HPEN;
HRESULT

Return code used by interfaces.

It is zero upon success and nonzero

to represent an error code or status information.

This type is declared in WinNT.h as follows:

typedef LONG HRESULT;
HRGN Handle to a region.

This type is declared in WinDef.h as follows:

typedef HANDLE HRGN;
HRSRC Handle to a resource.

This type is declared in WinDef.h as follows:

typedef HANDLE HRSRC;
HSZ Handle to a DDE string.

This type is declared in Ddeml.h as follows:

typedef HANDLE HSZ;
HWINSTA Handle to a window station.

This type is declared in WinDef.h as follows:

typedef HANDLE WINSTA;
HWND Handle to a window.

This type is declared in WinDef.h as follows:

typedef HANDLE HWND;
INT 32-bit signed integer.

This type is declared in WinDef.h as follows:

typedef int INT;
INT_PTR

Signed integer type for pointer precision.

Use when casting a pointer to an integer

to perform pointer arithmetic.

This type is declared in BaseTsd.h as follows:

#if defined(_WIN64) 
 typedef __int64 INT_PTR; 
#else 
 typedef int INT_PTR;
#endif
INT32 32-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed int INT32;
INT64 64-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed __int64 INT64;
LANGID

Language identifier. For more information,

see Locales.

This type is declared in WinNT.h as follows:

typedef WORD LANGID;
LCID

Locale identifier. For more information,

see Locales.

This type is declared in WinNT.h as follows:

typedef DWORD LCID;
LCTYPE

Locale information type.

For a list, see Locale and Language Information.

This type is declared in WinNls.h as follows:

typedef DWORD LCTYPE;
LGRPID

Language group identifier.

For a list, see EnumLanguageGroupLocales.

This type is declared in WinNls.h as follows:

typedef DWORD LGRPID;
LONG 32-bit signed integer.

This type is declared in WinNT.h as follows:

typedef long LONG;
LONGLONG 64-bit signed integer.

This type is declared in WinNT.h as follows:

#if !defined(_M_IX86)
 typedef __int64 LONGLONG; 
#else
 typedef double LONGLONG;
#endif
LONG_PTR

Signed long type for pointer precision.

Use when casting a pointer to a long

to perform pointer arithmetic.

This type is declared in BaseTsd.h as follows:

#if defined(_WIN64)
 typedef __int64 LONG_PTR; 
#else
 typedef long LONG_PTR;
#endif
LONG32 32-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed int LONG32;
LONG64 64-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef __int64 LONG64;
LPARAM Message parameter.

This type is declared in WinDef.h as follows:

typedef LONG_PTR LPARAM;
LPBOOL Pointer to a BOOL.

This type is declared in WinDef.h as follows:

typedef BOOL far *LPBOOL;
LPBYTE Pointer to a BYTE.

This type is declared in WinDef.h as follows:

typedef BYTE far *LPBYTE;
LPCOLORREF Pointer to a COLORREF value.

This type is declared in WinDef.h as follows:

typedef DWORD *LPCOLORREF;
LPCSTR

Pointer to a constant null-terminated string

of 8-bit Windows (ANSI) characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef __nullterminated CONST CHAR *LPCSTR;
LPCTSTR

An LPCWSTR if UNICODE is defined,

an LPCSTR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef LPCWSTR LPCTSTR; 
#else
 typedef LPCSTR LPCTSTR;
#endif
LPCVOID Pointer to a constant of any type.

This type is declared in WinDef.h as follows:

typedef CONST void *LPCVOID;
LPCWSTR

Pointer to a constant null-terminated string

of 16-bit Unicode characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef CONST WCHAR *LPCWSTR;
LPDWORD Pointer to a DWORD.

This type is declared in WinDef.h as follows:

typedef DWORD *LPDWORD;
LPHANDLE Pointer to a HANDLE.

This type is declared in WinDef.h as follows:

typedef HANDLE *LPHANDLE;
LPINT Pointer to an INT.

This type is declared in WinDef.h as follows:

typedef int *LPINT;
LPLONG Pointer to a LONG.

This type is declared in WinDef.h as follows:

typedef long *LPLONG;
LPSTR

Pointer to a null-terminated string of 8-bit

Windows (ANSI) characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef CHAR *LPSTR;
LPTSTR

An LPWSTR if UNICODE is defined,

an LPSTR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef LPWSTR LPTSTR;
#else
 typedef LPSTR LPTSTR;
#endif
LPVOID Pointer to any type.

This type is declared in WinDef.h as follows:

typedef void *LPVOID;
LPWORD Pointer to a WORD.

This type is declared in WinDef.h as follows:

typedef WORD *LPWORD;
LPWSTR

Pointer to a null-terminated string of 16-bit

Unicode characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef WCHAR *LPWSTR;
LRESULT Signed result of message processing.

This type is declared in WinDef.h as follows:

typedef LONG_PTR LRESULT;
PBOOL Pointer to a BOOL.

This type is declared in WinDef.h as follows:

typedef BOOL *PBOOL;
PBOOLEAN Pointer to a BOOL.

This type is declared in WinNT.h as follows:

typedef BOOLEAN *PBOOLEAN;
PBYTE Pointer to a BYTE.

This type is declared in WinDef.h as follows:

typedef BYTE *PBYTE;
PCHAR Pointer to a CHAR.

This type is declared in WinNT.h as follows:

typedef CHAR *PCHAR;
PCSTR

Pointer to a constant null-terminated

string of 8-bit Windows (ANSI) characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef CONST CHAR *PCSTR;
PCTSTR A PCWSTR if UNICODE is defined, a PCSTR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef LPCWSTR PCTSTR;
#else
 typedef LPCSTR PCTSTR;
#endif
PCWSTR

Pointer to a constant null-terminated string

of 16-bit Unicode characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef CONST WCHAR *PCWSTR;
PDWORD Pointer to a DWORD.

This type is declared in WinDef.h as follows:

typedef DWORD *PDWORD;
PDWORDLONG Pointer to a DWORDLONG.

This type is declared in WinNT.h as follows:

typedef DWORDLONG *PDWORDLONG;
PDWORD_PTR Pointer to a DWORD_PTR.

This type is declared in BaseTsd.h as follows:

typedef DWORD_PTR *PDWORD_PTR;
PDWORD32 Pointer to a DWORD32.

This type is declared in BaseTsd.h as follows:

typedef DWORD32 *PDWORD32;
PDWORD64 Pointer to a DWORD64.

This type is declared in BaseTsd.h as follows:

typedef DWORD64 *PDWORD64;
PFLOAT Pointer to a FLOAT.

This type is declared in WinDef.h as follows:

typedef FLOAT *PFLOAT;
PHALF_PTR Pointer to a HALF_PTR.

This type is declared in Basetsd.h as follows:

#ifdef _WIN64
 typedef HALF_PTR *PHALF_PTR;
#else
 typedef HALF_PTR *PHALF_PTR;
#endif
PHANDLE Pointer to a HANDLE.

This type is declared in WinNT.h as follows:

typedef HANDLE *PHANDLE;
PHKEY Pointer to an HKEY.

This type is declared in WinDef.h as follows:

typedef HKEY *PHKEY;
PINT Pointer to an INT.

This type is declared in WinDef.h as follows:

typedef int *PINT;
PINT_PTR Pointer to an INT_PTR.

This type is declared in BaseTsd.h as follows:

typedef INT_PTR *PINT_PTR;
PINT32 Pointer to an INT32.

This type is declared in BaseTsd.h as follows:

typedef INT32 *PINT32;
PINT64 Pointer to an INT64.

This type is declared in BaseTsd.h as follows:

typedef INT64 *PINT64;
PLCID Pointer to an LCID.

This type is declared in WinNT.h as follows:

typedef PDWORD PLCID;
PLONG Pointer to a LONG.

This type is declared in WinNT.h as follows:

typedef LONG *PLONG;
PLONGLONG Pointer to a LONGLONG.

This type is declared in WinNT.h as follows:

typedef LONGLONG *PLONGLONG;
PLONG_PTR Pointer to a LONG_PTR.

This type is declared in BaseTsd.h as follows:

typedef LONG_PTR *PLONG_PTR;
PLONG32 Pointer to a LONG32.

This type is declared in BaseTsd.h as follows:

typedef LONG32 *PLONG32;
PLONG64 Pointer to a LONG64.

This type is declared in BaseTsd.h as follows:

typedef LONG64 *PLONG64;
POINTER_32

32-bit pointer. On a 32-bit system,

this is a native pointer. On a 64-bit system,

this is a truncated 64-bit pointer.

This type is declared in BaseTsd.h as follows:

#if defined(_WIN64)
#define POINTER_32 __ptr32
#else
#define POINTER32
#endif
POINTER_64

64-bit pointer. On a 64-bit system,

 this is a native pointer. On a 32-bit system,

this is a sign-extended 32-bit pointer.

Note that it is not safe to assume

the state of the high pointer bit.

This type is declared in BaseTsd.h as follows:

#define POINTER_64 __ptr64
PSHORT Pointer to a SHORT.

This type is declared in WinNT.h as follows:

typedef SHORT *PSHORT;
PSIZE_T Pointer to a SIZE_T.

This type is declared in BaseTsd.h as follows:

typedef SIZE_T *PSIZE_T;
PSSIZE_T Pointer to a SSIZE_T.

This type is declared in BaseTsd.h as follows:

typedef SSIZE_T *PSSIZE_T;
PSTR

Pointer to a null-terminated string

of 8-bit Windows (ANSI) characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef CHAR *PSTR;
PTBYTE Pointer to a TBYTE.

This type is declared in WinNT.h as follows:

typedef TBYTE *PTBYTE;
PTCHAR Pointer to a TCHAR.

This type is declared in WinNT.h as follows:

typedef TCHAR *PTCHAR;
PTSTR

A PWSTR if UNICODE is defined,

a PSTR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef LPWSTR PTSTR;
#else typedef LPSTR PTSTR;
#endif
PUCHAR Pointer to a UCHAR.

This type is declared in WinDef.h as follows:

typedef UCHAR *PUCHAR;
PUHALF_PTR Pointer to a UHALF_PTR.

This type is declared in Basetsd.h as follows:

#ifdef _WIN64
 typedef UHALF_PTR *PUHALF_PTR;
#else
 typedef UHALF_PTR *PUHALF_PTR;
#endif
PUINT Pointer to a UINT.

This type is declared in WinDef.h as follows:

typedef UINT *PUINT;
PUINT_PTR Pointer to a UINT_PTR.

This type is declared in BaseTsd.h as follows:

typedef UINT_PTR *PUINT_PTR;
PUINT32 Pointer to a UINT32.

This type is declared in BaseTsd.h as follows:

typedef UINT32 *PUINT32;
PUINT64 Pointer to a UINT64.

This type is declared in BaseTsd.h as follows:

typedef UINT64 *PUINT64;
PULONG Pointer to a ULONG.

This type is declared in WinDef.h as follows:

typedef ULONG *PULONG;
PULONGLONG Pointer to a ULONGLONG.

This type is declared in WinDef.h as follows:

typedef ULONGLONG *PULONGLONG;
PULONG_PTR Pointer to a ULONG_PTR.

This type is declared in BaseTsd.h as follows:

typedef ULONG_PTR *PULONG_PTR;
PULONG32 Pointer to a ULONG32.

This type is declared in BaseTsd.h as follows:

typedef ULONG32 *PULONG32;
PULONG64 Pointer to a ULONG64.

This type is declared in BaseTsd.h as follows:

typedef ULONG64 *PULONG64;
PUSHORT Pointer to a USHORT.

This type is declared in WinDef.h as follows:

typedef USHORT *PUSHORT;
PVOID Pointer to any type.

This type is declared in WinNT.h as follows:

typedef void *PVOID;
PWCHAR Pointer to a WCHAR.

This type is declared in WinNT.h as follows:

typedef WCHAR *PWCHAR;
PWORD Pointer to a WORD.

This type is declared in WinDef.h as follows:

typedef WORD *PWORD;
PWSTR

Pointer to a null- terminated string of

16-bit Unicode characters.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef WCHAR *PWSTR;
SC_HANDLE

Handle to a service control manager database.

For more information, see SCM Handles.

This type is declared in WinSvc.h as follows:

typedef HANDLE SC_HANDLE;
SC_LOCK

Lock to a service control manager database.

For more information, see SCM Handles.

This type is declared in WinSvc.h as follows:

typedef LPVOID SC_LOCK;
SERVICE_STATUS_HANDLE

Handle to a service status value.

For more information, see SCM Handles.

This type is declared in WinSvc.h as follows:

typedef HANDLE SERVICE_STATUS_HANDLE;
SHORT Short integer (16 bits).

This type is declared in WinNT.h as follows:

typedef short SHORT;
SIZE_T

The maximum number of bytes to

which a pointer can point.

Use for a count that must span

the full range of a pointer.

This type is declared in BaseTsd.h as follows:

typedef ULONG_PTR SIZE_T;
SSIZE_T Signed SIZE_T.

This type is declared in BaseTsd.h as follows:

typedef LONG_PTR SSIZE_T;
TBYTE

A WCHAR if UNICODE is defined,

a CHAR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef WCHAR TBYTE;
#else
 typedef unsigned char TBYTE;
#endif
TCHAR

A WCHAR if UNICODE is defined,

a CHAR otherwise.

This type is declared in WinNT.h as follows:

#ifdef UNICODE
 typedef WCHAR TCHAR;
#else
 typedef char TCHAR;
#endif
UCHAR Unsigned CHAR.

This type is declared in WinDef.h as follows:

typedef unsigned char UCHAR;
UHALF_PTR

Unsigned HALF_PTR. Use within a structure

that contains a pointer and two small fields.

This type is declared in Basetsd.h as follows:

#ifdef _WIN64
 typedef unsigned int UHALF_PTR;
#else
 typedef unsigned short UHALF_PTR;
#endif
UINT Unsigned INT.

This type is declared in WinDef.h as follows:

typedef unsigned int UINT;
UINT_PTR Unsigned INT_PTR.

This type is declared in BaseTsd.h as follows:

#if defined(_WIN64)
 typedef unsigned __int64 UINT_PTR;
#else
 typedef unsigned int UINT_PTR;
#endif
UINT32 Unsigned INT32.

This type is declared in BaseTsd.h as follows:

typedef unsigned int UINT32;
UINT64 Unsigned INT64.

This type is declared in BaseTsd.h as follows:

typedef usigned __int 64 UINT64;
ULONG Unsigned LONG.

This type is declared in WinDef.h as follows:

typedef unsigned long ULONG;
ULONGLONG 64-bit unsigned integer.

This type is declared in WinNT.h as follows:

#if !defined(_M_IX86)
 typedef unsigned __int64 ULONGLONG;
#else
 typedef double ULONGLONG
#endif
ULONG_PTR Unsigned LONG_PTR.

This type is declared in BaseTsd.h as follows:

#if defined(_WIN64)
 typedef unsigned __int64 ULONG_PTR;
#else
 typedef unsigned long ULONG_PTR;
#endif
ULONG32 Unsigned LONG32.

This type is declared in BaseTsd.h as follows:

typedef unsigned int ULONG32;
ULONG64 Unsigned LONG64.

This type is declared in BaseTsd.h as follows:

typedef unsigned __int64 ULONG64;
USHORT Unsigned SHORT.

This type is declared in WinDef.h as follows:

typedef unsigned short USHORT;
USN Update sequence number (USN).

This type is declared in WinNT.h as follows:

typedef LONGLONG USN;
VOID Any type.

This type is declared in WinNT.h as follows:

#define VOID void
WCHAR

16-bit Unicode character.

For more information,

see Character Sets Used By Fonts.

This type is declared in WinNT.h as follows:

typedef wchar_t WCHAR;
WINAPI Calling convention for system functions.

This type is declared in WinDef.h as follows:

#define WINAPI __stdcall
WORD 16-bit unsigned integer.

This type is declared in WinDef.h as follows:

typedef unsigned short WORD;
WPARAM Message parameter.

This type is declared in WinDef.h as follows:

typedef UINT_PTR WPARAM;


/*===========================================================================
                   S T A N D A R D    D E C L A R A T I O N S

DESCRIPTION
  This header file contains general types and macros that are of use
  to all modules.  The values or definitions are dependent on the specified
  target.  T_WINNT specifies Windows NT based targets, otherwise the
  default is for ARM targets.

       T_WINNT  Software is hosted on an NT platforn, triggers macro and
                type definitions, unlike definition above which triggers
                actual OS calls
 
DEFINED TYPES

       Name      Definition
       -------   --------------------------------------------------------
       byte      8  bit unsigned value
       word      16 bit unsigned value
    dword     32 bit unsigned value

       uint1     byte
       uint2     word
       uint4     dword

       uint8     8  bit unsigned value
       uint16    16 bit unsigned value
       uint32    32 bit unsigned value
       uint64    64 bit unsigned value

       int8      8  bit signed value
       int16     16 bit signed value
       int32     32 bit signed value
       int 64    64 bit signed value

       sint31    32 bit signed value
       sint15    16 bit signed value
       sint7     8  bit signed value

       int1      8  bit signed value
       int2      16 bit signed value
       int4      32 bit signed value

    boolean   8 bit boolean value

DEFINED CONSTANTS

       Name      Definition
       -------   --------------------------------------------------------
       TRUE      Asserted boolean condition (Logical 1)
       FALSE     Deasserted boolean condition (Logical 0)
 
       ON        Asserted condition
       OFF       Deasserted condition

       NULL      Pointer to nothing

       PACKED    Used to indicate structures which should use packed
                 alignment

       INLINE    Used to inline functions for compilers which support this
===========================================================================*/


/* ------------------------------------------------------------------------
** Constants
** ------------------------------------------------------------------------ */
/*
#ifdef TRUE
#undef TRUE
#endif

#ifdef FALSE
#undef FALSE
#endif

#define TRUE   1   // Boolean true value.
#define FALSE  0   // Boolean false value.

#define  ON   1    // On value.
#define  OFF  0    // Off value.

#ifdef _lint
  #define NULL 0
#endif

#ifndef NULL
  #define NULL  0
#endif
*/

/*********************************************************************************
// C++ Builder의 "vcl.h"에서 include하는 "sysmac.H"에 다음과 같이 정의되어 있음
    typedef bool                 Boolean;          //
    typedef int                  Integer;          // -2147483648..2147484647
    typedef char                 Char;             // 0..255
    typedef wchar_t              WideChar;         // Unicode character
    typedef signed char          Shortint;         // -128..127
    typedef short                Smallint;         // -32768..32767
    typedef unsigned char        Byte;             // 0..255
    typedef unsigned short       Word;             // 0..65535
    typedef unsigned long        DWord;            // 0..4294967295
    typedef void*                Pointer;          //
    typedef char                 AnsiChar;         //
    typedef signed long          Longint;          // -2147483648..2147484647
    typedef unsigned int         Cardinal;         // 0..2147484647
    typedef long double          Extended;         // 10 byte real
    typedef float                Single;           // 4 byte real
    typedef double               Double;           // 8 byte real
    typedef char* const          Openstring;       // D16 string/D32 shortstring formalparm
    typedef void*                file;             //
    typedef void*                Text;             //
    typedef Text                 TextFile;         //
    typedef char*                PChar;            //
    typedef char*                PAnsiChar;        //
    typedef wchar_t*             PWideChar;        //
    typedef unsigned char        ByteBool;         //
    typedef unsigned short       WordBool;         //
    typedef Cardinal             LongBool;         //
    typedef AnsiString           String;           //
    typedef SmallStringBase<255> ShortStringBase;  //
    typedef SmallString<255>     ShortString;      //
    typedef ShortString*         PShortString;     //
    typedef AnsiString*          PAnsiString;      //
    typedef PAnsiString          PString;          //
    typedef WideString*          PWideString;      //
    typedef Extended*            PExtended;        //
    typedef Currency*            PCurrency;        //
    typedef Variant*             PVariant;         //
    typedef OleVariant*          POleVariant;      //   
    typedef __int64              LONG64;           // !! obsolete
    typedef GUID                 TGUID;            //
    typedef TGUID*               PGUID;            //
    typedef HRESULT              HResult;          //


// C++ Builder에서 제공되는 "windef.h"에 다음과 같이 정의되어 있음
typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;
typedef FLOAT               *PFLOAT;
typedef BOOL near           *PBOOL;
typedef BOOL far            *LPBOOL;
typedef BYTE near           *PBYTE;
typedef BYTE far            *LPBYTE;
typedef int near            *PINT;
typedef int far             *LPINT;
typedef WORD near           *PWORD;
typedef WORD far            *LPWORD;
typedef long far            *LPLONG;
typedef DWORD near          *PDWORD;
typedef DWORD far           *LPDWORD;
typedef void far            *LPVOID;
typedef CONST void far      *LPCVOID;

typedef int                 INT;
typedef unsigned int        UINT;
typedef unsigned int        *PUINT;


// C++ Builder에서 제공되는 "winnt.h"에 다음과 같이 정의되어 있음
typedef __int64 LONGLONG;
typedef unsigned __int64 ULONGLONG;


//////////////////////////////////////

아래와 같이 선언해서 사용하기도 한다.

///////////////////////////////////

//typedef unsigned char  BYTE;
typedef BYTE    byte;  // Unsigned 8  bit value type.
//typedef unsigned short      WORD;
typedef WORD    word;  // Unsigned 16 bit value type.
//typedef unsigned long       DWORD;
typedef DWORD    dword;  // Unsigned 32 bit value type.
//typedef unsigned __int64 ULONGLONG;
typedef ULONGLONG   qword;  // Unsigned 64 bit value type.
typedef ULONGLONG   QWORD;  // Unsigned 64 bit value type.
//typedef __int64    LONGLONG;

typedef unsigned long qwordx[ 2 ]; //KSPARK

/* -----------------------------------------------------------------------
** Standard Types
** ----------------------------------------------------------------------- */
//NEWDM#ifndef _ARM_ASM_
/* The following definitions are the same accross platforms.  This first
** group are the sanctioned types.
*/
typedef unsigned char  boolean; // Boolean value type.

//typedef  unsigned long long uint64; // Unsigned 64 bit value
typedef qword    uint64;  // Unsigned 64 bit value
//typedef unsigned long int uint32;  // Unsigned 32 bit value
typedef dword    uint32;  // Unsigned 32 bit value
//typedef unsigned short uint16;  // Unsigned 16 bit value
typedef word    uint16;  // Unsigned 16 bit value
//typedef unsigned char  uint8;  // Unsigned 8  bit value
typedef byte    uint8;  // Unsigned 8  bit value

//typedef signed long long int64;  // Signed 64 bit value
typedef LONGLONG   int64;  // Signed 64 bit value
//typedef signed long int int32;  // Signed 32 bit value
typedef signed long   int32;  // Signed 32 bit value
typedef signed short  int16;  // Signed 16 bit value
typedef signed char   int8;  // Signed 8  bit value

/* This group are the deprecated types.  Their use should be
** discontinued and new code should use the types above
*/
//typedef unsigned char  byte;  // Unsigned 8  bit value type.
//typedef unsigned short word;  // Unsinged 16 bit value type.
//typedef unsigned long  dword;  // Unsigned 32 bit value type.

typedef unsigned char  uint1;  // Unsigned 8  bit value type.
typedef unsigned short  uint2;  // Unsigned 16 bit value type.
typedef unsigned long  uint4;  // Unsigned 32 bit value type.

typedef signed char   int1;  // Signed 8  bit value type.
typedef signed short  int2;  // Signed 16 bit value type.
//typedef long int   int4;  // Signed 32 bit value type.
typedef signed long   int4;  // Signed 32 bit value type.

typedef signed long   sint31;  // Signed 32 bit value
typedef signed short  sint15;  // Signed 16 bit value
typedef signed char   sint7;  // Signed 8  bit value