This file contains header files in Pascal and C for my upcoming TAK SDK, which is based upon a Windows DLL:
[attachment=2984:attachment]
Currently my primary programming language is (Delphi-) Pascal. Parts of my pascal header file have been translated to C by an experienced C developer, but later i have added some new features and tried to translate them to C. There is a chance that i did something wrong, especially because i never tried to compile it...
I need some help:
1) Try to compile the C-Header.
2) Check, if the C-declarations are matching the Pascal declarations.
3) Check the type definition of TtakUInt32:
#ifdef _MSC_VER
...
typedef unsigned int TtakUInt32;
#else
#error Port me!
#endif
Please report errors (or success!) in this thread. Please no discussions about general programming style...
Thank you
Thomas
Ad.1. It compiles (using tak_deco_lib.h header) and links (using tak_deco_lib.lib library) without any problems under MS Visual Studio 2005 using C++ compiler and also when using Intel C++ Compiler 9.1.
Ad.2. The header file looks OK for me, but there is one thing missing (in tak_deco_lib.h file) in comparison to pascal header:
tak_FrameSizeType_First = tak_FrameSizeType_94_ms;
tak_FrameSizeType_Last = tak_FrameSizeType_16384;
tak_FrameSizeType_Num = tak_FrameSizeType_Last - tak_FrameSizeType_First + 1;
Ad.3. For unsinged int it propobly should be:
#ifdef _MSC_VER
...
typedef unsigned __int32 TtakUInt32;
#else
#error Port me!
#endif
PS. You can check my build to see if it works with your dll - download (exe file is in 'Win32\Release' directory, sources included).