您的位置:首页 > 编程语言

windows编程中的基本类型--选自MSDN(可恶的微软,为什么搞的这么复杂???)

2008-11-04 23:02 429 查看
ATOMAtom. For more information, see Atoms.

This type is declared in WinDef.h as follows:

typedef WORD ATOM;


BOOLBoolean variable (should be TRUE or FALSE).

This type is declared in WinDef.h as follows:

typedef int BOOL;


BOOLEANBoolean variable (should be TRUE or FALSE).

This type is declared in WinNT.h as follows:

typedef BYTE BOOLEAN;


BYTEByte (8 bits).

This type is declared in WinDef.h as follows:

typedef unsigned char BYTE;


CALLBACKCalling convention for callback functions.

This type is declared in WinDef.h as follows:

#define CALLBACK __stdcall


CHAR8-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;


COLORREFRed, 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;


CONSTVariable whose value is to remain constant during execution.

This type is declared in WinDef.h as follows:

#define CONST const


DWORD32-bit unsigned integer.

This type is declared in WinDef.h as follows:

typedef unsigned long DWORD;


DWORDLONG64-bit unsigned integer.

This type is declared in WinNT.h as follows:

typedef ULONGLONG DWORDLONG;


DWORD_PTRUnsigned 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;


DWORD3232-bit unsigned integer.

This type is declared in BaseTsd.h as follows:

typedef unsigned int DWORD32;


DWORD6464-bit unsigned integer.

This type is declared in BaseTsd.h as follows:

typedef unsigned __int64 DWORD64;


FLOATFloating-point variable.

This type is declared in WinDef.h as follows:

typedef float FLOAT;


HACCELHandle to an accelerator table.

This type is declared in WinDef.h as follows:

typedef HANDLE HACCEL;


HALF_PTRHalf 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


HANDLEHandle to an object.

This type is declared in WinNT.h as follows:

typedef PVOID HANDLE;


HBITMAPHandle to a bitmap.

This type is declared in WinDef.h as follows:

typedef HANDLE HBITMAP;


HBRUSHHandle to a brush.

This type is declared in WinDef.h as follows:

typedef HANDLE HBRUSH;


HCOLORSPACEHandle to a color space.

This type is declared in WinDef.h as follows:

#if(WINVER >= 0x0400)
typedef HANDLE HCOLORSPACE;
#endif


HCONVHandle to a dynamic data exchange (DDE) conversation.

This type is declared in Ddeml.h as follows:

typedef HANDLE HCONV;


HCONVLISTHandle to a DDE conversation list.

This type is declared in Ddeml.h as follows:

typedef HANDLE HCONVLIST;


HCURSORHandle to a cursor.

This type is declared in WinDef.h as follows:

typedef HICON HCURSOR;


HDCHandle to a device context (DC).

This type is declared in WinDef.h as follows:

typedef HANDLE HDC;


HDDEDATAHandle to DDE data.

This type is declared in Ddeml.h as follows:

typedef HANDLE HDDEDATA;


HDESKHandle to a desktop.

This type is declared in WinDef.h as follows:

typedef HANDLE HDESK;


HDROPHandle to an internal drop structure.

This type is declared in ShellApi.h as follows:

typedef HANDLE HDROP;


HDWPHandle to a deferred window position structure.

This type is declared in WinUser.h as follows:

typedef HANDLE HDWP;


HENHMETAFILEHandle to an enhanced metafile.

This type is declared in WinDef.h as follows:

typedef HANDLE HENHMETAFILE;


HFILEHandle to a file opened by OpenFile, not CreateFile.

This type is declared in WinDef.h as follows:

typedef int HFILE;


HFONTHandle to a font.

This type is declared in WinDef.h as follows:

typedef HANDLE HFONT;


HGDIOBJHandle to a GDI object.

This type is declared in WinDef.h as follows:

typedef HANDLE HGDIOBJ;


HGLOBALHandle to a global memory block.

This type is declared in WinDef.h as follows:

typedef HANDLE HGLOBAL;


HHOOKHandle to a hook.

This type is declared in WinDef.h as follows:

typedef HANDLE HHOOK;


HICONHandle to an icon.

This type is declared in WinDef.h as follows:

typedef HANDLE HICON;


HINSTANCEHandle to an instance.

