I'm making 64bit Delphi export programme which uses 64bit c DLLs. The problem I get is that c DLL doesn't recognise Delphi enums and returns error for the wrong data type. I've tried using {$packenums} or {$Z} directives to Delphi compiler but still same error was returned. I'm using xe8 Delphi. The enum looks like:
type
DDCDataType=(
DDC_notype = 0,
DDC_UInt8 = 5, // unsigned char
DDC_Int16 = 2, // short
DDC_Int32 = 3, // int
DDC_Float = 9, // float -> single
DDC_Double = 10, // double
DDC_String = 23 // string
);
in the c header looks like
typedef enum {
DDC_UInt8 = 5, // unsigned char
DDC_Int16 = 2, // short
DDC_Int32 = 3, // int
DDC_Float = 9, // float
DDC_Double = 10, // double
DDC_String = 23, // string
DDC_Timestamp = 30, // timestamp (Year/Month/Day/Hour/Minute/Second/Millisecond components)
} DDCDataType;
I hope this makes sense :) Thanks!