Documentation‎ > ‎

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 TypeJNIWrapper TypeWinPack Type
ATOMInt16Int16
BOOLIntInt
BOOLEANBoolBool
BYTEInt8Int8
CHARCharChar
COLORREFULongIntColorRef
CRITICAL_SECTIONStructure, see Windows documentation for member listStructure, see Windows documentation for member list
DWORDUInt32UInt32
DWORD_PTRUInt32, Pointer.VoidUInt32, Pointer.Void
DWORD32UInt32UInt32
FLOATSingleFloatSingleFloat
HACCELPointer.VoidHandle
HANDLEPointer.VoidHandle
HBITMAPPointer.VoidBitmap
HBRUSHPointer.VoidBrush
HCONVPointer.VoidHandle
HCONVLISTPointer.VoidHandle
HCURSORPointer.VoidCursor
HDCPointer.VoidDC
HDDEDATAPointer.VoidHandle
HDESKPointer.VoidHandle
HDROPPointer.VoidHandle
HDWPPointer.VoidHandle
HENHMETAFILEPointer.VoidHandle
HFILEPointer.VoidHandle
HFONTPointer.VoidFont
HGDIOBJPointer.VoidGdiObject
HGLOBALPointer.VoidHandle
HHOOKPointer.VoidHandle
HICONPointer.VoidIcon
HIMAGELISTPointer.VoidHandle
HIMCPointer.VoidHandle
HINSTANCEPointer.VoidHandle
HKEYPointer.VoidHandle
HKLPointer.VoidHandle
HLOCALPointer.VoidHandle
HMENUPointer.VoidHandle
HMETAFILEPointer.VoidHandle
HMODULEPointer.VoidModule
HMONITORPointer.VoidHandle
HPALETTEPointer.VoidHandle
HPENPointer.VoidHandle
HRGNPointer.VoidRegion
HRSRCPointer.VoidHandle
HSZPointer.VoidHandle
HWINSTAPointer.VoidHandle
HWNDPointer.VoidWnd
INTInt32Int32
INT_PTRInt32Int32
INT32Int32Int32
INT64Int64Int64
LANGIDUInt16UInt16
LCIDUInt32LocaleID
LCTYPEUInt32UInt32
LONGInt32Int32
LONG_PTRInt32Int32
LONG32Int32Int32
LONG64Int64Int64
LONGLONGInt64Int64
LPARAMInt32Int32
LPBOOLPointer(Int)Pointer(Int)
LPBYTEPointer(Int8)Pointer(Int8)
LPCOLORREFPointer(ULongInt)Pointer(ColorRef)
LPCRITICAL_SECTIONPointer(Structure), see Windows documentation for member listPointer(Structure), see Windows documentation for member list
LPCSTRPointer(AnsiString)Pointer(AnsiString)
LPCTSTRStrStr
LPCVOIDPointer.VoidPointer.Void
LPCWSTRPointer(WideString)Pointer(WideString)
LPDWORDPointer(UInt32)Pointer(UInt32)
LPHANDLEPointer(Pointer.Void)Pointer(Handle)
LPINTPointer(Int)Pointer(Int)
LPLONGPointer(LongInt)Pointer(LongInt)
LPSTRPointer(AnsiString)Pointer(AnsiString)
LPTSTRStrStr
LPVOIDPointer.VoidHandle
LPWORDPointer(UInt16)Pointer(UInt16)
LPWSTRPointer(WideString)Pointer(WideString)
LRESULTInt32Int32
LUIDStructure, see Windows documentation for member listStructure, see Windows documentation for member list
PBOOLPointer(Int)Pointer(Int)
PBOOLEANPointer(Bool)Pointer(Bool)
PBYTEPointer(Int8)Pointer(Int8)
PCHARPointer(Char), Pointer(AnsiString)Pointer(Char), Pointer(AnsiString)
PCRITICAL_SECTIONPointer(Structure), see Windows documentation for member listPointer(Structure), see Windows documentation for member list
PCSTRPointer(AnsiString)Pointer(AnsiString)
PCTSTRStrStr
PCWCHStrStr
PCWSTRPointer(WideString)Pointer(WideString)
PDWORDPointer(UInt32)Pointer(UInt32)
PFLOAT Pointer(SingleFloat)Pointer(SingleFloat)
PHANDLEPointer(Pointer.Void)Pointer(Handle)
PHKEYPointer(Pointer.Void)Pointer(Handle)
PINTPointer(Int)Pointer(Int)
PLCIDPointer(UInt32)Pointer(UInt32)
PLONGPointer(LongInt)Pointer(LongInt)
PLUIDPointer(Structure), see Windows documentation for member listPointer(Structure), see Windows documentation for member list
PSHORTPointer(ShortInt)Pointer(ShortInt)
PSTRPointer(AnsiString)Pointer(AnsiString)
PTBYTEStrStr
PTCHARStrStr
PUCHARPointer(Char)Pointer(Char)
PUINTPointer(UInt)Pointer(UInt)
PULONGPointer(ULongInt)Pointer(ULongInt)
PUSHORTPointer(UShortInt)Pointer(UShortInt)
PVOIDPointer.VoidHandle
PWCHARStrStr
PWORDPointer(UInt16)Pointer(UInt16)
PWSTRPointer(WideString)Pointer(WideString)
REGSAMUInt32UInt32
SC_HANDLEPointer.VoidHandle
SC_LOCKPointer.VoidHandle
SERVICE_STATUS_HANDLEPointer.VoidHandle
SHORTShortIntShortInt
SIZE_TULongIntULongInt
SSIZE_TLongIntLontInt
TBYTEChar or WideCharChar or WideChar
TCHARChar or WideCharChar or WideChar
UCHARCharChar
UINTUIntUInt
UINT_PTRUIntUInt
UINT32UInt32UInt32
ULONGULongIntULongInt
ULONG_PTRULongIntULongInt
ULONG32UInt32UInt32
ULONG64Int64Int64
ULONGLONGInt64Int64
USHORTUShortIntUShortInt
WCHARWideCharWideChar
WINAPIIndicates stdcall calling conventionIndicates stdcall calling convention
WORDUInt16UInt16
WPARAMUIntUInt