windows编程中的基本类型--选自MSDN(可恶的微软,为什么搞的这么复杂???)
来源:互联网 发布:本乎数的意思 编辑:程序博客网 时间:2024/06/09 16:06
Atom. For more information, see Atoms.
This type is declared in WinDef.h as follows:
typedef WORD ATOM;
Boolean variable (should be TRUE or FALSE).
This type is declared in WinDef.h as follows:
typedef int BOOL;
Boolean variable (should be TRUE or FALSE).
This type is declared in WinNT.h as follows:
typedef BYTE BOOLEAN;
Byte (8 bits).
This type is declared in WinDef.h as follows:
typedef unsigned char BYTE;
Calling convention for callback functions.
This type is declared in WinDef.h as follows:
#define CALLBACK __stdcall
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;
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;
Variable whose value is to remain constant during execution.
This type is declared in WinDef.h as follows:
#define CONST const
32-bit unsigned integer.
This type is declared in WinDef.h as follows:
typedef unsigned long DWORD;
64-bit unsigned integer.
This type is declared in WinNT.h as follows:
typedef ULONGLONG DWORDLONG;
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;
32-bit unsigned integer.
This type is declared in BaseTsd.h as follows:
typedef unsigned int DWORD32;
64-bit unsigned integer.
This type is declared in BaseTsd.h as follows:
typedef unsigned __int64 DWORD64;
Floating-point variable.
This type is declared in WinDef.h as follows:
typedef float FLOAT;
Handle to an accelerator table.
This type is declared in WinDef.h as follows:
typedef HANDLE HACCEL;
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 to an object.
This type is declared in WinNT.h as follows:
typedef PVOID HANDLE;
Handle to a bitmap.
This type is declared in WinDef.h as follows:
typedef HANDLE HBITMAP;
Handle to a brush.
This type is declared in WinDef.h as follows:
typedef HANDLE HBRUSH;
Handle to a color space.
This type is declared in WinDef.h as follows:
#if(WINVER >= 0x0400) typedef HANDLE HCOLORSPACE;#endif
Handle to a dynamic data exchange (DDE) conversation.
This type is declared in Ddeml.h as follows:
typedef HANDLE HCONV;
Handle to a DDE conversation list.
This type is declared in Ddeml.h as follows:
typedef HANDLE HCONVLIST;
Handle to a cursor.
This type is declared in WinDef.h as follows:
typedef HICON HCURSOR;
Handle to a device context (DC).
This type is declared in WinDef.h as follows:
typedef HANDLE HDC;
Handle to DDE data.
This type is declared in Ddeml.h as follows:
typedef HANDLE HDDEDATA;
Handle to a desktop.
This type is declared in WinDef.h as follows:
typedef HANDLE HDESK;
Handle to an internal drop structure.
This type is declared in ShellApi.h as follows:
typedef HANDLE HDROP;
Handle to a deferred window position structure.
This type is declared in WinUser.h as follows:
typedef HANDLE HDWP;
Handle to an enhanced metafile.
This type is declared in WinDef.h as follows:
typedef HANDLE HENHMETAFILE;
Handle to a file opened by OpenFile, not CreateFile.
This type is declared in WinDef.h as follows:
typedef int HFILE;
Handle to a font.
This type is declared in WinDef.h as follows:
typedef HANDLE HFONT;
Handle to a GDI object.
This type is declared in WinDef.h as follows:
typedef HANDLE HGDIOBJ;
Handle to a global memory block.
This type is declared in WinDef.h as follows:
typedef HANDLE HGLOBAL;
Handle to a hook.
This type is declared in WinDef.h as follows:
typedef HANDLE HHOOK;
Handle to an icon.
This type is declared in WinDef.h as follows:
typedef HANDLE HICON;
Handle to an instance.
This type is declared in WinDef.h as follows:
typedef HANDLE HINSTANCE;
Handle to a registry key.
This type is declared in WinDef.h as follows:
typedef HANDLE HKEY;
Input locale identifier.
This type is declared in WinDef.h as follows:
typedef HANDLE HKL;
Handle to a local memory block.
This type is declared in WinDef.h as follows:
typedef HANDLE HLOCAL;
Handle to a menu.
This type is declared in WinDef.h as follows:
typedef HANDLE HMENU;
Handle to a metafile.
This type is declared in WinDef.h as follows:
typedef HANDLE HMETAFILE;
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;
Handle to a display monitor.
This type is declared in WinDef.h as follows:
if(WINVER >= 0x0500) typedef HANDLE HMONITOR;
Handle to a palette.
This type is declared in WinDef.h as follows:
typedef HANDLE HPALETTE;
Handle to a pen.
This type is declared in WinDef.h as follows:
typedef HANDLE HPEN;
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;
Handle to a region.
This type is declared in WinDef.h as follows:
typedef HANDLE HRGN;
Handle to a resource.
This type is declared in WinDef.h as follows:
typedef HANDLE HRSRC;
Handle to a DDE string.
This type is declared in Ddeml.h as follows:
typedef HANDLE HSZ;
Handle to a window station.
This type is declared in WinDef.h as follows:
typedef HANDLE WINSTA;
Handle to a window.
This type is declared in WinDef.h as follows:
typedef HANDLE HWND;
32-bit signed integer.
This type is declared in WinDef.h as follows:
typedef int INT;
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
32-bit signed integer.
This type is declared in BaseTsd.h as follows:
typedef signed int INT32;
64-bit signed integer.
This type is declared in BaseTsd.h as follows:
typedef signed __int64 INT64;
Language identifier. For more information, see Locales.
This type is declared in WinNT.h as follows:
typedef WORD LANGID;
Locale identifier. For more information, see Locales.
This type is declared in WinNT.h as follows:
typedef DWORD LCID;
Locale information type. For a list, see LCTYPE Constants.
This type is declared in WinNls.h as follows:
typedef DWORD LCTYPE;
Language group identifier. For a list, see EnumLanguageGroupLocales.
This type is declared in WinNls.h as follows:
typedef DWORD LGRPID;
32-bit signed integer.
This type is declared in WinNT.h as follows:
typedef long LONG;
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
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
32-bit signed integer.
This type is declared in BaseTsd.h as follows:
typedef signed int LONG32;
64-bit signed integer.
This type is declared in BaseTsd.h as follows:
typedef __int64 LONG64;
Message parameter.
This type is declared in WinDef.h as follows:
typedef LONG_PTR LPARAM;
Pointer to a BOOL.
This type is declared in WinDef.h as follows:
typedef BOOL far *LPBOOL;
Pointer to a BYTE.
This type is declared in WinDef.h as follows:
typedef BYTE far *LPBYTE;
Pointer to a COLORREF value.
This type is declared in WinDef.h as follows:
typedef DWORD *LPCOLORREF;
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;
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
Pointer to a constant of any type.
This type is declared in WinDef.h as follows:
typedef CONST void *LPCVOID;
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;
Pointer to a DWORD.
This type is declared in WinDef.h as follows:
typedef DWORD *LPDWORD;
Pointer to a HANDLE.
This type is declared in WinDef.h as follows:
typedef HANDLE *LPHANDLE;
Pointer to an INT.
This type is declared in WinDef.h as follows:
typedef int *LPINT;
Pointer to a LONG.
This type is declared in WinDef.h as follows:
typedef long *LPLONG;
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;
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
Pointer to any type.
This type is declared in WinDef.h as follows:
typedef void *LPVOID;
Pointer to a WORD.
This type is declared in WinDef.h as follows:
typedef WORD *LPWORD;
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;
Signed result of message processing.
This type is declared in WinDef.h as follows:
typedef LONG_PTR LRESULT;
Pointer to a BOOL.
This type is declared in WinDef.h as follows:
typedef BOOL *PBOOL;
Pointer to a BOOL.
This type is declared in WinNT.h as follows:
typedef BOOLEAN *PBOOLEAN;
Pointer to a BYTE.
This type is declared in WinDef.h as follows:
typedef BYTE *PBYTE;
Pointer to a CHAR.
This type is declared in WinNT.h as follows:
typedef CHAR *PCHAR;
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;
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
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;
Pointer to a DWORD.
This type is declared in WinDef.h as follows:
typedef DWORD *PDWORD;
Pointer to a DWORDLONG.
This type is declared in WinNT.h as follows:
typedef DWORDLONG *PDWORDLONG;
Pointer to a DWORD_PTR.
This type is declared in BaseTsd.h as follows:
typedef DWORD_PTR *PDWORD_PTR;
Pointer to a DWORD32.
This type is declared in BaseTsd.h as follows:
typedef DWORD32 *PDWORD32;
Pointer to a DWORD64.
This type is declared in BaseTsd.h as follows:
typedef DWORD64 *PDWORD64;
Pointer to a FLOAT.
This type is declared in WinDef.h as follows:
typedef FLOAT *PFLOAT;
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
Pointer to a HANDLE.
This type is declared in WinNT.h as follows:
typedef HANDLE *PHANDLE;
Pointer to an HKEY.
This type is declared in WinDef.h as follows:
typedef HKEY *PHKEY;
Pointer to an INT.
This type is declared in WinDef.h as follows:
typedef int *PINT;
Pointer to an INT_PTR.
This type is declared in BaseTsd.h as follows:
typedef INT_PTR *PINT_PTR;
Pointer to an INT32.
This type is declared in BaseTsd.h as follows:
typedef INT32 *PINT32;
Pointer to an INT64.
This type is declared in BaseTsd.h as follows:
typedef INT64 *PINT64;
Pointer to an LCID.
This type is declared in WinNT.h as follows:
typedef PDWORD PLCID;
Pointer to a LONG.
This type is declared in WinNT.h as follows:
typedef LONG *PLONG;
Pointer to a LONGLONG.
This type is declared in WinNT.h as follows:
typedef LONGLONG *PLONGLONG;
Pointer to a LONG_PTR.
This type is declared in BaseTsd.h as follows:
typedef LONG_PTR *PLONG_PTR;
Pointer to a LONG32.
This type is declared in BaseTsd.h as follows:
typedef LONG32 *PLONG32;
Pointer to a LONG64.
This type is declared in BaseTsd.h as follows:
typedef LONG64 *PLONG64;
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 POINTER_32#endif
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:
#if (_MSC_VER >= 1300) #define POINTER_64 __ptr64#else #define POINTER_64#endif
A signed pointer.
This type is declared in BaseTsd.h as follows:
#define POINTER_SIGNED __sptr
An unsigned pointer.
This type is declared in BaseTsd.h as follows:
#define POINTER_UNSIGNED __uptr
Pointer to a SHORT.
This type is declared in WinNT.h as follows:
typedef SHORT *PSHORT;
Pointer to a SIZE_T.
This type is declared in BaseTsd.h as follows:
typedef SIZE_T *PSIZE_T;
Pointer to a SSIZE_T.
This type is declared in BaseTsd.h as follows:
typedef SSIZE_T *PSSIZE_T;
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;
Pointer to a TBYTE.
This type is declared in WinNT.h as follows:
typedef TBYTE *PTBYTE;
Pointer to a TCHAR.
This type is declared in WinNT.h as follows:
typedef TCHAR *PTCHAR;
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
Pointer to a UCHAR.
This type is declared in WinDef.h as follows:
typedef UCHAR *PUCHAR;
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
Pointer to a UINT.
This type is declared in WinDef.h as follows:
typedef UINT *PUINT;
Pointer to a UINT_PTR.
This type is declared in BaseTsd.h as follows:
typedef UINT_PTR *PUINT_PTR;
Pointer to a UINT32.
This type is declared in BaseTsd.h as follows:
typedef UINT32 *PUINT32;
Pointer to a UINT64.
This type is declared in BaseTsd.h as follows:
typedef UINT64 *PUINT64;
Pointer to a ULONG.
This type is declared in WinDef.h as follows:
typedef ULONG *PULONG;
Pointer to a ULONGLONG.
This type is declared in WinDef.h as follows:
typedef ULONGLONG *PULONGLONG;
Pointer to a ULONG_PTR.
This type is declared in BaseTsd.h as follows:
typedef ULONG_PTR *PULONG_PTR;
Pointer to a ULONG32.
This type is declared in BaseTsd.h as follows:
typedef ULONG32 *PULONG32;
Pointer to a ULONG64.
This type is declared in BaseTsd.h as follows:
typedef ULONG64 *PULONG64;
Pointer to a USHORT.
This type is declared in WinDef.h as follows:
typedef USHORT *PUSHORT;
Pointer to any type.
This type is declared in WinNT.h as follows:
typedef void *PVOID;
Pointer to a WCHAR.
This type is declared in WinNT.h as follows:
typedef WCHAR *PWCHAR;
Pointer to a WORD.
This type is declared in WinDef.h as follows:
typedef WORD *PWORD;
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;
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;
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;
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 integer (16 bits).
This type is declared in WinNT.h as follows:
typedef short SHORT;
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;
Signed SIZE_T.
This type is declared in BaseTsd.h as follows:
typedef LONG_PTR SSIZE_T;
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
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
Unsigned CHAR.
This type is declared in WinDef.h as follows:
typedef unsigned char UCHAR;
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
Unsigned INT.
This type is declared in WinDef.h as follows:
typedef unsigned int UINT;
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
Unsigned INT32.
This type is declared in BaseTsd.h as follows:
typedef unsigned int UINT32;
Unsigned INT64.
This type is declared in BaseTsd.h as follows:
typedef usigned __int 64 UINT64;
Unsigned LONG.
This type is declared in WinDef.h as follows:
typedef unsigned long ULONG;
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
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
Unsigned LONG32.
This type is declared in BaseTsd.h as follows:
typedef unsigned int ULONG32;
Unsigned LONG64.
This type is declared in BaseTsd.h as follows:
typedef unsigned __int64 ULONG64;
A Unicode string.
This type is declared in Winternl.h as follows:
typedef struct _UNICODE_STRING { USHORT Length; USHORT MaximumLength; PWSTR Buffer;} UNICODE_STRING;typedef UNICODE_STRING *PUNICODE_STRING;typedef const UNICODE_STRING *PCUNICODE_STRING;
Unsigned SHORT.
This type is declared in WinDef.h as follows:
typedef unsigned short USHORT;
Update sequence number (USN).
This type is declared in WinNT.h as follows:
typedef LONGLONG USN;
Any type.
This type is declared in WinNT.h as follows:
#define VOID void
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;
Calling convention for system functions.
This type is declared in WinDef.h as follows:
#define WINAPI __stdcall
16-bit unsigned integer.
This type is declared in WinDef.h as follows:
typedef unsigned short WORD;
Message parameter.
This type is declared in WinDef.h as follows:
typedef UINT_PTR WPARAM;
- windows编程中的基本类型--选自MSDN(可恶的微软,为什么搞的这么复杂???)
- 以下内容选自微软亚洲研究院的博客
- 微软的MSDN杂志
- 为什么会有这么的编程语言
- 微软真强啊!这么恶心的model(转自msdn)-----front controller
- 软件为什么这么复杂
- 下载: 微软在TechNet/MSDN发布的Windows 7 RTM
- Windows 8 微软官方MSDN版 的文件校验信息
- windows中的一些interface msdn上的。
- Windows 的 FD_SETSIZE 这么轻松就可以改,呵呵,看MSDN...
- win8.1 终于删除可恶的微软拼音
- 搞编程的帅哥不少,为什么美女那么少?
- 世界上的编程语言已这么丰富,为什么还不够?
- 并发编程:Disruptor为什么这么快,锁的缺点
- 常见的基本Windows类型
- 泛型类的类型为什么不能是基本
- 简单的windows服务编程框架(MSDN例子代码)
- 微软MSDN Wiki ,让自己的名字也进MSDN
- SQL 计算两个日期间的间隔
- GLSL实现Ambient Occlusion
- 详细帮助SEO新手解读GOOGLE Sitemap
- 标准 C I/O 之 fopen () 函数
- 数据库事务和锁
- windows编程中的基本类型--选自MSDN(可恶的微软,为什么搞的这么复杂???)
- UltraEdit 使用技巧笔记
- EndNote笔记(1)
- 网页 幻灯片 特效代码
- 立帖为证:学会平和
- 使用PGP的Web Of Trust来管理证书有哪些问题?
- 用Zaurus播放视频文件
- Eboot代码流程
- C# 小知识