Windows Data Types
| Term | Description |
| ATOM | Atom. typedef WORD ATOM; |
| BOOL | Boolean variable (should be TRUE or FALSE) typedef int BOOL; |
| BOOLEAN | Boolean variable (should be TRUE or FALSE) typedef BYTE BOOLEAN; |
| BYTE | Byte (8 bits) typedef unsigned char BYTE; |
| CALLBACK | Calling convention for callback functions #define CALLBACK __stdcall |
| CHAR | 8-bit Windows (ANSI) character. typedef char CHAR; |
| COLORREF | Red, green, blue (RGB) color value (32 bits). typedef DWORD COLORREF; |
| CONST | Variable whose value is to remain constant during execution #define CONST const |
| DWORD | 32-bit unsigned integer typedef unsigned long DWORD; |
| DWORDLONG | 64-bit unsigned integer 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. ) typedef ULONG_PTR DWORD_PTR; |
| DWORD32 | 32-bit unsigned integer typedef unsigned int DWORD32; |
| DWORD64 | 64-bit unsigned integer typedef unsigned __int64 DWORD64; |
| FLOAT | Floating-point variable typedef float FLOAT; |
| HACCEL | Handle to an accelerator table typedef HANDLE HACCEL; |
| HALF_PTR | Half the size of a pointer. Use within a structure that contains a pointer and two small fields #ifdef _WIN64 typedef int HALF_PTR; #else typedef short HALF_PTR; #endif |
| HANDLE | Handle to an object typedef PVOID HANDLE; |
| HBITMAP | Handle to a bitmap typedef HANDLE HBITMAP; |
| HBRUSH | Handle to a brush typedef HANDLE HBRUSH; |
| HCOLORSPACE | Handle to a color space #if(WINVER >= 0x0400) typedef HANDLE HCOLORSPACE; #endif |
| HCONV | Handle to a dynamic data exchange (DDE) conversation typedef HANDLE HCONV; |
| HCONVLIST | Handle to a DDE conversation list typedef HANDLE HCONVLIST; |
| HCURSOR | Handle to a cursor typedef HICON HCURSOR; |
| HDC | Handle to a device context (DC) typedef HANDLE HDC; |
| HDDEDATA | Handle to DDE data typedef HANDLE HDDEDATA; |
| HDESK | Handle to a desktop typedef HANDLE HDESK; |
| HDROP | Handle to an internal drop structure typedef HANDLE HDROP; |
| HDWP | Handle to a deferred window position structure typedef HANDLE HDWP; |
| HENHMETAFILE | Handle to an enhanced metafile typedef HANDLE HENHMETAFILE; |
| HFILE | Handle to a file opened by OpenFile, not CreateFile typedef int HFILE; |
| HFONT | Handle to a font typedef HANDLE HFONT; |
| HGDIOBJ | Handle to a GDI object typedef HANDLE HGDIOBJ; |
| HGLOBAL | Handle to a global memory block typedef HANDLE HGLOBAL; |
| HHOOK | Handle to a hook typedef HANDLE HHOOK; |
| HICON | Handle to an icon typedef HANDLE HICON; |
| HINSTANCE | Handle to an instance typedef HANDLE HINSTANCE; |
| HKEY | Handle to a registry key typedef HANDLE HKEY; |
| HKL | Input locale identifier typedef HANDLE HKL; |
| HLOCAL | Handle to a local memory block typedef HANDLE HLOCAL; |
| HMENU | Handle to a menu typedef HANDLE HMENU; |
| HMETAFILE | Handle to a metafile typedef HANDLE HMETAFILE; |
| HMODULE | Handle to a module. The value is the base address of the module typedef HINSTANCE HMODULE; |
| HMONITOR | Handle to a display monitor if(WINVER >= 0x0500) typedef HANDLE HMONITOR; |
| HPALETTE | Handle to a palette typedef HANDLE HPALETTE; |
| HPEN | Handle to a pen typedef HANDLE HPEN; |
| HRESULT | Return code used by interfaces. It is zero upon success and nonzero to represent an error code or status information typedef LONG HRESULT; |
| HRGN | Handle to a region typedef HANDLE HRGN; |
| HRSRC | Handle to a resource typedef HANDLE HRSRC; |
| HSZ | Handle to a DDE string typedef HANDLE HSZ; |
| HWINSTA | Handle to a window station typedef HANDLE WINSTA; |
| HWND | Handle to a window typedef HANDLE HWND; |
| INT | 32-bit signed integer typedef int INT; |
| INT_PTR | Signed integer type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic #if defined(_WIN64) typedef __int64 INT_PTR; #else typedef int INT_PTR; #endif |
| INT32 | 32-bit signed integer typedef signed int INT32; |
| INT64 | 64-bit signed integer typedef signed __int64 INT64; |
| LANGID | Language identifier. typedef WORD LANGID; |
| LCID | Locale identifier. typedef DWORD LCID; |
| LCTYPE | Locale information type. typedef DWORD LCTYPE; |
| LGRPID | Language group identifier. typedef DWORD LGRPID; |
| LONG | 32-bit signed integer typedef long LONG; |
| LONGLONG | 64-bit signed integer #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 #if defined(_WIN64) typedef __int64 LONG_PTR; #else typedef long LONG_PTR; #endif |
| LONG32 | 32-bit signed integer typedef signed int LONG32; |
| LONG64 | 64-bit signed integer typedef __int64 LONG64; |
| LPARAM | Message parameter typedef LONG_PTR LPARAM; |
| LPBOOL | Pointer to a BOOL typedef BOOL far *LPBOOL; |
| LPBYTE | Pointer to a BYTE typedef BYTE far *LPBYTE; |
| LPCOLORREF | Pointer to a COLORREF value typedef DWORD *LPCOLORREF; |
| LPCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. typedef __nullterminated CONST CHAR *LPCSTR; |
| LPCTSTR | An LPCWSTR if UNICODE is defined, an LPCSTR otherwise #ifdef UNICODE typedef LPCWSTR LPCTSTR; #else typedef LPCSTR LPCTSTR; #endif |
| LPCVOID | Pointer to a constant of any type typedef CONST void *LPCVOID; |
| LPCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. typedef CONST WCHAR *LPCWSTR; |
| LPDWORD | Pointer to a DWORD typedef DWORD *LPDWORD; |
| LPHANDLE | Pointer to a HANDLE typedef HANDLE *LPHANDLE; |
| LPINT | Pointer to an INT typedef int *LPINT; |
| LPLONG | Pointer to a LONG typedef long *LPLONG; |
| LPSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. typedef CHAR *LPSTR; |
| LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise #ifdef UNICODE typedef LPWSTR LPTSTR; #else typedef LPSTR LPTSTR; #endif |
| LPVOID | Pointer to any type typedef void *LPVOID; |
| LPWORD | Pointer to a WORD typedef WORD *LPWORD; |
| LPWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. typedef WCHAR *LPWSTR; |
| LRESULT | Signed result of message processing typedef LONG_PTR LRESULT; |
| PBOOL | Pointer to a BOOL typedef BOOL *PBOOL; |
| PBOOLEAN | Pointer to a BOOL typedef BOOLEAN *PBOOLEAN; |
| PBYTE | Pointer to a BYTE typedef BYTE *PBYTE; |
| PCHAR | Pointer to a CHAR typedef CHAR *PCHAR; |
| PCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. typedef CONST CHAR *PCSTR; |
| PCTSTR | A PCWSTR if UNICODE is defined, a PCSTR otherwise #ifdef UNICODE typedef LPCWSTR PCTSTR; #else typedef LPCSTR PCTSTR; #endif |
| PCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. typedef CONST WCHAR *PCWSTR; |
| PDWORD | Pointer to a DWORD typedef DWORD *PDWORD; |
| PDWORDLONG | Pointer to a DWORDLONG typedef DWORDLONG *PDWORDLONG; |
| PDWORD_PTR | Pointer to a DWORD_PTR typedef DWORD_PTR *PDWORD_PTR; |
| PDWORD32 | Pointer to a DWORD32 typedef DWORD32 *PDWORD32; |
| PDWORD64 | Pointer to a DWORD64 typedef DWORD64 *PDWORD64; |
| PFLOAT | Pointer to a FLOAT typedef FLOAT *PFLOAT; |
| PHALF_PTR | Pointer to a HALF_PTR #ifdef _WIN64 typedef HALF_PTR *PHALF_PTR; #else typedef HALF_PTR *PHALF_PTR; #endif |
| PHANDLE | Pointer to a HANDLE typedef HANDLE *PHANDLE; |
| PHKEY | Pointer to an HKEY typedef HKEY *PHKEY; |
| PINT | Pointer to an INT typedef int *PINT; |
| PINT_PTR | Pointer to an INT_PTR typedef INT_PTR *PINT_PTR; |
| PINT32 | Pointer to an INT32 typedef INT32 *PINT32; |
| PINT64 | Pointer to an INT64 typedef INT64 *PINT64; |
| PLCID | Pointer to an LCID typedef PDWORD PLCID; |
| PLONG | Pointer to a LONG typedef LONG *PLONG; |
| PLONGLONG | Pointer to a LONGLONG typedef LONGLONG *PLONGLONG; |
| PLONG_PTR | Pointer to a LONG_PTR typedef LONG_PTR *PLONG_PTR; |
| PLONG32 | Pointer to a LONG32 typedef LONG32 *PLONG32; |
| PLONG64 | Pointer to a LONG64 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 #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 #define POINTER_64 __ptr64 |
| PSHORT | Pointer to a SHORT typedef SHORT *PSHORT; |
| PSIZE_T | Pointer to a SIZE_T typedef SIZE_T *PSIZE_T; |
| PSSIZE_T | Pointer to a SSIZE_T typedef SSIZE_T *PSSIZE_T; |
| PSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. typedef CHAR *PSTR; |
| PTBYTE | Pointer to a TBYTE typedef TBYTE *PTBYTE; |
| PTCHAR | Pointer to a TCHAR typedef TCHAR *PTCHAR; |
| PTSTR | A PWSTR if UNICODE is defined, a PSTR otherwise #ifdef UNICODE typedef LPWSTR PTSTR; #else typedef LPSTR PTSTR; #endif |
| PUCHAR | Pointer to a UCHAR typedef UCHAR *PUCHAR; |
| PUHALF_PTR | Pointer to a UHALF_PTR #ifdef _WIN64 typedef UHALF_PTR *PUHALF_PTR; #else typedef UHALF_PTR *PUHALF_PTR; #endif |
| PUINT | Pointer to a UINT typedef UINT *PUINT; |
| PUINT_PTR | Pointer to a UINT_PTR typedef UINT_PTR *PUINT_PTR; |
| PUINT32 | Pointer to a UINT32 typedef UINT32 *PUINT32; |
| PUINT64 | Pointer to a UINT64 typedef UINT64 *PUINT64; |
| PULONG | Pointer to a ULONG typedef ULONG *PULONG; |
| PULONGLONG | Pointer to a ULONGLONG typedef ULONGLONG *PULONGLONG; |
| PULONG_PTR | Pointer to a ULONG_PTR typedef ULONG_PTR *PULONG_PTR; |
| PULONG32 | Pointer to a ULONG32 typedef ULONG32 *PULONG32; |
| PULONG64 | Pointer to a ULONG64 typedef ULONG64 *PULONG64; |
| PUSHORT | Pointer to a USHORT typedef USHORT *PUSHORT; |
| PVOID | Pointer to any type typedef void *PVOID; |
| PWCHAR | Pointer to a WCHAR typedef WCHAR *PWCHAR; |
| PWORD | Pointer to a WORD typedef WORD *PWORD; |
| PWSTR | Pointer to a null- terminated string of 16-bit Unicode characters. typedef WCHAR *PWSTR; |
| SC_HANDLE | Handle to a service control manager database. typedef HANDLE SC_HANDLE; |
| SC_LOCK | Lock to a service control manager database. typedef LPVOID SC_LOCK; |
| SERVICE_STATUS_HANDLE | Handle to a service status value. typedef HANDLE SERVICE_STATUS_HANDLE; |
| SHORT | Short integer (16 bits) 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 typedef ULONG_PTR SIZE_T; |
| SSIZE_T | Signed SIZE_T typedef LONG_PTR SSIZE_T; |
| TBYTE | A WCHAR if UNICODE is defined, a CHAR otherwise #ifdef UNICODE typedef WCHAR TBYTE; #else typedef unsigned char TBYTE; #endif |
| TCHAR | A WCHAR if UNICODE is defined, a CHAR otherwise #ifdef UNICODE typedef WCHAR TCHAR; #else typedef char TCHAR; #endif |
| UCHAR | Unsigned CHAR typedef unsigned char UCHAR; |
| UHALF_PTR | Unsigned HALF_PTR. Use within a structure that contains a pointer and two small fields #ifdef _WIN64 typedef unsigned int UHALF_PTR; #else typedef unsigned short UHALF_PTR; #endif |
| UINT | Unsigned INT typedef unsigned int UINT; |
| UINT_PTR | Unsigned INT_PTR #if defined(_WIN64) typedef unsigned __int64 UINT_PTR; #else typedef unsigned int UINT_PTR; #endif |
| UINT32 | Unsigned INT32 typedef unsigned int UINT32; |
| UINT64 | Unsigned INT64 typedef usigned __int 64 UINT64; |
| ULONG | Unsigned LONG typedef unsigned long ULONG; |
| ULONGLONG | 64-bit unsigned integer #if !defined(_M_IX86) typedef unsigned __int64 ULONGLONG; #else typedef double ULONGLONG #endif |
| ULONG_PTR | Unsigned LONG_PTR #if defined(_WIN64) typedef unsigned __int64 ULONG_PTR; #else typedef unsigned long ULONG_PTR; #endif |
| ULONG32 | Unsigned LONG32 typedef unsigned int ULONG32; |
| ULONG64 | Unsigned LONG64 typedef unsigned __int64 ULONG64; |
| USHORT | Unsigned SHORT typedef unsigned short USHORT; |
| USN | Update sequence number (USN) typedef LONGLONG USN; |
| VOID | Any type #define VOID void |
| WCHAR | 16-bit Unicode character. typedef wchar_t WCHAR; |
| WINAPI | Calling convention for system functions #define WINAPI __stdcall |
| WORD | 16-bit unsigned integer typedef unsigned short WORD; |
| WPARAM | Message parameter typedef UINT_PTR WPARAM; |
Comments