I have a DLL with one single function That gets five doubles and one int:
__declspec(dllexport) struct res ITERATE(double z_r,double z_i,double c_r, double
There is a problem with returning structs like that. Not all compilers return such structures the same way. I'd rather change the function declaration to this:
void __declspec(dllexport) ITERATE(struct res* result, double z_r,double z_i,
double c_r, double c_i, int iterations, double limit);
That way the struct is in the user's memory, and there is no ambiguity on how the struct will be returned.
Of course, as David said, you may have to use a different calling convention.