This type is declared in WinDef.h as follows:

typedef HANDLE HINSTANCE;


HKEYHandle to a registry key.

This type is declared in WinDef.h as follows:

typedef HANDLE HKEY;


HKLInput locale identifier.

This type is declared in WinDef.h as follows:

typedef HANDLE HKL;


HLOCALHandle to a local memory block.

This type is declared in WinDef.h as follows:

typedef HANDLE HLOCAL;


HMENUHandle to a menu.

This type is declared in WinDef.h as follows:

typedef HANDLE HMENU;


HMETAFILEHandle to a metafile.

This type is declared in WinDef.h as follows:

typedef HANDLE HMETAFILE;


HMODULEHandle to a module. The value is the base address of the module.

This type is declared in WinDef.h as follows:

typedef HINSTANCE HMODULE;


HMONITORHandle to a display monitor.

This type is declared in WinDef.h as follows:

if(WINVER >= 0x0500) typedef HANDLE HMONITOR;


HPALETTEHandle to a palette.

This type is declared in WinDef.h as follows:

typedef HANDLE HPALETTE;


HPENHandle to a pen.

This type is declared in WinDef.h as follows:

typedef HANDLE HPEN;


HRESULTReturn 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;


HRGNHandle to a region.

This type is declared in WinDef.h as follows:

typedef HANDLE HRGN;


HRSRCHandle to a resource.

This type is declared in WinDef.h as follows:

typedef HANDLE HRSRC;


HSZHandle to a DDE string.

This type is declared in Ddeml.h as follows:

typedef HANDLE HSZ;


HWINSTAHandle to a window station.

This type is declared in WinDef.h as follows:

typedef HANDLE WINSTA;


HWNDHandle to a window.

This type is declared in WinDef.h as follows:

typedef HANDLE HWND;


INT32-bit signed integer.

This type is declared in WinDef.h as follows:

typedef int INT;


INT_PTRSigned 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


INT3232-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed int INT32;


INT6464-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed __int64 INT64;


LANGIDLanguage identifier. For more information, see Locales.

This type is declared in WinNT.h as follows:

typedef WORD LANGID;


LCIDLocale identifier. For more information, see Locales.

This type is declared in WinNT.h as follows:

typedef DWORD LCID;


LCTYPELocale information type. For a list, see LCTYPE Constants.

This type is declared in WinNls.h as follows:

typedef DWORD LCTYPE;


LGRPIDLanguage group identifier. For a list, see EnumLanguageGroupLocales.

This type is declared in WinNls.h as follows:

typedef DWORD LGRPID;


LONG32-bit signed integer.

This type is declared in WinNT.h as follows:

typedef long LONG;


LONGLONG64-bit signed integer.

This type is declared in WinNT.h as follows:

#if !defined(_M_IX86)
typedef __int64 LONGLONG;
#else
typedef double LONGLONG;
#endif


LONG_PTRSigned 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


LONG3232-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef signed int LONG32;


LONG6464-bit signed integer.

This type is declared in BaseTsd.h as follows:

typedef __int64 LONG64;


LPARAMMessage parameter.

This type is declared in WinDef.h as follows:

typedef LONG_PTR LPARAM;


LPBOOLPointer to a BOOL.

This type is declared in WinDef.h as follows:

typedef BOOL far *LPBOOL;


LPBYTEPointer to a BYTE.

This type is declared in WinDef.h as follows:

typedef BYTE far *LPBYTE;


LPCOLORREFPointer to a COLORREF value.

This type is declared in WinDef.h as follows:

typedef DWORD *LPCOLORREF;


LPCSTRPointer 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;


LPCTSTRAn 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


LPCVOIDPointer to a constant of any type.

This type is declared in WinDef.h as follows:

typedef CONST void *LPCVOID;


LPCWSTRPointer 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;


LPDWORDPointer to a DWORD.

This type is declared in WinDef.h as follows:

typedef DWORD *LPDWORD;


LPHANDLEPointer to a HANDLE.

This type is declared in WinDef.h as follows:

typedef HANDLE *LPHANDLE;


LPINTPointer to an INT.

This type is declared in WinDef.h as follows:

typedef int *LPINT;


LPLONGPointer to a LONG.

This type is declared in WinDef.h as follows:

typedef long *LPLONG;


