Windows Data Types
Windows数据类型 | 本质类型 | 字节数 | 定义过程(来历) | 含义 |
ATOM | unsigned short | 2 | unsigned short→WORD→ATOM | 在Atom表中,一键(16位整数)一值(一个String)为一个Atom。 |
BOOL | int | * | int→BOOL | 逻辑变量,布尔值 (取值为 TRUE 或 FALSE) |
BOOLEAN | unsigned char | 1 | unsigned char→BYTE→BOOLEAN | 逻辑变量,布尔值 (取值为 TRUE 或 FALSE) |
BYTE | unsigned char | 1 | unsigned char→BYTE | 字节型,8位。 |
CALLBACK | __stdcall | 调用 | __stdcall→CALLBACK | 回调函数的调用约定 |
CHAR | char | 1 | char→CHAR | 8位Windows字符(ANSI) |
COLORREF | unsigned long | 4 | unsigned long→DWORD→COLORREF | 红,绿,蓝(RGB)值 |
CONST | const | 关键字 | const→CONST | 常量 |
CRITICAL_SECTION | RTL_CRITICAL_SECTION结构体 | ? | RTL_CRITICAL_SECTION(结构)→CRITICAL_SECTION | Critical-section对象 |
DWORD | unsigned long | 4 | unsigned long→DWORD | 32位无符号整数 |
DWORD_PTR | unsigned long | 4 | unsigned long→ULONG_PTR→DWORD_PTR(另有其它路径) | 略……(用处挺大,不过太长了) |
DWORD32 | unsigned int | * | unsigned int→DWORD32 | 32位无符号整数 |
DWORD64 | unsigned __int64 | 8 | unsigned __int64→DWORD64 | 64位无符号整数 |
FLOAT | float | 4 | float→FLOAT | 浮点数变量 |
HACCEL | HACCEL__结构体指针 | 由DECLARE_HANDLE(name)宏定义的指向HACCEL__结构体的指针 | 快捷键列表的句柄 | |
HANDLE | void *(一个地址) | void *→HANDLE | 对象的句柄 | |
HBITMAP | HBITMAP__结构体指针 | 由DECLARE_HANDLE(name)宏定义的指向HBITMAP__结构体的指针 | 位图的句柄 | |
HBRUSH | HBRUSH__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 画刷的句柄 | |
HCONV | HCONV__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 动态数据交换(DDE)会话的句柄 | |
HCONVLIST | HCONVLIST__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 动态数据交换(DDE)会话列表的句柄 | |
HCURSOR | HICON__结构体指针 | HICON__ *→HICON→HCURSOR | 光标的句柄 | |
HDC | HDC__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 设备上下文(DC)的句柄 | |
HDDEDATA | HDDEDATA__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 动态数据交换数据的句柄 | |
HDESK | HDESK__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 桌面(Desktop)的句柄 | |
HDROP | HDROP__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | Handle to an internal drop structure. | |
HDWP | void *(一个地址) | void *→HANDLE→HDWP | Handle to a deferred window position structure. | |
HENHMETAFILE | HENHMETAFILE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 增强图元文件的句柄 | |
HFILE | int | * | int→HFILE | 由OpenFile(而不是CreateFile)打开的文件的句柄. |
HFONT | HFONT__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 字体的句柄 | |
HGDIOBJ | void near * | void NEAR *→HGDIOBJ | GDI对象的句柄 | |
HGLOBAL | void *(一个地址) | void *→HANDLE→HGLOBAL | 全局内存块的句柄 | |
HHOOK | HHOOK__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 句子(hook)的句柄 | |
HICON | HICON__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 图标的句柄 | |
HIMAGELIST | _IMAGELIST结构体指针 | _IMAGELIST *→HIMAGELIST | 图片列表的句柄 | |
HIMC | HIMC__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 输入上下文的句柄 | |
HINSTANCE | HINSTANCE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 实例的句柄 | |
HKEY | HKEY__结构体指针 | 由DECLARE_HANDLE(name)宏定义……(另有一条路径,一样) | 注册表键的句柄 | |
HKL | HKL__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 输入点标识符 | |
HLOCAL | void *(一个地址) | void *→HANDLE→HLOCAL | 本地内存块的句柄 | |
HMENU | HMENU__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 菜单的句柄 | |
HMETAFILE | HMETAFILE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 图元文件的句柄 | |
HMODULE | HINSTANCE__结构体指针 | HINSTANCE__*→HINSTANCE→HMODULE | 模块的句柄。值由模块的位置来决定。 | |
HMONITOR | HMONITOR__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 显示器的句柄 | |
HPALETTE | HPALETTE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 调色板的句柄 | |
HPEN | HPEN__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 画(线)笔的句柄 | |
HRGN | HRGN__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 区域的句柄 | |
HRSRC | HRSRC__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 资源的句柄 | |
HSZ | HSZ__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 动态数据交换(DDE)字符串的句柄 | |
HWINSTA | HWINSTA__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 窗口状态的句柄 | |
HWND | HWND__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | 窗口的句柄 |
INT | int | * | int→INT | 32位有符号整数 |
INT_PTR | int(_W64 int即__w64 int) | * | _W64 int→INT_PTR,_W64就是__w64,是为了解决32位与64位编译器的兼容性而设置的关键字 | 用于指针运算 |
INT32 | signed int | * | signed int→INT32 | 32位有符号整数 |
INT64 | signed __int64 | 8 | signed __int64→INT64 | 64位有符号整数 |
LANGID | unsigned short | 2 | unsigned short→WORD→LANGID | 语言标识符 |
LCID | unsigned long | 4 | unsigned long→DWORD→LCID | Locale identifier. |
LCTYPE | unsigned long | 4 | unsigned long→DWORD→LCTYPE | Locale information type. |
LONG | long | 4 | long→LONG | 32位有符号整数 |
LONG_PTR | long | 4 | _W64 long→LONG_PTR | 用于指针运算 |
LONG32 | signed int | * | signed int→LONG32 | 32位有符号整数 |
LONG64 | __int64 | 8 | __int64→LONG64 | 64位有符号整数 |
LONGLONG | __int64 | 8 | __int64→LONGLONG | 64位有符号整数 |
LPARAM | long | 4 | _W64 long→LONG_PTR→LPARAM | 消息的参数 |
LPBOOL | int * | int→BOOL, BOOL far *→LPBOOL | BOOL类型的指针 | |
LPBYTE | unsigned char * | unsigned char→BYTE,BYTE far *→LPBYTE | BYTE类型的指针 | |
LPCOLORREF | unsigned long * | unsigned long→WORD,DWORD *→LPCOLORREF | 颜色值的指针 | |
LPCRITICAL_SECTION | RTL_CRITICAL_SECTION结构体指针 | RTL_CRITICAL_SECTION *PRTL_CRITICAL_SECTION→,PRTL_CRITICAL_SECTION→LPCRITICAL_SECTION | CRITICAL_SECTION的指针 | |
LPCSTR | 静态char * | char→CHAR,CONST CHAR *→LPCSTR | 静态8位Windows字符(ANSI)无终结字符串指针 | |
LPCTSTR | 静态wchar_t * | wchar_t→WCHAR,CONST WCHAR *→LPCWSTR,LPCWSTR→LPCTSTR | 如果UNICODE已定义则为LPCWSTR,否则为LPCTSTR | |
LPCVOID | 静态void * | CONST void far *→LPCVOID | 任何类型的静态指针 | |
LPCWSTR | 静态wchar_t * | wchar_t→WCHAR,CONST WCHAR *→LPCWSTR | 静态16位Windows字符(Unicode)无终结字符串指针 | |
LPDWORD | unsigned long * | unsigned long→DWORD,DWORD far *→LPDWORD | DWORD的指针 | |
LPHANDLE | 指向句柄的指针 | void *→HANDLE,HANDLE FAR *→LPHANDLE | HANDLE的指针 | |
LPINT | int * | int far *→LPINT | INT的指针 | |
LPLONG | long * | long far *→LPLONG | LONG的指针 | |
LPSTR | char * | char→CHAR,CHAR *→LPSTR | 8位Windows字符(ANSI)无终结字符串指针 | |
LPTSTR | wchar_t * | wchar_t WCHAR,WCHAR *→LPWSTR,LPWSTR→LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise. | |
LPVOID | void * | void far *→LPVOID | 任何类型的指针 | |
LPWORD | unsigned short * | unsigned short→WORD,WORD far *→LPWORD | WORD的指针 | |
LPWSTR | wchar_t * | wchar_t→WCHAR,WCHAR *→LPWSTR | 16位Windows字符(ANSI)无终结字符串指针 | |
LRESULT | long | 4 | _W64 long→LONG_PTR→LRESULT | 有符号的消息处理结果 |
LUID | LUID结构 | 局部唯一标识符 | ||
PBOOL | int * | int→BOOL,BOOL near *→PBOOL | BOOL的指针 | |
PBOOLEAN | unsigned char * | unsigned char→BYTE→BOOLEAN,BOOLEAN *→PBOOLEAN | BOOL的指针 | |
PBYTE | unsigned char * | unsigned char→BYTE,BYTE near *→PBYTE | BYTE的指针 | |
PCHAR | char * | char→CHAR,CHAR *→PCHAR | CHAR的指针 | |
PCRITICAL_SECTION | RTL_CRITICAL_SECTION结构体指针 | RTL_CRITICAL_SECTION *→PRTL_CRITICAL_SECTION,PRTL_CRITICAL_SECTION→PCRITICAL_SECTION | CRITICAL_SECTION的指针 | |
PCSTR | 静态char * | char→CHAR,CONST CHAR *→PCSTR | 静态8位Windows字符(ANSI)无终结字符串指针 | |
PCTSTR | 静态wchar_t * | wchar_t→WCHAR,CONST WCHAR *→LPCWSTR,LPCWSTR→PCTSTR | 如果UNICODE已定义则为PCWSTR,否则为PCSTR | |
PCWCH | 静态wchar_t * | wchar_t→WCHAR,CONST WCHAR *→PCWCH | WCHAR的静态指针 | |
PCWSTR | 静态wchar_t * | wchar_t→WCHAR,CONST WCHAR *→PCWSTR | 静态16位Windows字符(Unicode)无终结字符串指针 | |
PDWORD | unsigned long * | unsigned long→DWORD,DWORD near *→PDWORD | DWORD的指针 | |
PFLOAT | float * | float→FLOAT,FLOAT *→PFLOAT | FLOAT的指针 | |
PHANDLE | 指向句柄的指针 | void *→HANDLE,HANDLE *→PHANDLE | HANDLE的指针 | |
PHKEY | 指向HKEY的指针 | HKEY__ *→HKEY *→PHKEY | HKEY的指针 | |
PINT | int * | int near *→PINT | INT的指针 | |
PLCID | unsigned long * | unsigned long→DWORD,DWORD near *→PDWORD→PLCID | LCID的指针 | |
PLONG | long * | long→LONG,LONG *→PLONG | LONG的指针 | |
PLUID | LUID结构体指针 | LUID *→PLUID | LUID的指针 |
POINTER_32 | void * | void *→POINTER_32 | 32位指针(详解略) | |
POINTER_64 | void * | void *→POINTER_64 | 64位指针(详解略) | |
PSHORT | short * | short→SHORT,SHORT *→PSHORT | SHORT的指针 | |
PSTR | char * | char→CHAR,CHAR *→PSTR | 8位Windows字符(ANSI)无终结字符串指针 | |
PTBYTE | wchar_t * | wchar_t→WCHAR,WCHAR *→PTBYTE | TBYTE的指针 | |
PTCHAR | wchar_t * | wchar_t→WCHAR,WCHAR *→PTCHAR | TCHAR的指针 | |
PTSTR | wchar_t * | wchar_t→WCHAR,WCHAR *→LPWSTR→PTSTR | PWSTR if UNICODE is defined, a PSTR otherwise. | |
PTBYTE | wchar_t * | wchar_t→WCHAR,WCHAR *→PTBYTE | TBYTE的指针 | |
PTCHAR | wchar_t * | wchar_t→WCHAR,WCHAR *→PTCHAR | TCHAR的指针 | |
PTSTR | wchar_t * | wchar_t→WCHAR,WCHAR *→LPWSTR→PTSTR | A PWSTR if UNICODE is defined, a PSTR otherwise. | |
PUCHAR | unsigned char * | unsigned char→UCHAR,UCHAR *→PUCHAR | UCHAR的指针 | |
PUINT | unsigned int * | unsigned int *→PUINT(呵呵,为什么不用UINT*来定义呢?) | UINT的指针 | |
PULONG | unsigned long * | unsigned long→ULONG,ULONG *→PULONG | ULONG的指针 | |
PUSHORT | unsigned short * | unsigned short→USHORT,USHORT *→PUSHORT | USHORT的指针 | |
PVOID | void * | void *→PVOID | 任何类型的指针 | |
PWCHAR | wchar_t * | wchar_t→WCHAR,WCHAR *→PWCHAR | WCHAR的指针 | |
PWORD | unsigned short * | unsigned short→WORD,WORD near *→PWORD | WORD的指针 | |
PWSTR | wchar_t * | wchar_t→WCHAR,WCHAR *→PWSTR | 16位Windows字符(Unicode)无终结字符串指针 | |
REGSAM | unsigned long | unsigned long→DWORD→ACCESS_MASK→REGSAM | 注册表值的安全访问掩码 | |
SC_HANDLE | SC_HANDLE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | Handle to a service control manager database. | |
SC_LOCK | void * | void far *→LPVOID→SC_LOCK | Handle to a service control manager database lock. | |
SERVICE_STATUS_HANDLE | SERVICE_STATUS_HANDLE__结构体指针 | 由DECLARE_HANDLE(name)宏定义…… | Handle to a service status value. | |
SHORT | short | 2 | short→SHORT | 短整数类型(16位) |
SIZE_T | unsigned long | 4 | unsigned long→ULONG_PTR→SIZE_T | 指针可指向的最大字节数 |
SSIZE_T | long | _W64 long→LONG_PTR→SSIZE_T | 有符号SIZE_T. | |
TBYTE | wchar_t | 2 | wchar_t→WCHAR,WCHAR→TBYTE | 如果UNICODE已定义则为WCHAR,否则为CHAR |
TCHAR | wchar_t | 2 | wchar_t→WCHAR,WCHAR→TCHAR | 如果UNICODE已定义则为WCHAR,否则为CHAR |
UCHAR | unsigned char | 1 | unsigned char→UCHAR | 无符号CHAR |
UINT | unsigned int | * | unsigned int→UINT | 无符号INT |
UINT_PTR | unsigned int | * | unsigned int→UINT_PTR | 无符号INT_PTR. |
UINT32 | unsigned int | 2 | unsigned int→UINT32 | 无符号INT32. |
UINT64 | unsigned __int64 | 4 | unsigned __int64→UINT64 | 无符号INT64. |
ULONG | unsigned long | 4 | unsigned long→ULONG | 无符号LONG. |
ULONG_PTR | unsigned long | 4 | unsigned long→ULONG_PTR | 无符号LONG_PTR. |
ULONG32 | unsigned int | 2 | unsigned int→ULONG32 | 无符号LONG32 |
ULONG64 | unsigned __int64 | 4 | unsigned __int64→ULONG64 | 无符号LONG64 |
ULONGLONG | unsigned __int64 | 4 | unsigned __int64→ULONGLONG | 64位无符号整数 |
UNSIGNED | 没查到,大家帮忙吧 | 无符号属性 | ||
USHORT | unsigned short | unsigned short→USHORT | 无符号SHORT类型 | |
VOID | void | void→VOID | 任何类型 | |
WCHAR | wchar_t | 2 | wchar_t→WCHAR | 16位Unicode字符 |
WINAPI | __stdcall | 调用 | __stdcall→WINAPI | 系统函数(API函数)调用约定 |
WORD | unsigned short | 2 | unsigned short→WORD | 16位无符号整数 |
WPARAM | unsigned int | * | unsigned int→UINT_PTR→WPARAM | 消息的参数 |