Windows Data Types
Data Types
Value Meaning
ATOM Atom. For more information, see Atoms.
BOOL Boolean variable (should be TRUE or FALSE).
BOOLEAN Boolean variable (should be TRUE or FALSE).
BYTE Byte (8 bits).
CALLBACK Calling convention for callback functions.
CHAR 8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts.
COLORREF Red, green, blue (RGB) color value (32 bits). See COLORREF for information on this type.
CONST Variable whose value is to remain constant during execution.
CRITICAL_SECTION Critical-section object. For more information, see Critical Section Objects.
DWORD 32-bit unsigned integer.
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. )
DWORD32 32-bit unsigned integer.
DWORD64 64-bit unsigned integer.
FLOAT Floating-point variable.
HACCEL Handle to an accelerator table.
HANDLE Handle to an object.
HBITMAP Handle to a bitmap.
HBRUSH Handle to a brush.
HCONV Handle to a dynamic data exchange (DDE) conversation.
HCONVLIST Handle to a DDE conversation list.
HCURSOR Handle to a cursor.
HDC Handle to a device context (DC).
HDDEDATA Handle to DDE data.
HDESK Handle to a desktop.
HDROP Handle to an internal drop structure.
HDWP Handle to a deferred window position structure.
HENHMETAFILE Handle to an enhanced metafile.
HFILE Handle to a file opened by OpenFile, not CreateFile.
HFONT Handle to a font.
HGDIOBJ Handle to a GDI object.
HGLOBAL Handle to a global memory block.
HHOOK Handle to a hook.
HICON Handle to an icon.
HIMAGELIST Handle to an image list.
HIMC Handle to input context.
HINSTANCE Handle to an instance.
HKEY Handle to a registry key.
HKL Input locale identifier.
HLOCAL Handle to a local memory block.
HMENU Handle to a menu.
HMETAFILE Handle to a metafile.
HMODULE Handle to a module. The value is the base address of the module.
HMONITOR Handle to a display monitor.
HPALETTE Handle to a palette.
HPEN Handle to a pen.
HRGN Handle to a region.
HRSRC Handle to a resource.
HSZ Handle to a DDE string.
HWINSTA Handle to a window station.
HWND Handle to a window.
INT 32-bit signed integer.
INT_PTR Signed integral type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic.
INT32 32-bit signed integer.
INT64 64-bit signed integer.
LANGID Language identifier. For more information, see Locales.
LCID Locale identifier. For more information, see Locales.
LCTYPE Locale information type. For a list, see Locale and Language Information.
LONG 32-bit signed integer.
LONG_PTR Signed long type for pointer precision. Use when casting a pointer to a long to perform pointer arithmetic.
LONG32 32-bit signed integer.
LONG64 64-bit signed integer.
LONGLONG 64-bit signed integer.
LPARAM Message parameter.
LPBOOL Pointer to a BOOL.
LPBYTE Pointer to a BYTE.
LPCOLORREF Pointer to a COLORREF value.
LPCRITICAL_SECTION Pointer to a CRITICAL_SECTION.
LPCSTR Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPCTSTR An LPCWSTR if UNICODE is defined, an LPCTSTR otherwise.
LPCVOID Pointer to a constant of any type.
LPCWSTR Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LPDWORD Pointer to a DWORD.
LPHANDLE Pointer to a HANDLE.
LPINT Pointer to an INT.
LPLONG Pointer to a LONG.
LPSTR Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPTSTR An LPWSTR if UNICODE is defined, an LPSTR otherwise.
LPVOID Pointer to any type.
LPWORD Pointer to a WORD.
LPWSTR Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LRESULT Signed result of message processing.
LUID Locally unique identifier.
PBOOL Pointer to a BOOL.
PBOOLEAN Pointer to a BOOL.
PBYTE Pointer to a BYTE.
PCHAR Pointer to a CHAR.
PCRITICAL_SECTION Pointer to a CRITICAL_SECTION.
PCSTR Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PCTSTR A PCWSTR if UNICODE is defined, a PCSTR otherwise.
PCWCH Pointer to a constant WCHAR.
PCWSTR Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
PDWORD Pointer to a DWORD.
PFLOAT Pointer to a FLOAT.
PHANDLE Pointer to a HANDLE.
PHKEY Pointer to an HKEY.
PINT Pointer to an INT.
PLCID Pointer to an LCID.
PLONG Pointer to a LONG.
PLUID Pointer to a LUID.
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.
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.
PSHORT Pointer to a SHORT.
PSTR Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PTBYTE Pointer to a TBYTE.
PTCHAR Pointer to a TCHAR.
PTSTR PWSTR if UNICODE is defined, a PSTR otherwise.
PTBYTE Pointer to a TBYTE.
PTCHAR Pointer to a TCHAR.
PTSTR A PWSTR if UNICODE is defined, a PSTR otherwise.
PUCHAR Pointer to a UCHAR.
PUINT Pointer to a UINT.
PULONG Pointer to a ULONG.
PUSHORT Pointer to a USHORT.
PVOID Pointer to any type.
PWCHAR Pointer to a WCHAR.
PWORD Pointer to a WORD.
PWSTR Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
REGSAM Security access mask for registry key.
SC_HANDLE Handle to a service control manager database. For more information, see SCM Handles.
SC_LOCK Handle to a service control manager database lock. For more information, see SCM Handles.
SERVICE_STATUS_HANDLE Handle to a service status value. For more information, see SCM Handles.
SHORT Short integer (16 bits).
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.
SSIZE_ T Signed SIZE_T.
TBYTE A WCHAR if UNICODE is defined, a CHAR otherwise.
TCHAR A WCHAR if UNICODE is defined, a CHAR otherwise.
UCHAR Unsigned CHAR.
UINT Unsigned INT.
UINT_PTR Unsigned INT_PTR.
UINT32 Unsigned INT32.
UINT64 Unsigned INT64.
ULONG Unsigned LONG.
ULONG_PTR Unsigned LONG_PTR.
ULONG32 Unsigned LONG32.
ULONG64 Unsigned LONG64.
ULONGLONG 64-bit unsigned integer.
UNSIGNED Unsigned attribute.
USHORT Unsigned SHORT.
VOID Any type.
WCHAR 16-bit Unicode character. For more information, see Character Sets Used By Fonts.
WINAPI Calling convention for system functions.
WORD 16-bit unsigned integer.
WPARAM Message parameter.
中文版的:
ATOM 原子(原子表中的一个字符串的参考)
BOOL 布尔变量
BOOLEAN 布尔变量
BYTE 字节(8位)
CCHAR Windows字符
CHAR Windows字符
COLORREF 红、绿、蓝(RGB)彩色值(32位)
Const 变量,该变量的值在执行期间保持为常量
CRITICAL_SECTION 临界段对象
CTRYID 国名标识符
DLGPROC 指向一个对话框过程的指针
DWORD 双字(32位)
ENHMFENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举增强的元文件记录
ENUMRESLANGPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举资源语言。
ENUMRESNAMEPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举资源名称。
ENUMRESTYPEPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举资源类型。
FARPROC 指向一个回调函数的指针
FLOAT 浮点变量
FMORDER 32位字体映射值的数组
FONTENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举字体
GOBJENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举图形设备接口(GDI)对象
HACCEL 加速键表句柄
HANDLE 对象的句柄
HBITMAP 位图句柄
HBRUSH 画刷句柄
HCONV 动态数据交换(DDE)会话句柄
HCONVLIST DDE 会话句柄
HCURSOR 光标句柄
HDC 设备描述表(DC)句柄
HDDEDATA DDE 数据句柄
HDLG 对话框句柄
HDWP 延期窗口位置结构句柄
HENHMETAFILE 增强原文件句柄
HFILE 文件句柄
HFONT 字体句柄
HGDIOBJ GDI 对象句柄
HGLOBAL 全局内存块句柄
HHOOK 钩子句柄
HICON 图标句柄
HINSTANCE 实例句柄
HKEY 登记关键字句柄
HLOCAL 局部内存块句柄
HMEMU 菜单句柄
HMETAFILE 元文件句柄
HMIDIIN 乐器的数字化接口(MIDI)输入文件句柄
HMIDIOUT MIDI 输出文件句柄
HMMIO 文件句柄
HOOKPROC 指向一个应用程序定义的钩子函数的指针
HPALETTE 调色板句柄
HPEN 画笔句柄
HRGN 域句柄
HRSRC 资源句柄
HSZ DDE 字符串句柄
HWAVEIN 波形输入文件句柄
HWAVEOUT 波形输出文件句柄
HWINSTA 工作站句柄
HWND 窗口句柄
INT 符号整数
LANGID 语言标识符
LCID 所在国(Locale)标识符
LCTYPE 所在国类型
LINEDDAPROC 指向一个回调函数的指针,该回调函数处理行坐标
LONG 32位符号整数
LP 指向一个以"NULL"结束的Unicode(TM)字符串的指针
LPARAM 32位消息参数
LPBOOL 指向一个布尔变量的指针
LPBYTE 指向一个字节的指针
LPCCH 指向一个Windows字符常量的指针
LPCCHOOKPROC 指向一个应用程序定义的钩子函数的指针
LPCFHOOLPROC 指向一个应用程序定义的钩子函数的指针
LPCH 指向一个Windows字符的指针
LPCOLORREF 指向一个COLORREF值的指针
LPCRITICAL_SECTION 指向一个临界段对象的指针
LPCSTR 指向一个以"NULL"结束的WINDOWS字符串常量的指针
LPCTSTR 指向一个以"NULL"结束的Unicode或Windows字符串常量的指针
LPCWCH 指向一个以"NULL"指向一个以"NULL"结束的Unicode字符常量的指针
LPCWSTR 指向一个以"NULL"指向一个以"NULL"结束的Unicode字符串常量的指针
LPDWORD 指向一个无符号双字(32位)的指针
LPFRHOOLPROC 指向一个应用程序定义的钩子函数的指针
LPHANDLE 指向一个句柄的指针
LOHANDLER_FUNCTION 指向一个处理程序函数的指针
LPHWAVEIN 指向一个波形输入文件句柄的指针
LPHWAVEOUT 指向一个波形输出文件句柄的指针
LPINT 指向一个符号整数的指针
LPLONG 指向一个符号长整数(32位)的指针
LPOFNHOOKPROC 指向一个应用程序定义的钩子函数的指针
LPPRINTHOOKPROC 指向一个应用程序定义的钩子函数的指针
LPSETUPHOOKPROC 指向一个应用程序定义的钩子函数的指针
LPTSTR 指向一个以NULL结束的Unicode或Windows字符串的指针
LRESULT 消息处理的符号结果
LPVOID 指向任何类型的指针
LPWSTR 指向一个以"NULL"结束的Unicode字符串的指针
LUID 局部唯一的标识符
MCIDEVICEID 媒体控制接口(MCI)设备标识符
MFENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举元文件记录
MMRESULT 多媒体消息的处理结果
NPSTR 指向一个以"NULL"结束的Windows字符串的指针
NWPSTR 指向一个以"NULL"结束的Unicode字符串的指针
PBOOL 指向一个布尔变量的指针
PBYTE 指向一个字节的指针
PCCH 指向一个Windows字符常量的指针
PCH 指向一个Windows字符的指针
PCHAR 指向一个Windows字符的指针
PCRITICAL_SECTION 指向一个临界段对象的指针
PCSTR 指向一个以"NULL"结束的Windows字符串常量的指针
PCWCH 指向一个Unicode字符常量的指针
PCWSTR 指向一个以"NULL"结束的Unicode字符串常量的指针
PDWORD 指向一个无符号双字的指针
PFLOAT 指向一个浮点变量的指针
PFNCALLBACK 指向一个回调函数的指针
PHANDLE 指向一个句柄的指针
PHANDLER_ROUTINE 指向一个处理程序的指针
PHKEY 指向一个登记关键字的指针
PINT 指向一个符号整数的指针
PLONG 指向一个符号长整数的指针
PLUID 指向一个局部唯一的表示符(LUID)的指针
PROPENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举窗口特征
PSHORT 指向一个符号短整数的指针
PSID 指向一个加密标识符(SID)的指针
PSTR 指向一个以"NULL"结束的Windows字符串的指针
PSZ 指向一个以"NULL"结束的Windows字符串的指针
PTCH 指向一个Windows或Unicode字符的指针
PTCHAR 指向一个Windows或Unicode字符的指针
PTSTR 指向一个以"NULL"结束的Windows或Unicode字符串的指针
PUCHAR 指向一个无符号Windows字符的指针
PUINT 指向一个无符号整数的指针
PULONG 指向一个无符号长整数的指针
PUSHORT 指向一个无符号短整数的指针
PVOID 指向任何类型的指针
PWCH 指向一个Unicode字符的指针
PWCHAR 指向一个Unicode字符的指针
PWORD 指向一个无符号字的指针
PWSTR 指向一个以"NULL"结束的Unicode字符串的指针
REGSAM 登记关键字的加密掩码
SC_HANDLE 服务句柄
SERVICE_STATUS_HANDLE 服务状态值句柄
SHORT 短整数
SPHANDLE 指向一个句柄的指针
TCHAR Unicode或Windows字符
TIMERPROC 指向一个应用程序定义的定时器回调函数的指针
UCHAR 无符号Windows字符
UINT 无符号整数
ULONG 无符号长整数
USHORT 无符号短整数
VOID 任何类型
WCHAR Unicode字符
WNDENUMPROC 指向一个应用程序定义的回调函数的指针,该回调函数枚举窗口
WNDPROC 指向一个应用程序定义的窗口过程的指针
WORD 无符号字(16位)
WPARAM 32位消息参数
YIELDPROC 指向一个输出回调函数的指针