DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: fdsafdsa1234
今日帖子: 4
在线用户: 22
导航: 论坛 -> 数据库专区 斑竹:liumazi,waterstone  
作者:
男 chinaandys (星哥) ★☆☆☆☆ -
普通会员
2004/7/4 16:28:34
标题:
dll,高手,急救,关心一下,thanks 浏览:1329
加入我的收藏
楼主: 如果form上有edit1,edit2,button控件
 dll,帮助一下,大哥 
library maxmin;
uses
  SysUtils,
  Classes;
   function ismin(x,y:integer):integer; export;
   begin
       if x<y then result:=x
        else
          result:=y;
     end;
   function ismax(x,y:integer):integer;export;
      begin
           if x>y then result:=x
           else
               result:=y;
       end;
  exports
        ismin,ismax;
{$R *.res}

begin
end.

帮助我用loadlirary ,getprocaddress,freelibrary写一个动态调用maxmin函数 

----------------------------------------------
我希望我们通过网络能成为朋友
作者:
男 sephil (NAILY Soft) ★☆☆☆☆ -
盒子中级会员
2004/7/4 17:00:00
1楼: function ismax(x,y:integer):integer;export;
最好改为 function ismax(x,y:integer):integer;stdcall;

procedure Form1.Button1Click(Sender: TObject);
type TMinMaxProc = function(x,y:integer): Integer; stdcall;
var
  H: HMODULE;
  Proc: TMinMaxProc;
begin
  H := SafeLoadLibrary('DllFile');
  if H > 0 then
  begin
    Proc := GetProcAddress(H, 'ProcName');
    if Assigned(Proc) then Proc(1, 2);
    FreeLibrary(H);
  end;
end;
----------------------------------------------
Copyright 2008 ? NAILY Soft

Click here to redirect to my home
Click here to redirect to my blog
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行601.5625毫秒 RSS