简单问题,如何调用vc写的dll(50分)

  • 主题发起人 主题发起人 zrj
  • 开始时间 开始时间
Z

zrj

Unregistered / Unconfirmed
GUEST, unregistred user!
vc的.def文件这么写的<br>EXPORTS<br>cntline_convert_file<br><br>.h文件这么声明的<br><br>int LIB_PROC &nbsp; &nbsp; &nbsp; &nbsp;cntline_convert_file(char *img_file_name,int use_a_copy,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char *poly_file_name,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double pnt_error_tollerance,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double poly_lenght_factor);<br>生成了dll文件;<br><br>该dll文件我在delphi里如何调用啊??<br>
 
看看这个声明是否可以?<br>function cntline_convert_file(img_file_name: PChar; use_a_copy: Integer; poly_file_name: PChar; &nbsp;pnt_error_tollerance: double; poly_lenght_factor: double): LIB_PROC; stdcall;<br>
 
LIB_PROC? , delphi不认啊,没这个关键子还是我少加了单元呢?
 
这个再试验一下。<br>function cntline_convert_file(img_file_name: PChar; use_a_copy: Integer;<br>&nbsp; poly_file_name: PChar; pnt_error_tollerance: double; poly_lenght_factor: double):<br>&nbsp; Integer; stdcall; external '你的DLL文件名' name 'cntline_convert_file';<br>
 
接受答案了.
 
后退
顶部