Everything works with C or C++, they are very powerful programming languages. Code in C is identical to C++ for what you want to do.
We don’t have any example code in C, but the internet and this forum is absolutely full of examples on how to load and use a DLL in C. Search for keywords like “LoadLibrary”, “GetProcAddress”, and “Dynamically loading a DLL in C”. This article may also be interesting to you: msdn.microsoft.com/en-us/library/ms810279.aspx
It is very confusing if you mix french and english in source code.
ok thank you, could you please confirm arguments and returned value of function SMCConnect :
I wrote in C++ : bool SMCConnect(string*; long);
SMCConnect return a bool
SMCConnect has 2 arguments :
string* -> pointer on a string wish contain USB port address
long -> engines quantity (1 for K8096 or 4 for K8097)
[quote=“MostlyHarmless”]However, WinDef.h defines BOOL as
typedef int BOOL;
which means it is represented in a 32 bit signed integer. So both statements are actually true.[/quote]That is absolutely correct. I chose 32-bit integer because it is important that it is 32-bits. Bool does not always have the same value for true and false across all programming languages.
Hi,
i would like to control my K8097 board with C/C++, too. But I cannot find the respective header file or any API reference.
Can anyone post a link to the api documentation of the mtrapi32.dll?