07-02-2009 08:53 AM - edited 07-02-2009 08:59 AM
You call delete[] on arrays that are parameters so your DLL _does_ modify parameters!
See snip below:
char PSIM[250];
_declspec(dllexport) int32_t dllbeta1(..., char cheminpsim[], ...)
{
strcpy(PSIM,cheminpsim);
delete [] cheminpsim;
...
}
Since LabVIEW doesn't allocate "char cheminpsim[]" via plain operator new[]
you _mustn't_ call delete[] on it!!!
And if you don't use your variables in other functions make the variables local.
Use global variables only if you have to.
It isn't a problem with LabVIEW here, any caller in C++ which doesn't use new[]
and calls your function will also fail in the very same manner.
07-06-2009 07:25 AM
nobody for my F**k C++ code ?.... lol
It's maybe in my way to create DLL ...
thanks