Enum problems when loading 64bit c DLLs in 64bit Delphi
<p>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:</p>

<pre><code>type  
DDCDataType=(
    DDC_notype = 0,
    DDC_UInt8 = 5,  // unsigned char
    DDC_Int16 = 2,  // short
    DDC_Int32 = 3,  // int
    DDC_Float = 9,  // float -&gt; single
    DDC_Double = 10,    // double
    DDC_String  = 23    // string
);
</code></pre>

<p>in the c header looks like</p>

<pre><code>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;
</code></pre>

<p>I hope this makes sense :) 
Thanks!</p>