Excel crashes when accessing an XLL function.

Hi, first post here as I've searched everywhere and can't find a solution, hope someone here can help!

I have tracked the troublesome code to the lines printed below.

Basically, I have a function called "MinMW" and within this function I have this call:

1
2
3
4
5
double* vals = new double [37];

Station.Parameters(vals,Temp,.......); // Long list of arguments

double TotalPower = vals[0];


The "Parameters" function is this:

1
2
3
4
5
6
7
8
9
10
11
int Station::Parameters(double *vals, double Tamb, ........) {

// Lots of code, skip to important bit

vals[0] = 123.4;
// ...
vals[36] = 123.4;

return 1;

}


There are no errors from Visual Studio 2010 when building the XLL, but Excel crashes whenever "MinMW" is called.

Any ideas would be gratefully received.
I would build a debug version and step through it with the Visual Studio debugger.
Topic archived. No new replies allowed.