LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type

Definition and Usage

L_WCHAR

Defined as WCHAR; used as a 16-bit UNICODE character.

L_CHAR

Defined as char; used as a signed 8-bit integer.

L_UCHAR

Defined as unsigned char; used as an unsigned 8-bit integer.

 

 

Integer types

 

L_INT8

Defined as signed char; used as an 8-bit signed integer.

L_INT16

Defined as signed short; used as a 16-bit signed integer.

L_INT32

Defined as signed int; used as a 32-bit signed integer.

L_INT64

Defined as signed __int64; used as a 64-bit signed integer.

L_UINT8

Defined as unsigned char; used as an 8-bit unsigned integer.

L_UINT16

Defined as unsigned short; used as a 16-bit unsigned integer.

L_UINT32

Defined as unsigned int; used as a 32-bit unsigned integer.

L_UINT64

Defined as unsigned __int64; used as a 64-bit unsigned integer.

L_INT

Defined as int; used as a 32-bit signed integer.

L_UINT

Defined as unsigned int; used as a 32-bit unsigned integer.

 

 

Long and Short

 

L_LONG

Defined as long; used as a signed integer, 32-bits or larger.

L_ULONG

Defined as unsigned long; used as an unsigned integer, 32-bits or larger.

L_USHORT

Defined as unsigned short; used as a 16-bit unsigned integer.

 

 

Float types

 

L_FLOAT

Defined as float; used as a floating point number.

L_DOUBLE

Defined as double; used as a double precision floating point number.

 

 

32/64 Types

 

L_INT_PTR

Defined as INT_PTR; Guaranteed to be the same size as a pointer. The size changes with pointer size (32/64). Used where a pointer is cast to an integer type.

L_UINT_PTR

Defined as UINT_PTR; Unsigned variation of L_INT_PTR.

L_LONG_PTR

Defined as LONG_PTR; Guaranteed to be the same size as a pointer. The size changes with pointer size (32/64). Used where a pointer is cast to an integer type.

L_ULONG_PTR

Defined as ULONG_PTR; Unsigned variation of L_LONG_PTR.

 

 

L_SIZE_T

Defined as SIZE_T; Maximum number of bytes to which a pointer can refer.

L_SSIZE_T

Signed version of L_SIZE_T.

 

 

Other types

 

L_VOID

Defined as void; used as a void.

L_BITFIELD

Defined as L_UINT; used as a bit field.

L_COLOREF

Defined as COLORREF; See Windows SDK.

 

 

Booleans

 

L_BOOL

Defined as BOOL; used as a boolean value.

 

 

UNICODE types

 

L_TCHAR

Defined as either char or TCHAR. If FOR_UNICODE is defined, then L_TCHAR will be defined as TCHAR.

 

 

Handles

 

L_HANDLE

Defined as HANDLE; See Windows SDK.

L_HFILE

Defined as HANDLE; See Windows SDK.

L_HWND

Defined as HWND; See Windows SDK.

L_HGDIOBJ

Defined as HGDIOBJ; See Windows SDK.

L_HDC

Defined as HDC; See Windows SDK.

L_HRGN

Defined as HRGN; See Windows SDK.

L_HPALETTE

Defined as HPALETTE; See Windows SDK.

L_HBITMAP

Defined as HBITMAP; See Windows SDK.

L_HCURSOR

Defined as HCURSOR; See Windows SDK.

L_HICON

Defined as HICON; See Windows SDK.

L_HMETAFILE

Defined as HMETAFILE; See Windows SDK.

L_HENHMETAFILE

Defined as HENHMETAFILE; See Windows SDK.

L_HDIB

Defined as HDIB; See Windows SDK.

L_HINSTANCE

Defined as HINSTANCE; See Windows SDK.

L_HPEN

Defined as HPEN; See Windows SDK.

L_HFONT

Defined as HFONT; See Windows SDK.

L_HBRUSH

Defined as HBRUSH; See Windows SDK.

L_HGLOBAL

Defined as HGLOBAL; See Windows SDK.

 

 

Structures

 

L_RGBQUAD

Defined as RGBQUAD; See Windows SDK.

L_POINT

Defined as POINT; See Windows SDK.

L_RECT

Defined as RECT; See Windows SDK.

L_BITMAPINFOHEADER

Defined as BITMAPINFOHEADER; See Windows SDK.

L_BITMAPINFO

Defined as BITMAPINFO; See Windows SDK.

 

 

Calling Convention

 

L_xxx_API

Defined as __declspec(dllimport) __stdcall.  NOTE: xxx is the module designation. Examples: L_LTDIS_API - LTDIS, L_LTKRN_API - LTKRN