下面这个DLL在调用程序中不执行,没有任何反应,也不报错,无论是静态调用还是动态调用都不行?但是dLL的过程源码没有问题,直接复制到程序就可以用,这到底是怎么回事?请高手赐教,谢谢//dll输出
library fmtpnl;{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }uses
  SysUtils,
  Classes,
  clearpanel in 'clearpanel.pas';{$R *.res}
exports
  ClearPanelText;
begin
end.
///////////////////////dll单元
unit clearpanel;interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls;
 procedure ClearPanelText(panl:Tpanel);stdcall;implementation
procedure ClearPanelText(panl:Tpanel);stdcall;
var i:integer;
begin
  for i:=0 to panl.ControlCount-1 do
  begin
    if  panl.Controls[i] is TEdit then
        TEdit(panl.Controls[i]).Clear
    else   if panl.Controls[i]is TCombobox then
              TCombobox(panl.Controls[i]).Text :='' ;
  end;
end;
end.

解决方案 »

  1.   

    直接调试一下DLL啊,不要告诉我不会.
      

  2.   

    楼上的最好亲自试试,光看代码没用,代码没问题,放在程序里就能执行,如调用dll里的就是不能用,非常奇怪,所以才贴出来,请大家试试后再发言,谢谢;
      

  3.   

    将panl.Controls[i] is TEdit
    改为
    panl.Controls[i].ClassNameIs('TEdit')
    即可。另一个也是,使用ClassNameIs
      

  4.   

    panl.Controls[i] is TEdit判断会失败
    因为panl是另外一个模块的指针而已不过你可以都使用带包编译解决该问题
      

  5.   

    WYWRY的回答是正解,又学了一招,lake_cx说的也没错,谢谢了。