+ -
当前位置:首页 → 问答吧 → Delphi调用dll 没有返回值的函数,声明怎么写?【在线等

Delphi调用dll 没有返回值的函数,声明怎么写?【在线等

时间:2011-12-19

来源:互联网

一个计算快速傅里叶变换的函数,返回值为空,
void fft(short sw,short n,float *x,float *y) 
This function do Fast Fourier Transform. 
sw=0 FFT , sw=1 IFFT n=256/512/1024/2048/4096 x: Array of data y: Array of data
怎么样把这个函数声明写成DElphi格式的额?

作者: veronica_rabbit   发布时间: 2011-12-19

Delphi(Pascal) code

type
  Ttest=procedure(sw:pchar;n:pchar;x:pchar;y:pchar);stdcall; 

作者: xiaofansong   发布时间: 2011-12-19

回复xiaofansong
是= 不是:=?
然后函数名在哪里?

作者: veronica_rabbit   发布时间: 2011-12-19

2楼,这样子得到“:expected but ‘=’found”

作者: veronica_rabbit   发布时间: 2011-12-19

procedure fft(sw:shortint; n:shortint; x:Psingle; y:Psingle); stdcall external 'fftdll.dll';

我在type下如上声明

然后它提示说:‘;’expected but identifier 'external' found

作者: veronica_rabbit   发布时间: 2011-12-19

热门下载

更多