Delphi Data Types for API Integration


Sometime we may need to integrate APIs written on other languages into our Delphi application or we may need to call windows APIs when dealing with complex data structures or we may need to communicate with ActiveX OLE components. Then  in such cases, main issue is Data Type mismatch. So for better compatibility Delphi provides following Pointer data types which can be used to send and receive data to and from other application to Delphi applications.

Integer Data Types

Type
Description
Pointer
8-bit unsigned integer
8-bit signed integer
16-bit unsigned integer
16-bit signed integer
32-bit unsigned integer
32-bit unsigned integer
64-bit unsigned integer
32-bit unsigned integer
32-bit signed integer
32-bit signed integer
64-bit signed integer
32-bit signed integer
64-bit unsigned integer
64-bit signed integer
64-bit or 32-bit platform-dependent unsigned integer
64-bit or 32-bit platform-dependent signed integer



Floating-point Data Types
Type
Description
Pointer
Single precision floating-point value (4 bytes)
Double precision floating-point value (8 bytes)
Extended precision floating-point value

String and Character Data Types
Type
Description
Pointer
ANSI character
Wide character (16-bit)
16-bit character
Represents a dynamically allocated ANSI string whose maximum length is limited only by available memory.
Use as a "codepage-agnostic" parameter to a method or function, or as a variable type to store BLOB data.
Unicode string
Alias for UnicodeString
A string of maximum 255 characters
A string of 16-bit characters

Boolean Data Types
Type
Description
Pointer
Represents a logical value (true or false).
Represents an 8-bit logical value.
Represents a 16-bit logical value.
Represents a 32-bit logical value.

Other Data Types
Type
Description
Pointer
Represents values that can change type at run time.
Represents a pointer to data of any type.
A fixed-point data type used to hold monetary values.


Comments

  1. Delphi Programming/Data types. In Delphi, like in C, VB and unlike PHP, Python or other modern languages, a variable is typed and can only contain values of this type. To make it simple, a type is a variable attribute.
    sms api php

    ReplyDelete
  2. An attention-grabbing discussion is worth comment. I feel that you must write extra on this subject, it may not be a taboo subject but generally persons are not sufficient to talk on such topics. To the next. vba programmierung berlin

    ReplyDelete

Post a Comment

Popular posts from this blog

MS Excel Automation in Delphi

ShellExecute in Delphi

Drawing Shapes in Delphi