zoukankan
html css js c++ java
delphi 中DLL的建立
Dll的创建与调用
File ->New->Other->Dll Wizard
DLL的创建
//可以将本代码复制粘贴到项目中 library Project1; uses SysUtils, Classes, Windows, Forms; {$R *.res} function Min(x,y:Integer):Integer;stdcall; begin if (x<y) then Result:=x else Result:=y; end; procedure MsgBox(Msg:string;Title:string;uType:LongInt=MB_OK);stdcall; begin Application.MessageBox(PAnsiChar(Msg),PAnsiChar(Title),uType); end; exports Min, MsgBox; begin end.
DLL的调用1
//将Project1.dll文件复制到本项目中 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; function Min(x,y:Integer):Integer;stdcall;external 'project1.dll'; procedure MsgBox(Msg:string;Title:string;uType:LongInt=MB_OK);stdcall;external 'project1.dll'; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(IntToStr(Min(3,2))); end; procedure TForm1.Button2Click(Sender: TObject); begin MsgBox('Hello','Tips',MB_OK+MB_ICONINFORMATION); end; end.
来自为知笔记(Wiz)
附件列表
查看全文
相关阅读:
delphi利用qdac qworker计划任务
delphi libssh2 无法立即完成一个非阻止性套接字操作
线程池底层原理
【spring源码分析】二、Spring扩展点的归总
【spring源码分析】一、spring Refresh流程
Spring中常用的类
设计模式-proxy
SpringAOP
SpringIOC
难受,nginx worker进程内存持续飘升!
原文地址:https://www.cnblogs.com/xe2011/p/3876090.html
最新文章
【Netty】ByteBuf.release() was not called before it's garbage-collected
Hadoop 专栏
LDA主题模型浅析
PL/SQL plsql Developer 14最新版注册码
关于SecureCRT软件如何使用日志自动存储功能
LCD驱动IC的构成及作用
Cortex-M系列:ARM架构与汇编指令集的关系
Ubuntu更换国内APT软件源
ubuntu开启SSH远程访问功能
BATMAN.adv系列03:修改并编译BATMAN.adv
热门文章
编译openwrt的docker环境
gyp ERR! stack Error: EACCES: permission denied, mkdir '/app/.jenkins/workspace/aibox-eye-manage/node_modules/node-sass/.node-gyp'
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release
简易学员管理系统
shell脚本ip校验
python房贷计算器
shell整数和小数,小数和小数之间的计算
jenkins+maven+gitlab+ansible自动化发布web项目
jenkins+maven+gitlab+ansible自动化发布java项目
dxCameraControl抓拍并压缩jpeg
Copyright © 2011-2022 走看看