LPSTRPointer 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;


LPTSTRAn 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


LPVOIDPointer to any type.

This type is declared in WinDef.h as follows:

typedef void *LPVOID;


LPWORDPointer to a WORD.

This type is declared in WinDef.h as follows:

typedef WORD *LPWORD;


LPWSTRPointer 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;


LRESULTSigned result of message processing.

This type is declared in WinDef.h as follows:

typedef LONG_PTR LRESULT;


PBOOLPointer to a BOOL.

This type is declared in WinDef.h as follows:

typedef BOOL *PBOOL;


PBOOLEANPointer to a BOOL.

This type is declared in WinNT.h as follows:

typedef BOOLEAN *PBOOLEAN;


PBYTEPointer to a BYTE.

This type is declared in WinDef.h as follows:

typedef BYTE *PBYTE;


PCHARPointer to a CHAR.

This type is declared in WinNT.h as follows:

typedef CHAR *PCHAR;


PCSTRPointer 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;


PCTSTRA 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


PCWSTRPointer 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;


PDWORDPointer to a DWORD.

This type is declared in WinDef.h as follows:

typedef DWORD *PDWORD;


PDWORDLONGPointer to a DWORDLONG.

This type is declared in WinNT.h as follows:

typedef DWORDLONG *PDWORDLONG;


PDWORD_PTRPointer to a DWORD_PTR.

This type is declared in BaseTsd.h as follows:

typedef DWORD_PTR *PDWORD_PTR;


PDWORD32Pointer to a DWORD32.

This type is declared in BaseTsd.h as follows:

typedef DWORD32 *PDWORD32;


PDWORD64Pointer to a DWORD64.

This type is declared in BaseTsd.h as follows:

typedef DWORD64 *PDWORD64;


PFLOATPointer to a FLOAT.

This type is declared in WinDef.h as follows:

typedef FLOAT *PFLOAT;


PHALF_PTRPointer 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


PHANDLEPointer to a HANDLE.

This type is declared in WinNT.h as follows:

typedef HANDLE *PHANDLE;


PHKEYPointer to an HKEY.

This type is declared in WinDef.h as follows:

typedef HKEY *PHKEY;


PINTPointer to an INT.

This type is declared in WinDef.h as follows:

typedef int *PINT;


PINT_PTRPointer to an INT_PTR.

This type is declared in BaseTsd.h as follows:

typedef INT_PTR *PINT_PTR;


PINT32Pointer to an INT32.

This type is declared in BaseTsd.h as follows:

typedef INT32 *PINT32;


PINT64Pointer to an INT64.

This type is declared in BaseTsd.h as follows:

typedef INT64 *PINT64;


PLCIDPointer to an LCID.

This type is declared in WinNT.h as follows:

typedef PDWORD PLCID;


PLONGPointer to a LONG.

This type is declared in WinNT.h as follows:

typedef LONG *PLONG;


PLONGLONGPointer to a LONGLONG.

This type is declared in WinNT.h as follows:

typedef LONGLONG *PLONGLONG;


PLONG_PTRPointer to a LONG_PTR.

This type is declared in BaseTsd.h as follows:

typedef LONG_PTR *PLONG_PTR;


PLONG32Pointer to a LONG32.

This type is declared in BaseTsd.h as follows:

typedef LONG32 *PLONG32;


PLONG64Pointer to a LONG64.

This type is declared in BaseTsd.h as follows:

typedef LONG64 *PLONG64;


POINTER_3232-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


POINTER_6464-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


POINTER_SIGNEDA signed pointer.

This type is declared in BaseTsd.h as follows:

#define POINTER_SIGNED __sptr


POINTER_UNSIGNEDAn unsigned pointer.

This type is declared in BaseTsd.h as follows:

#define POINTER_UNSIGNED __uptr


PSHORTPointer to a SHORT.

This type is declared in WinNT.h as follows:

typedef SHORT *PSHORT;


PSIZE_TPointer to a SIZE_T.

This type is declared in BaseTsd.h as follows:

typedef SIZE_T *PSIZE_T;


PSSIZE_TPointer to a SSIZE_T.

This type is declared in BaseTsd.h as follows:

typedef SSIZE_T *PSSIZE_T;


PSTRPointer 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;


PTBYTEPointer to a TBYTE.

