Windows的数据类型

 

类型描述
ATOMAtom. For more information, see Atoms .

在 Windef.h中声明:

typedef WORD ATOM;

 

BOOLBoolean variable (should be TRUE or FALSE).

在 Windef.h中声明: :

typedef int BOOL;

 

BOOLEANBoolean variable (should be TRUE or FALSE).

在 Winnt.h中声明: 

typedef BYTE BOOLEAN;

 

BYTEByte (8 bits).

在 Windef.h中声明:

typedef unsigned char BYTE;

 

CALLBACKCalling convention for callback functions.

在 Windef.h中声明:

#define CALLBACK __stdcall

 

CHAR8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts .

在 Winnt.h中声明:

typedef char CHAR;

 

COLORREFRed, green, blue (RGB) color value (32 bits). See COLORREF for information on this type.

在 Windef.h中声明:

typedef DWORD COLORREF;

 

CONSTVariable whose value is to remain constant during execution.

在 Windef.h中声明:

#define CONST const

 

DWORD32-bit unsigned integer.

在 Windef.h中声明:

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.

在 Windef.h中声明:

typedef float FLOAT;

 

HACCELHandle to an accelerator table .

在 Windef.h中声明:

typedef HANDLE HACCEL;

 

HANDLEHandle to an object.

This type is declared in Winnt.h as follows:

typedef PVOID HANDLE;

 

HBITMAPHandle to a bitmap .

在 Windef.h中声明:

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;

 

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

 

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 Locale and Language Information .

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:

typedef __int64 LONGLONG;
#else
typedef double LONGLONG;

 

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;

 

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 *LPBOOL;

 

LPBYTEPointer to a BYTE.

This type is declared in Windef.h as follows:

typedef BYTE *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 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;

 

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;

 

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;

 

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;

 

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 POINTER32

 

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.

This type is declared in Basetsd.h as follows:

#define POINTER_64 __ptr64

 

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;

 

PUCHARPointer to a UCHAR.

This type is declared in Windef.h as follows:

typedef UCHAR *PUCHAR;

 

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;

 

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;

 

UCHARUnsigned CHAR.

This type is declared in Windef.h as follows:

typedef unsigned char UCHAR;

 

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;

 

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:

typedef unsigned __int64 ULONGLONG;
#else
typedef double ULONGLONG

 

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;

 

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;

 

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;

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值