I have the following two function declarations in my header file:
// 8 pointer argument function__declspec(dllexport)double myfun8(double *a, double *b, double *c, double *d, double *e, double *f, double *g,double* h);//9 pointer argument function__declspec(dllexport)double myfun9(double *a, double *b, double *c, double *d, double *e, double *f, double *g, double * h, double *i);
I create a DLL using Visual C++ 2005 express edition and load it into MATLAB using the LOADLIBRARY function. However, when I inspect the imported function using the function: LIBFUNCTIONS, the function signatures are not consistent:
[ doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr] myfun8(doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr) double myfun9(doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr, doublePtr)
The function with 9 output arguments is shown to have only one output argument.
Best Answer