The simple data types supported by the Win32 API are used to define function return values, function and message parameters, and structure members. They define the size and meaning of these elements
The following table contains the following types: character, integer, Boolean, pointer, and handle. The character, integer, and Boolean types are common to most C compilers. Most of the pointer-type names begin with a prefix of P or LP. A Win32-based application uses a handle to refer to a resource that has been loaded into memory.
Type | Definition |
---|---|
ABORTPROC | Pointer to an application-defined callback function that the system calls when a print job is to be canceled during spooling. See AbortProc for information on functions of this type. |
ACMDRIVERENUMCB | Pointer to an application-defined callback function that is used with acmDriverEnum. See acmDriverEnumCallback for information on functions of this type. |
ACMDRIVERPROC | Pointer to an application-defined callback function that is used with an installable audio compression manager (ACM) driver. See acmDriverProc for information on functions of this type. |
ACMFILTERCHOOSEHOOKPROC | Pointer to an application-defined function that hooks the acmFilterChoose dialog box. See acmFilterChooseHookProc for information on functions of this type. |
ACMFILTERENUMCB | Pointer to an application-defined callback function that is used with the acmFilterEnum function. See acmFilterEnumCallback for information on functions of this type. |
ACMFILTERTAGENUMCB | Pointer to an application-defined callback function that is used with acmFilterTagEnum. See acmFilterTagEnumCallback for information on functions of this type. |
ACMFORMATCHOOSEHOOKPROC | Pointer to an application-defined function that hooks the acmFormatChoose dialog box. See acmFormatChooseHookProc for information on functions of this type. |
ACMFORMATENUMCB | Pointer to an application-defined callback function that is used with the acmFormatEnum function. See acmFormatEnumCallback for information on functions of this type. |
ACMFORMATTAGENUMCB | Pointer to an application-defined callback function that is used with acmFormatTagEnum. See acmFormatTagEnumCallback for information on functions of this type. |
APPLET_PROC | Pointer to a library-defined callback function that is the entry point for a Control Panel application. See CplApplet for information on functions of this type. |
ATOM | Atom (a reference to a character string in an atom table). |
BOOL | Boolean variable (should be TRUE or FALSE). |
BOOLEAN | Boolean variable (should be TRUE or FALSE). |
BYTE | Byte (8 bits). |
CALINFO_ENUMPROC | Pointer to an application-defined callback function that receives a calendar information string. See EnumCalendarInfoProc for information on functions of this type. |
CALLBACK | Calling convention for callback functions. |
CHAR | 8-bit Windows (ANSI) character. For more information, see Character Sets Used By Fonts. |
COLORREF | Red, green, blue (RGB) color value (32 bits). See COLORREF for information on this type. |
CONST | Variable whose value is to remain constant during execution. |
CRITICAL_SECTION | Critical-section object. |
CTRYID | Country identifier. |
DATEFMT_ENUMPROC | Pointer to an application-defined callback function that receives a date format string. See EnumDateFormatsProc for information on functions of this type. |
DESKTOPENUMPROC | Pointer to an application-defined callback function that receives a desktop name. See EnumDesktopProc for information on functions of this type. |
DLGPROC | Pointer to an application-defined dialog box callback procedure. See DialogProc for information on functions of this type. |
DRAWSTATEPROC | Pointer to an application-defined callback function that renders a complex image. See DrawStateProc for information on functions of this type. |
DWORD | 32-bit unsigned integer. |
EDITWORDBREAKPROC | Pointer to an application-defined callback function that the operating system calls when a multiline edit control needs to break a line of text. See EditWordBreakProc for information on functions of this type. |
ENHMFENUMPROC | Pointer to an application-defined callback function that enumerates enhanced-metafile records. See EnhMetaFileProc for information on functions of this type. |
ENUMRESLANGPROC | Pointer to an application-defined callback function that enumerates resource languages. See EnumResLangProc for information on functions of this type. |
ENUMRESNAMEPROC | Pointer to an application-defined callback function that enumerates resource names. See EnumResNameProc for information on functions of this type. |
ENUMRESTYPEPROC | Pointer to an application-defined callback function that enumerates resource types. See EnumResTypeProc for information on functions of this type. |
FARPROC | Pointer to a callback function. |
FLOAT | Floating-point variable. |
FILE_SEGMENT_ELEMENT | 64-bit pointer to a buffer. |
FONTENUMPROC | Pointer to an application-defined callback function that enumerates fonts. See EnumFontFamExProc for information on functions of this type. |
GOBJENUMPROC | Pointer to an application-defined callback function that enumerates graphics device interface (GDI) objects. See EnumObjectsProc for information on functions of this type. |
GRAYSTRINGPROC | Pointer to an application-defined callback function that draws gray text. See OutputProc for information on functions of this type. |
HACCEL | Handle to an accelerator table. |
HANDLE | Handle to an object. |
HBITMAP | Handle to a bitmap. |
HBRUSH | Handle to a brush. |
HCOLORSPACE | Handle to a logical color space. |
HCONV | Handle to a dynamic data exchange (DDE) conversation. |
HCONVLIST | Handle to a DDE conversation list. |
HCURSOR | Handle to a cursor. |
HDC | Handle to a device context (DC). |
HDDEDATA | Handle to DDE data. |
HDESK | Handle to a desktop. |
HDROP | Handle to an internal drop structure. |
HDWP | Handle to a deferred window position structure. |
HENHMETAFILE | Handle to an enhanced metafile. |
HFILE | Handle to a file opened by OpenFile, not CreateFile. |
HFONT | Handle to a font. |
HGDIOBJ | Handle to a GDI object. |
HGLOBAL | Handle to a global memory block. |
HHOOK | Handle to a hook. |
HICON | Handle to an icon. |
HIMAGELIST | Handle to an image list. |
HIMC | Handle to input context. |
HINSTANCE | Handle to an instance. |
HKEY | Handle to a registry key. |
HKL | Handle to a keyboard layout. |
HLOCAL | Handle to a local memory block. |
HMENU | Handle to a menu. |
HMETAFILE | Handle to a metafile. |
HMODULE | Handle to a module. |
HMONITOR | Handle to a display monitor. |
HOOKPROC | Pointer to an application-defined hook function specified to SetWindowsHookEx. See the following for information on functions of this type: CallWndProc CallWndRetProc CBTProc DebugProc ForegroundIdleProc GetMsgProc JournalPlaybackProc JournalRecordProc KeyboardProc LowLevelKeyboardProc LowLevelMouseProc MessageProc MouseProc ShellProc SysMsgProc |
HPALETTE | Handle to a palette. |
HPEN | Handle to a pen. |
HRGN | Handle to a region. |
HRSRC | Handle to a resource. |
HSZ | Handle to a DDE string. |
HTREEITEM | Handle to an item in a tree-view control. |
HWINSTA | Handle to a window station. |
HWND | Handle to a window. |
INT | Signed integer. |
IPADDR | IP address. To convert this value to the "a.b.c.d" string form of an IP address, map the high-order byte to a, the low-order byte to d, and so on. |
LANGID | Language identifier. For more information, see Language Identifiers and Locales. |
LCID | Locale identifier. For more information, see Locale Identifiers (LCIDs). |
LCSCSTYPE | Color space type. |
LCSGAMUTMATCH | Gamut-matching method. |
LCTYPE | Locale information type. For a list, see LCTYPE Constants. |
LINEDDAPROC | Pointer to a callback function that processes line coordinates. See LineDDAProc for information on functions of this type. |
LOCALE_ENUMPROC | Pointer to an application-defined callback function that receives a locale identifier string. See EnumLocalesProc for information on functions of this type. |
LONG | 32-bit signed integer. |
LONGLONG | 64-bit signed integer. |
LPARAM | 32-bit message parameter. |
LPBOOL | Pointer to a BOOL. |
LPBYTE | Pointer to a BYTE. |
LPCCHOOKPROC | Pointer to an application-defined hook function used with the Color common dialog box. See CCHookProc for information on functions of this type. |
LPCFHOOKPROC | Pointer to an application-defined hook function used with the Font common dialog box. See CFHookProc for information on functions of this type. |
LPCOLORREF | Pointer to a COLORREF value. |
LPCRITICAL_SECTION | Pointer to a CRITICAL_SECTION. |
LPCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. |
LPCTSTR | An LPCWSTR if UNICODE is defined, an LPCSTR otherwise. |
LPCVOID | Pointer to a constant of any type. |
LPCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. |
LPDWORD | Pointer to a DWORD. |
LPFIBER_START_ROUTINE | Pointer to a fiber function. See FiberProc for information on functions of this type. |
LPFRHOOKPROC | Pointer to an application-defined hook function used with the Find and Replace common dialog boxes. See FRHookProc for information on functions of this type. |
LPHANDLE | Pointer to a HANDLE. |
LPHANDLER_FUNCTION | Pointer to a control handler function for a Win32 service. See Handler for information on functions of this type. |
LPINT | Pointer to an INT. |
LPLONG | Pointer to a LONG. |
LPOFNHOOKPROC | Pointer to an application-defined hook function used with the Open and Save As common dialog boxes. See OFNHookProc for information on functions of this type. |
LPPAGEPAINTHOOK | Pointer to an application-defined callback function used with the Page Setup common dialog box. See PagePaintHook for information on functions of this type. |
LPPAGESETUPHOOK | Pointer to an application-defined callback function used with the Page Setup common dialog box. See PageSetupHook for information on functions of this type. |
LPPRINTHOOKPROC | Pointer to an application-defined hook function used with the Print common dialog box. See PrintHookProc for information on functions of this type. |
LPPROGRESS_ROUTINE | Pointer to an application-defined callback function that is called by CopyFileEx. See CopyProgressRoutine for information on functions of this type. |
LPSETUPHOOKPROC | Pointer to an application-defined hook function used with the Print Setup common dialog box. See SetupHookProc for information on functions of this type. |
LPSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. |
LPSTREAM | Pointer to a stream. |
LPTHREAD_START_ROUTINE | Pointer to a thread function. See ThreadProc for information on functions of this type. |
LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise. |
LPVOID | Pointer to any type. |
LPWORD | Pointer to a WORD. |
LPWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. |
LRESULT | Signed result of message processing. |
LUID | Locally unique identifier. |
PBOOL | Pointer to a BOOL. |
PBOOLEAN | Pointer to a BOOL. |
PBYTE | Pointer to a BYTE. |
PCHAR | Pointer to a CHAR. |
PCRITICAL_SECTION | Pointer to a CRITICAL_SECTION. |
PCSTR | Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. |
PCTSTR | A PCWSTR if UNICODE is defined, a PCSTR otherwise. |
PCWCH | Pointer to a constant WCHAR. |
PCWSTR | Pointer to a constant null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. |
PDWORD | Pointer to a DWORD. |
PFLOAT | Pointer to a FLOAT. |
PFNCALLBACK | Pointer to an application-defined callback function that processes DDE transactions. See DdeCallback for information on functions of this type. |
PHANDLE | Pointer to a HANDLE. |
PHANDLER_ROUTINE | Pointer to a console control handler routine. See HandlerRoutine for information on functions of this type. |
PHKEY | Pointer to an HKEY. |
PINT | Pointer to an INT. |
PLCID | Pointer to an LCID. |
PLONG | Pointer to a LONG. |
PLUID | Pointer to a LUID. |
PROPENUMPROC | Pointer to an application-defined callback function that enumerates window properties. See PropEnumProc for information on functions of this type. |
PROPENUMPROCEX | Pointer to an application-defined callback function that enumerates window properties. See PropEnumProcEx for information on functions of this type. |
PSHORT | Pointer to a SHORT. |
PSTR | Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts. |
PTBYTE | Pointer to a TBYTE. |
PTCHAR | Pointer to a TCHAR. |
PTIMERAPCROUTINE | Pointer to a timer completion routine. See TimerAPCProc for information on functions of this type. |
PTSTR | A PWSTR if UNICODE is defined, a PSTR otherwise. |
PUCHAR | Pointer to a UCHAR. |
PUINT | Pointer to a UINT. |
PULONG | Pointer to a ULONG. |
PUSHORT | Pointer to a USHORT. |
PVOID | Pointer to any type. |
PWCHAR | Pointer to a WCHAR. |
PWORD | Pointer to a WORD. |
PWSTR | Pointer to a null-terminated string of 16-bit Unicode characters. For more information, see Character Sets Used By Fonts. |
REGISTERWORDENUMPROC | Pointer to an application-defined callback function that processes register strings. See EnumRegisterWordProc for information on functions of this type. |
REGSAM | Security access mask for registry key. |
SC_HANDLE | Handle to a service control manager database. |
SC_LOCK | Handle to a service control manager database lock. |
SENDASYNCPROC | Pointer to an application-defined callback function that the operating system calls when SendMessageCallback is called. See SendAsyncProc for information on functions of this type. |
SERVICE_STATUS_HANDLE | Handle to a service status value. |
SHORT | Short integer. |
TBYTE | A WCHAR if UNICODE is defined, a CHAR otherwise. |
TCHAR | A WCHAR if UNICODE is defined, a CHAR otherwise. |
TIMEFMT_ENUMPROC | Pointer to an application-defined callback function that receives a time format string. See EnumTimeFormatsProc for information on functions of this type. |
TIMERPROC | Pointer to an application-defined timer callback function. See TimerProc for information on functions of this type. |
UCHAR | Unsigned CHAR. |
UINT | Unsigned INT. |
ULONG | Unsigned LONG. |
ULONGLONG | 64-bit unsigned integer. |
UNSIGNED | Unsigned attribute. |
USHORT | Unsigned SHORT. |
VOID | Any type. |
WCHAR | 16-bit Unicode character. For more information, see Character Sets Used By Fonts. |
WINAPI | Calling convention for the Win32 API. |
WINSTAENUMPROC | Pointer to an application-defined callback function that receives a window station name. See EnumWindowStationProc for information on functions of this type. |
WNDENUMPROC | Pointer to an application-defined callback function that enumerates windows. See the following for information on functions of this type: EnumChildProc EnumThreadWndProc EnumWindowsProc |
WNDPROC | Pointer to an application-defined window procedure. See WindowProc for information on functions of this type. |
WORD | 16-bit unsigned integer. |
WPARAM | 32-bit message parameter. |
YIELDPROC | Pointer to a yield callback function. See mciSetYieldProc for information on functions of this type. |