Data type of Windows API and Delphi data type comparison table

Source: Internet
Author: User
Tags comparison table

Original: Data type of Windows API and Delphi data type comparison table

Windows Data types Delphi Data types Describe
LPSTR Pansichar string pointers
LPCSTR Pansichar string pointers
DWORD Longword Integer
BOOL Longbool Boolean type
Pbool ^bool Pointer to a Boolean value
Pbyte ^byte Pointer to byte value
PINT ^integer Pointer to integer value
Psingle ^single Pointer to single-precision floating-point value
Pword ^word Pointer to a 16-bit value
Pdword ^dword Pointer to a 32-bit value
Lpdword Pdword Pointer to a 32-bit value
UCHAR Byte 8-bit value (can be used to represent characters)
Puchar ^byte Pointer to a 8-bit value
Short Smallint Signed 16-bit integer
UINT Longword Unsigned 32-bit integer
Puint ^uint Pointer to unsigned 32-bit integer
ULONG Cardinal Unsigned 32-bit integer
Pulong ^ulong Pointer to unsigned 32-bit integer
Plongint ^longint Pointer to a 32-bit value
Pinteger ^integer Pointer to a 32-bit value
Psmallint ^smallint Pointer to a 16-bit value
Pdouble ^double Pointer to double-precision floating-point value
Lcid DWORD Local identifiers
LANGID Word Language identifiers
Thandle Longword Object handle
Phandle ^thandle Pointer to handle
Woaram Longint 32-bit message parameters
LPARAM Longint 32-bit message parameters
LRESULT Longint 32-bit function return value
HWND Longword Window handle
Hhook Longword Windows Hook handle
ATOM Word String index in a local or global atomic table
Hglobal Thandle Global dynamic Memory Handle
Hlocal Thandle Local dynamic memory handle (32-bit with HGLOBAL no difference)
Farproc Pointer A pointer to a procedure, usually as a parameter type in a function that requires a callback function
Hgdiobj Longword GDI object handle
Hbitmap Longword Windows Bitmap Object Handle
Hbrush Longword Windows Paint Brush Object Handle
HDC Longword Device Environment handle
Henhmetafile Longword Windows Enhanced Metafile object handle
Hfont Longword Windows logical Font Object handle
Hicon Longword Windows Icon Object handle
HMENU Longword Windows Menu Object Handle
Hmetafile Longword Windows Metafile Object handle
HINST Thandle Instance (instance) object handle
Hmodule HINST Module handle
Hpalette Longword Windows Palette Object Handle
Hpen Longword Windows Brush Object Handle
HRGN Longword Windows Zone Object Handle
Hrsrc Thandle Windows Resource Object Handle
HKL Longword Windows keyboard Layout handles
hfile Longword Handle of Open File
Hcursor Hicon Windows Mouse Cursor Object handle
Colorref DWORD Windows color index value handle, containing three components of red, green, and blue

Data type of Windows API and Delphi data type comparison table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.