#ifdef TESTLIB_LIB# define TESTLIB_EXPORT Q_DECL_EXPORT#else# define TESTLIB_EXPORT Q_DECL_IMPORT#endifextern "C" TESTLIB_EXPORT void registerCallback(void (*inFunc)(void)){ // тело}
typedef void (__stdcall* type_registerCallback)(void (*)(void));type_registerCallback registerCallback;registerCallback = (type_registerCallback)GetProcAddress(hModule, "registerCallback");
C++ (Qt)std::vector<int> vec;...SomeCallDLL(&vec[0], vec.size());
C++ (Qt)void SomeCallDLL( int * data, int num );
void someCallBack(myStruct * data, int num);void someCallBack(myStruct * data, int num){for (int i = 0; i < num; i++){ someFunc(data[i]);}}