Mapping Windows Data Types

Notes

  • Most pointer-type names begin with the prefix P or LP.
  • Handles refer to a resource that has been loaded into the memory.
  • Certain types may allow parameter representations different from the ones specified here.
  • Pointers to simple types may need to be represented as arrays of those types.
  • Representation of the Unicode-aware types such as LPTSTR or TCHAR depends on the actual type of the called function: use WideString (WideChar) when calling Unicode function version and AnsiString (Char) when calling ANSI version.
  • Most Unicode versions of functions end with "W", and ANSI functions normally end with "A".

Data Types

Windows Type
JNIWrapper Type
WinPack Type
ATOM
Int16
BOOL
Int
BOOLEAN
Bool
BYTE
Int8
CHAR
Char
COLORREF
CRITICAL_SECTION
Structure, see Windows documentation for member list
Structure, see Windows documentation for member list
DWORD
UInt32
DWORD_PTR
UInt32, Pointer.Void
DWORD32
UInt32
FLOAT
SingleFloat
HACCEL
HANDLE
HBITMAP
HBRUSH
HCONV
HCONVLIST
HCURSOR
HDC
HDDEDATA
HDESK
HDROP
HDWP
HENHMETAFILE
HFILE
HFONT
HGDIOBJ
HGLOBAL
HHOOK
HICON
HIMAGELIST
HIMC
HINSTANCE
HKEY
HKL
HLOCAL
HMENU
HMETAFILE
HMODULE
HMONITOR
HPALETTE
HPEN
HRGN
HRSRC
HSZ
HWINSTA
HWND
INT
Int32
INT_PTR
Int32
INT32
Int32
INT64
Int64
LANGID
UInt16
LCID
LocaleID
LCTYPE
UInt32
LONG
Int32
LONG_PTR
Int32
LONG32
Int32
LONG64
Int64
LONGLONG
Int64
LPARAM
Int32
LPBOOL
Pointer(Int)
LPBYTE
Pointer(Int8)
LPCOLORREF
Pointer(ColorRef)
LPCRITICAL_SECTION
Pointer(Structure), see Windows documentation for member list
Pointer(Structure), see Windows documentation for member list
LPCSTR
Pointer(AnsiString)
LPCTSTR
Str
LPCVOID
Pointer.Void
LPCWSTR
Pointer(WideString)
LPDWORD
Pointer(UInt32)
LPHANDLE
Pointer(Handle)
LPINT
Pointer(Int)
LPLONG
Pointer(LongInt)
LPSTR
Pointer(AnsiString)
LPTSTR
Str
LPVOID
LPWORD
Pointer(UInt16)
LPWSTR
Pointer(WideString)
LRESULT
Int32
LUID
Structure, see Windows documentation for member list
Structure, see Windows documentation for member list
PBOOL
Pointer(Int)
PBOOLEAN
Pointer(Bool)
PBYTE
Pointer(Int8)
PCHAR
Pointer(Char), Pointer(AnsiString)
Pointer(Char), Pointer(AnsiString)
PCRITICAL_SECTION
Pointer(Structure), see Windows documentation for member list
Pointer(Structure), see Windows documentation for member list
PCSTR
Pointer(AnsiString)
PCTSTR
Str
PCWCH
Str
PCWSTR
Pointer(WideString)
PDWORD
Pointer(UInt32)
PFLOAT Pointer(SingleFloat)
PHANDLE
Pointer(Handle)
PHKEY
Pointer(Handle)
PINT
Pointer(Int)
PLCID
Pointer(UInt32)
PLONG
Pointer(LongInt)
PLUID
Pointer(Structure), see Windows documentation for member list
Pointer(Structure), see Windows documentation for member list
PSHORT
Pointer(ShortInt)
PSTR
Pointer(AnsiString)
PTBYTE
Str
PTCHAR
Str
PUCHAR
Pointer(Char)
PUINT
Pointer(UInt)
PULONG
Pointer(ULongInt)
PUSHORT
Pointer(UShortInt)
PVOID
PWCHAR
Str
PWORD
Pointer(UInt16)
PWSTR
Pointer(WideString)
REGSAM
UInt32
SC_HANDLE
SC_LOCK
SERVICE_STATUS_HANDLE
SHORT
ShortInt
SIZE_T
ULongInt
SSIZE_T
LontInt
TBYTE
Char or WideChar
TCHAR
Char or WideChar
UCHAR
Char
UINT
UInt
UINT_PTR
UInt
UINT32
UInt32
ULONG
ULongInt
ULONG_PTR
ULongInt
ULONG32
UInt32
ULONG64
Int64
ULONGLONG
Int64
USHORT
UShortInt
WCHAR
WideChar
WINAPI
Indicates stdcall calling convention
Indicates stdcall calling convention
WORD
UInt16
WPARAM
UInt