function abcd(x: integer): integer; stdcall;
var
Form1: TForm1;
implementation
function abcd(x: integer): Integer; stdcall;
begin
Result := x * 2;
end;
{$R *.dfm}
exports
abcd;
var
abcd:function(x:integer):Integer;stdcall;
H: THandle;
begin
h := LoadLibrary('exeDllTest.exe');
if H > 32 then
begin
@abcd := GetProcAddress(h, 'abcd');
ShowMessage(inttostr(abcd(8)));
end;
FreeLibrary(h);
end;
exe也可以当Dll用
原创mb64eeeb79969f2 博主文章分类:动态链接库[Dll] ©著作权
©著作权归作者所有:来自51CTO博客作者mb64eeeb79969f2的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:inherited
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
购物车的实现(未登录时也可以使用)
平时工作的踩坑记录
redis List 拦截器 -
封装DLL到EXE
在Windows系统用VS2015开发程序时,往往需要结合第三方动态库进行高效开发。行问题。准备软件本文采用Enigma Virtual B
exe dll 动态库 执行程序 第三方库