FFTW interface for MT4

 
Does anyone have an FFTW interface for MT4 to share?
I'm primarily interested in obtaining 1-dimensional DFT of real data.
 
No takers on this one, it seems, so I've started to tinker, but without much success. I have the DLL, and I think I need to use three functions only:

fftw_plan *fftw_plan fftw_plan_r2r_1d(int n, double *in, double *out, int kind, int flags);
void fftw_execute(fftw_plan *p);
void fftw_destroy_plan(fftw_plan *p);

where 'fftw_plan' is a struct, and 'in' and 'out' actually are arrays. Is it possible to declare these functions in mql4 ?
I've tried the following imported functions declarations:

int fftw_plan fftw_plan_r2r_1d(int n, double &in[], double &out[], int kind, int flags);
void fftw_execute(int p);
void fftw_destroy_plan(int p);

in the hope that the opaque pointer may be declared as an int.
Needless to say, things don't work well; I get the "illegal memory read (at address 0x0)" exception.
Would this be because my import declarations are wrong? If so, is there a way that would be right?
Or does my attempted interface seem ok, and it's more likely I mis-feed the DLL with bad inputs?
Reason: