Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 16

Previous Page 15   Index   Next Page 17

Data types
Page 16 of 750
uses two bytes for every character and the byte ordering of the CPU must be considered to get
correct results on little-endian and big-endian machines.
However, the multi-byte format is only supported in combination with native CJK fonts and
character sets (cpBig5, cpShiftJIS, cpGB2312 and so on), see SetFont() for further information.
The Ansi format is the usual format for CJK strings and supported by all CJK code pages.
When using CJK to Unicode code pages, DynaPDF must convert the incoming CJK string to
Unicode before it can be used with the selected font. The required conversion algorithms are only
available in the Ansi version of a string function. Because of this it is not possible to use the multi-
byte format with CJK to Unicode code pages.
Data types used by different programming languages
Not all programming languages support all data types which are available in C or C++. The
following table describes the data types which are used by a specific programming language.
Types in black color are not natively supported.
C type
C++ type
Delphi type
VB type
VB .Net type
C#
char*
char*
PAnsiChar
String
String
String
UI16*
UI16*
PWideChar
String
String
String
UI32*
UI32*
Pointer
N/A
N/A
N/A
SI32
SI32
Integer
Long
Integer
int
UI32
UI32
Cardinal
Long
Integer
int
double
double
Double
Double
Double
double
LBOOL
LBOOL
LongBool
Long
Integer
lbool (Int32)
bool
bool
Boolean
Boolean
Boolean
bool
void*
void*
Pointer
Long
IntPtr
IntPtr
VB .Net and C# support also unsigned data types such as unsigned integer and so on. However,
the .Net framework requires always an explicit conversion if an unsigned type should be passed
to a signed type or vice versa. Because of this, the unsigned data types are used for very few
functions in VB .Net and C#.
Prior versions of DynaPDF used the abbreviations LONG, ULONG, SHORT, and USHORT in the
C/C++ interfaces. For compatibility reasons these data types are still defined on 32 bit Windows,
Linux, and UNIX. However, these declarations conflict with existing declarations on 64 bit
Windows operating systems so that these types should no longer be used.
 

Previous topic: CJK Multi-byte Strings

Next topic: Exception handling in C, C++, C#, Delphi