Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
27
Reply
PInvoke Error for FFTW
Chris Foley
Sep 10 2010 10:07 AM
16.5k
Reply
Major Problem....This code consistently generates an unbalanced stack error. I have even tried to change the Wrapper class argument to an IntPtr and that does not work....I am stumped....the "suggestion" is that my parameters do not match the number of arguments expected by the dll. Anyone used this wrapper class before? Any Problems?
dll is from
http://www.fftw.org
wrapper class is from
http://www.sdss.jhu.edu/~tamas/bytes/fftwcsharp.html
ANSI C base function in the dll is:
vo
id *fft
wf_malloc(size_t n);
Wrapper Implementation for PInvoke is:
IntPtr malloc(int length); //in a wrapper class called fftw
My code simply calls:
fftw.malloc(1000); //hardcoded test to see why this is failing...
fftw.malloc(FFTSampleSize*sizeof(float)*2); //where FFTSampleSize is a int
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
27
)
Next Recommended Forum
how to show system_date in changingMode in formview....
Problem with TCP server