Share via


General Data Types

OverviewHow Do I

The following table summarizes the new standard types defined in WINDOWS.H. These types are polymorphic (they can contain different kinds of data) and are generally useful throughout applications. Other new types, handles, and function pointers also are introduced in other topics (listed in New Types and Macros). Also see in the Win32 documentation.

Typedef Description
WINAPI Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs.
CALLBACK Use in place of FAR PASCAL in application callback routines such as window procedures and dialog procedures.
LPCSTR Same as LPSTR, except used for read-only string pointers. Defined as (const char FAR*).
UINT Portable unsigned integer type whose size is determined by host environment (32 bits for Windows NT and Windows 95). Synonym for unsigned int. Used in place of WORD except in the rare cases where a 16-bit unsigned quantity is desired even on 32-bit platforms.
LRESULT Type used for return value of window procedures.
LPARAM Type used for declaration of lParam, the fourth parameter of a windows procedure.
WPARAM Type used for declaration of wParam, the third parameter of a windows procedure (a polymorphic data type).
LPVOID Generic pointer type, equivalent to (void *). Should be used instead of LPSTR.