This type is declared in WinNT.h as follows:

typedef TBYTE *PTBYTE;


PTCHARPointer to a TCHAR.

This type is declared in WinNT.h as follows:

typedef TCHAR *PTCHAR;


PTSTRA 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


PUCHARPointer to a UCHAR.

This type is declared in WinDef.h as follows:

typedef UCHAR *PUCHAR;


PUHALF_PTRPointer 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


PUINTPointer to a UINT.

This type is declared in WinDef.h as follows:

typedef UINT *PUINT;


PUINT_PTRPointer to a UINT_PTR.

This type is declared in BaseTsd.h as follows:

typedef UINT_PTR *PUINT_PTR;


PUINT32Pointer to a UINT32.

This type is declared in BaseTsd.h as follows:

typedef UINT32 *PUINT32;


PUINT64Pointer to a UINT64.

This type is declared in BaseTsd.h as follows:

typedef UINT64 *PUINT64;


PULONGPointer to a ULONG.

This type is declared in WinDef.h as follows:

typedef ULONG *PULONG;


PULONGLONGPointer to a ULONGLONG.

This type is declared in WinDef.h as follows:

typedef ULONGLONG *PULONGLONG;


PULONG_PTRPointer to a ULONG_PTR.

This type is declared in BaseTsd.h as follows:

typedef ULONG_PTR *PULONG_PTR;


PULONG32Pointer to a ULONG32.

This type is declared in BaseTsd.h as follows:

typedef ULONG32 *PULONG32;


PULONG64Pointer to a ULONG64.

This type is declared in BaseTsd.h as follows:

typedef ULONG64 *PULONG64;


PUSHORTPointer to a USHORT.

This type is declared in WinDef.h as follows:

typedef USHORT *PUSHORT;


PVOIDPointer to any type.

This type is declared in WinNT.h as follows:

typedef void *PVOID;


PWCHARPointer to a WCHAR.

This type is declared in WinNT.h as follows:

typedef WCHAR *PWCHAR;


PWORDPointer to a WORD.

This type is declared in WinDef.h as follows:

typedef WORD *PWORD;


PWSTRPointer 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;


SC_HANDLEHandle 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;


SC_LOCKLock 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;


SERVICE_STATUS_HANDLEHandle 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;


SHORTShort integer (16 bits).

This type is declared in WinNT.h as follows:

typedef short SHORT;


SIZE_TThe 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;


SSIZE_TSigned SIZE_T.

This type is declared in BaseTsd.h as follows:

typedef LONG_PTR SSIZE_T;


TBYTEA 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


TCHARA 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


UCHARUnsigned CHAR.

This type is declared in WinDef.h as follows:

typedef unsigned char UCHAR;


UHALF_PTRUnsigned 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


UINTUnsigned INT.

This type is declared in WinDef.h as follows:

typedef unsigned int UINT;


UINT_PTRUnsigned 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


UINT32Unsigned INT32.

This type is declared in BaseTsd.h as follows:

typedef unsigned int UINT32;


UINT64Unsigned INT64.

This type is declared in BaseTsd.h as follows:

typedef usigned __int 64 UINT64;


ULONGUnsigned LONG.

This type is declared in WinDef.h as follows:

typedef unsigned long ULONG;


ULONGLONG64-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


ULONG_PTRUnsigned 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


ULONG32Unsigned LONG32.

This type is declared in BaseTsd.h as follows:

typedef unsigned int ULONG32;


ULONG64Unsigned LONG64.

This type is declared in BaseTsd.h as follows:

typedef unsigned __int64 ULONG64;


UNICODE_STRINGA 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;


USHORTUnsigned SHORT.

This type is declared in WinDef.h as follows:

typedef unsigned short USHORT;


USNUpdate sequence number (USN).

This type is declared in WinNT.h as follows:

typedef LONGLONG USN;


VOIDAny type.

This type is declared in WinNT.h as follows:

#define VOID void


WCHAR16-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;


WINAPICalling convention for system functions.

This type is declared in WinDef.h as follows:

#define WINAPI __stdcall


WORD16-bit unsigned integer.

This type is declared in WinDef.h as follows:

typedef unsigned short WORD;


WPARAMMessage parameter.

This type is declared in WinDef.h as follows:

typedef UINT_PTR WPARAM;


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: