Usage of C Function Instead of C#
To execute C code in vADASdeveloper a DLL file, which contains the C code, has to be created.
In the DLL itself, the function is described as follows:
#ifdef MyDLL_EXPORTS
#define MyDLL_API __declspec(dllexport)
#else
#define MyDLL_API __declspec(dllimport)
#endif
//…
extern "C" MyDLL_API int Load(char* lpstrDummy, unsigned __int32 nDummy, unsigned __int32 nDummy2)
{
//...
}
After that, the C function is called, by including the DLL as follows:
[DllImport("Example.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int Load(String strDummy, UInt32 uintDummy1, UInt32 uintDummy2);