Windows Data Types

数据类型的支持®微软Windows®用来定义函数的返回值,函数和消息参数,以及结构构件。它们定义了这些元素的大小和意义。下表包含以下类型:字符、整型、布尔值、指针和句柄。的字符,整数和布尔类型是常见的大多数编译器。大多数的指针类型名称以一个p或lp的前缀开头。句柄是指已加载到内存中的资源。

TypeDefinition
ATOMAtom. For more information, see Atoms.
BOOLBoolean variable (should be TRUE or FALSE).
BOOLEANBoolean variable (should be TRUE or FALSE).
BYTEByte (8 bits).
CALLBACKCalling convention for callback functions.
CHAR8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts.
COLORREFRed, green, blue (RGB) color value (32 bits). See COLORREF for information on this type.
CONSTVariable whose value is to remain constant during execution.
CRITICAL_SECTIONCritical-section object. For more information, see Critical Section Objects.
DWORD32-bit unsigned integer.
DWORD_PTRUnsigned long type for pointer precision. Use when casting a pointer to a long type to perform pointer arithmetic.
DWORD3232-bit unsigned integer.
DWORD6464-bit unsigned integer.
FLOATFloating-point variable.
HACCELHandle to an accelerator table.
HANDLEHandle to an object.
HBITMAPHandle to a bitmap.
HBRUSHHandle to a brush.
HCONVHandle to a dynamic data exchange (DDE) conversation.
HCONVLISTHandle to a DDE conversation list.
HCURSORHandle to a cursor.
HDCHandle to a device context (DC).
HDDEDATAHandle to DDE data.
HDESKHandle to a desktop.
HDROPHandle to an internal drop structure.
HDWPHandle to a deferred window position structure.
HENHMETAFILEHandle to an enhanced metafile.
HFILEHandle to a file opened by OpenFile, not CreateFile.
HFONTHandle to a font.
HGDIOBJHandle to a GDI object.
HGLOBALHandle to a global memory block.
HHOOKHandle to a hook.
HICONHandle to an icon.
HIMAGELISTHandle to an image list.
HIMCHandle to input context.
HINSTANCEHandle to an instance.
HKEYHandle to a registry key.
HKLInput locale identifier.
HLOCALHandle to a local memory block.
HMENUHandle to a menu.
HMETAFILEHandle to a metafile.
HMODULEHandle to a module.
HMONITORHandle to a display monitor.
HPALETTEHandle to a palette.
HPENHandle to a pen.
HRGNHandle to a region.
HRSRCHandle to a resource.
HSZHandle to a DDE string.
HWINSTAHandle to a window station.
HWNDHandle to a window.
INT32-bit signed integer.
INT_PTRSigned integral type for pointer precision. Use when casting a pointer to an integer to perform pointer arithmetic.
INT3232-bit signed integer.
INT6464-bit signed integer.
LANGIDLanguage identifier. For more information, see Locales.
LCIDLocale identifier. For more information, see Locales.
LCTYPELocale information type. For a list, see Locale and Language Information
LONG32-bit signed integer.
LONG_PTRSigned long type for pointer precision. Use when casting a pointer to a long to perform pointer arithmetic.
LONG3232-bit signed integer.
LONG6464-bit signed integer.
LONGLONG64-bit signed integer.
LPARAMMessage parameter.
LPBOOLPointer to a BOOL.
LPBYTEPointer to a BYTE.
LPCOLORREFPointer to a COLORREF value.
LPCRITICAL_SECTIONPointer to a CRITICAL_SECTION.
LPCSTRPointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPCTSTRAn LPCWSTR if UNICODE is defined, an LPCSTR otherwise.
LPCVOIDPointer to a constant of any type.
LPCWSTRPointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LPDWORDPointer to a DWORD.
LPHANDLEPointer to a HANDLE.
LPINTPointer to an INT.
LPLONGPointer to a LONG.
LPSTRPointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
LPTSTRAn LPWSTR if UNICODE is defined, an LPSTR otherwise.
LPVOIDPointer to any type.
LPWORDPointer to a WORD.
LPWSTRPointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
LRESULTSigned result of message processing.
LUIDLocally unique identifier.
PBOOLPointer to a BOOL.
PBOOLEANPointer to a BOOL.
PBYTEPointer to a BYTE.
PCHARPointer to a CHAR.
PCRITICAL_SECTIONPointer to a CRITICAL_SECTION.
PCSTRPointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PCTSTRA PCWSTR if UNICODE is defined, a PCSTR otherwise.
PCWCHPointer to a constant WCHAR.
PCWSTRPointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
PDWORDPointer to a DWORD.
PFLOATPointer to a FLOAT.
PHANDLEPointer to a HANDLE.
PHKEYPointer to an HKEY.
PINTPointer to an INT.
PLCIDPointer to an LCID.
PLONGPointer to a LONG.
PLUIDPointer to a LUID.
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.
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.
PSHORTPointer to a SHORT.
PSTRPointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
PTBYTEPointer to a TBYTE.
PTCHARPointer to a TCHAR.
PTSTRA PWSTR if UNICODE is defined, a PSTR otherwise.
PUCHARPointer to a UCHAR.
PUINTPointer to a UINT.
PULONGPointer to a ULONG.
PUSHORTPointer to a USHORT.
PVOIDPointer to any type.
PWCHARPointer to a WCHAR.
PWORDPointer to a WORD.
PWSTRPointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts.
REGSAMSecurity access mask for registry key.
SC_HANDLEHandle to a service control manager database. For more information, see SCM Handles.
SC_LOCKHandle to a service control manager database lock. For more information, see SCM Handles.
SERVICE_STATUS_HANDLEHandle to a service status value. For more information, see SCM Handles.
SHORTShort integer (16 bits).
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.
SSIZE_TSigned SIZE_T.
TBYTEA WCHAR if UNICODE is defined, a CHAR otherwise.
TCHARA WCHAR if UNICODE is defined, a CHAR otherwise.
UCHARUnsigned CHAR.
UINTUnsigned INT.
UINT_PTRUnsigned INT_PTR.
UINT32Unsigned INT32.
UINT64Unsigned INT64.
ULONGUnsigned LONG.
ULONG_PTRUnsigned LONG_PTR.
ULONG32Unsigned LONG32.
ULONG64Unsigned LONG64.
ULONGLONG64-bit unsigned integer.
UNSIGNEDUnsigned attribute.
USHORTUnsigned SHORT.
VOIDAny type.
WCHAR16-bit Unicode character. For more information, see Character Sets Used By Fonts.
WINAPICalling convention for system functions.
WORD16-bit unsigned integer.
WPARAMMessage parameter.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值