Dynamsoft Home|Product Home

COM Data Type Mapping

In order to make Dynamic (Web) TWAIN accessable from any COM-enlightened program languages, such as VC, VB, Delphi and VBScript, only variant compliant IDL data types are used in the Dynamic (Web) TWAIN interface.

The following table is the mapping between different languages:

COM Type Visual Basic Mapping Java(J++) Mapping C/C++ Mapping Delphi Mapping C# .NET Mapping VB .NET Mapping
VARIANT_BOOL Boolean boolean VARIANT_BOOL WordBool bool Boolean
double Double double double Double double Double
float Single float float Single float Single
long Long int long Integer int Integer
short Integer short short SmallInt short Short
BSTR String java.lang.String BSTR WideString string String
DATE Date double DATE TDateTime System.DateTime Date
IDispatch* Object java.lang.Object IDispatch* IDispatch Dispatch Object
IUnknow* Interface reference com.ms.com.Variant VARIANT IUnknown object Object
VARIANT Variant com.ms.com.Variant VARIANT OleVariant object Object
CY/CURRENCY Currency long CY/CURRENCY Currency decimal Decimal

Out of the consideration of convenience, the Visual Basic data types are chosen to present the data types in this document. Using the preceding table, the VB data type can be easily mapped to C++, Delphi, C#.NET and VB.NET.

For other programming languages, please consult the accompanying document. Dynamic (Web) TWAIN is designed to be used in any COM compatible development environments.