Effacer les filtres
Effacer les filtres

How create DLL using only C/C++ types?

1 vue (au cours des 30 derniers jours)
Alexander
Alexander le 16 Sep 2015
Library Compiler Application create DLL with MatLab type mwArray (for C++, and mxArray for C):
extern LIB_libcfit_CPP_API void MW_CALL_CONV cfit2(int nargout, mwArray& u, const mwArray& x);
My trading robot (MQL4/5 language of www.metaquates.net) can't use functions from DLL with such types. So I create function for robot (working in Metatrader 4):
__declspec(dllexport) int __cdecl Cfit(double* px, int N)
{
mwArray mwx(N, 1, mxDOUBLE_CLASS);
mwx.SetData(px, N);
mwArray u;
cfit2(1, u, mwx);
double result[1];
u.GetData(result, 1);
return static_cast<int>(result[0]);
}
Could you show a simple example (steps) how to create (using MatLab and/or Visual Studio) DLL for Metatrader?

Réponses (0)

Catégories

En savoir plus sur Deploy to C++ Applications Using mwArray API (C++03) dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by