我用一个定时器动态调用一个DLL每当调用一次只少占用的资源增加4K,DLL涵数的返回值为一个自定意类型.
解决方案 »
- 有没有窗体Show结束后的事件
- Image字段的存取问题?急呀?高手请入!!!!!不胜感激。
- 同时打开两个adodataset就出现“多步操作产生错误,请检查每一步状态的值”----急!!!
- With ... do 的作用?
- 如何在StringGrid中插入一个字符?
- 到底三层数据库中怎么向数据库添加数据啊?我用clientdataset.commandtext:='insert.... ';clientdataset.excute;但系统说在数据集打开时
- 关于Delphi Printer对象打印报表的问题
- 招远程兼职软件开发人员,不限地区
- 请问西安市在哪个地方可以办暂住证?
- delphi 6中如何读取XML文件
- 怎么样将数组中的内容赋给checklistbox
- 请教动态生成BUTTON的移动问题?
var
hinst:thandle;
fpointer:tfarproc;
myfunct:tintfunction;
begin
hinst:=loadlibrary('*.dll');
if hinst>0 then
try
fpointer:=getprocaddress(hinst,pchar(combobox1.Text));
if fpointer<>nil then
begin
myfunct:=tintfunction(fpointer);
edit3.Text:=inttostr(myfunct(strtoint(edit1.Text)));
end
else
showmessage('dll is use');
finally
freelibrary(hinst);
end
else
showmessage('no dll');
end;
Timer定时调用Dll函数就可以了。
确保函数调用每次分配的资源得到释放。
http://community.csdn.net/Expert/topic/5452/5452414.xml?temp=.2265283