下面这个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.
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.
解决方案 »
- 这些东西是delphi里反编译过来的,我怎么才能改成能看得懂的高级程序代码呢?用什么软件
- 请教关于动态创建和删除控件的问题
- 感谢wwwxuebin提供的图像处理源码,积攒了半个月才有了200分,放100表示感谢
- 在Delphi6下怎样通过ADO动态创建SQL Server 2000中的数据库?
- 急!ListView中某一subitem项改变字体颜色的问题
- 怎样得到计算机用户名
- 急救,在线>>>>>>>>>>>>>>>>>>>>>>>>
- 一个简单的问题,我查了很多书都不能解决,那位老大可以帮帮我?我是新手!!
- 100分求助:日文翻译成英文的翻译软件,最好是嵌入式的,也就是说,可以从Word,Excel 中就能直接整篇翻译的翻译软件.
- TNMPOP3的一个错误
- 主窗口如何知道子窗口已经全关闭了。
- richtextbox的字体颜色怎么改?
改为
panl.Controls[i].ClassNameIs('TEdit')
即可。另一个也是,使用ClassNameIs
因为panl是另外一个模块的指针而已不过你可以都使用带包编译解决该问题