Delphi 与 C/C++ 数据类型对照表

Delphi 数据类型 C/C++
ShorInt 8位有符号整数 char
Byte 8位无符号整数 BYTE,unsigned short
SmallInt 16位有符号整数 short
Word 16位无符号整数 unsigned short
Integer,LongInt 32位有符号整数 int,long
Cardinal,LongWord/DWORD 32位无符号整数 unsigned long
Int64 64位有符号整数  _int64
Single 4字节浮点数 float
*Real48 6字节浮点数  
Double 8字节浮点数 double
*Extended 10字节浮点数 long double
Currency 64位货币类型  
TDate/TDateTime 8字节日期/时间  
Variant,OleVariant 16字节可变类型 VARIANT,^Variant,^OleVariant
Char,AnsiChar 1字节字符 char
WideChar 2字节字符 WCHAR
*ShortString 短字符串  
AnsiString/String 长字符串 ^AnsiString
WideString 宽字符串 ^WideString
PChar,PAnsiChar NULL结束的字符串 char*
PWideChar NULL结束的宽字符串 LPCWSTR
Boolean,ByteBool 1字节布尔类型 任何1字节
WordBool 2字节布尔类型 任何2字节
BOOL,LongBool 4字节布尔类型 BOOL
注:有*前缀的是向前兼容类型;有^前缀的是C++Builder特有类型。


C/C++ Delphi
ABC TABC
ACCEL TAccel
ATOM TAtom
BITMAP TBitMap
BITMAPCOREHEADER TBitmapCoreHeader
BITMAPCOREINFO TBitmapCoreInfo
BITMAPFILEHEADER TBitmapFileHeader
BITMAPINFO TBitmapInfo
BITMAPINFOHEADER TBitmapInfoHeader
BOOL Bool
CBT_CREATEWND TCBT_CreateWnd
CBTACTIVATESTRUCT TCBTActivateStruct
CHAR Char
CHAR* PChar
CLIENTCREATESTRUCT TClientCreateStruct
COLORREF TColorRef
COMPAREITEMSTRUCT TCompareItemStruct
COMSTAT TComStat
CREATESTRUCT TCreateStruct
CTLINFO TCtlInfo
CTLSTYLE TCtlStyle
CTLtype TCtltype
DCB TDCB
DDEAACK TDDEAck
DDEADVISE TDDEAdvise
DDEDATA TDDEData
DDEPOKE TDDEPoke
DEBUGHOOKINFO TDebugHookInfo
DELETEITEMSTRUCT TDeleteItemStruct
DEVMODE TDevMode
DOUBLE Double
DRAWITEMSTRUCT TDrawItemStruct
DWORD LongInt
ENUMLOGFONT TEnumLogFont
EVENTMSG TEventMsg
FARPROC TFarProc
FIXED TFixed
FLOAT Single
GLYPHMETRICS TGlyphMetrics
HANDLE THandle
HANDLETABLE THandleTable
HARDWAREHOOKSTRUCT THardwareHookStruct
HELPWININFO THelpWinInfo
INT Integer
KERNINGPAIR TKerningPair
LOGBRUSH TLogBrush
LOGFONT TLogFont
LOGPALETTE TLogPalette
LOGPEN TLogPen
LONG LongInt
LONG DOUBLE Extended
LONG INT LongInt
LPSTR PChar
LPWSTR PWideChar
MAT2 TMat2
MDICREATESTRUCT TMDICreateStruct
MEASUREITEMSTRUCT TMeasureItemStruct
MENUITEMTEMPLATE TMenuItemTemplate
MENUITEMTEMPLATEHEADER TMenuItemTemplateHeader
METAFILEPICT TMetaFilePict
METAHEADER TMetaHeader
METARECORD TMetaRecord
MINMAXINFO TMinMaxInfo
MOUSEHOOKSTRUCT TMouseHookStruct
MSG TMsg
MULTIKEYHELP TMultiKeyHelp
NCCALCSIZE_PARAMS TNCCalcSize_Params
NEWTEXTMETRIC TNewTextMetric
OFSTRUCT TOFStruct
OUTLINETEXTMETRIC TOutlineTextMetric
PAINTSTRUCT TPaintStruct
PALETTEENTRY TPaletteEntry
PANOSE TPanose
PATTERN TPattern
POINTFX TPointFX
PSTR PChar
PWSTR PWideChar
RASTERIZER_STATUS TRasterizer_Status
RGBQUAD TRGBQuad
RGBTRIPLE TRGBTriple
SEGINFO TSegInfo
SHORT SmallInt
SHORT INT SmallInt
SIZE TSize
TEXTMETRIC TTextMetric
TPOINT TPoint
TRECT TRect
TTPOLYCURVE TTTPolyCurve
TTPOLYGONHEADER TPolygonHeader
UINT Word
UNSIGNED Word
UNSIGNED CHAR Byte
UNSIGNED INT Word
UNSIGNED LONG LongInt(DWORD)
UNSIGNED LONG INT LongInt
UNSIGNED SHORT Word
UNSIGNED SHORT INT Word
VOID* Pointer
WINDOWPLACEMENT TWindowPlacement
WINDOWPOS TWindowPos
WNDCLASS TWndClass
WORD Word


你可能感兴趣的:(Delphi 与 C/C++ 数据类型对照表)