I have a .h
file that I need to translate into Delphi, to call a DLL interface that is written in C/C++.
In 32bit, everything goes well, I can use the DLL with a Delphi app with no issue.
In 64bit, it does not work very well.
I did not write this DLL interface, it comes from a third party that does hardware.
namespace gXusb {
typedef int INTEGER;
typedef short INT16;
typedef unsigned CARDINAL;
typedef unsigned char CARD8;
typedef float REAL;
typedef double LONGREAL;
typedef char CHAR;
typedef unsigned char BOOLEAN;
typedef void * ADDRESS;
struct CCamera;
extern "C" EXPORT_ void __cdecl Enumerate( void (__cdecl *CallbackProc)(CARDINAL) );
extern "C" EXPORT_ CCamera *__cdecl Initialize( CARDINAL Id );
Is Cardinal
still 32bit unsigned under 64bit?
I'm not very sure about this way of declaring this function type and what it does with 64bit compilation:
void (__cdecl *CallbackProc)(CARDINAL)
It looks a bit cumbersome.
What puzzles me is this:
typedef unsigned CARDINAL;
I have figured out this is 32bit for a 32bit DLL, but did it stay 32bit under a 64bit DLL?