关于DLL中函数重载的问题(分不够可以再加)
我在DLL中写了一个重载的函数,但是在程序中调用不正常。
DLL结构如下:
unit ALAC_FillComboBox;
interface
uses
ShareMem, Windows, SysUtils, DBGrids, Math, DB, DbTables, StdCtrls;
procedure FillComboBox(ComBo: TComboBox; Query1: TQuery; table: PChar; namefield: PChar);overload;stdcall;
procedure FillComboBox(ComBo: Tcombobox; Query1: TQuery; table: PChar; namefield: PChar; Desction: PChar);overload;stdcall;
implementation
procedure FillComboBox(ComBo: Tcombobox; Query1: TQuery; table: PChar; namefield: PChar);
begin
...
end;
procedure FillComboBoxD(ComBo: Tcombobox; Query1: TQuery; table: PChar; namefield: PChar; Desction: PChar);
begin
...
end;
end.
函数调用如下
:
procedure FillComboBox(ComBo: TComboBox; Query1: TQuery;
table: PChar; namefield: PChar);overload;stdcall external 'ALACDLL.DLL';
procedure FillComboBox(ComBo: TComboBox; Query1: TQuery;
table: PChar; namefield: PChar; Desction: PChar);overload;stdcall external 'ALACDLL.DLL';
运行参数多的函数没有问题,把DLL中代码原封不动的拷过来运行也没问题,但是就是不能将函数放在DLL中。
各位大哥,快来帮忙呀!