Dll共115篇

Delphi 如何从DLL中检索导出函数的列表

 program Project1;  uses   Forms,   Classes,   SysUtils,   Dialogs,   ImageHlp, // routines to access debug informa...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
07912
DLL 的静态调用实例代码-Delphi编程技巧大全

DLL 的静态调用实例代码

自己写了一MinMax.dll文件 里面定义了2个函数Min、Max在测试中使用了静态调用的方法 完整代码如下:----------------------------------------unit unit1;interfaceuses  Windows, Me...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06710
delphi学习之资源文件dll的制作及使用-Delphi编程技巧大全

delphi学习之资源文件dll的制作及使用

一、dll文件的制作1、创建dll工程文件:File->New->DLL Wizard 保存为PackDll;2、创建rc文件:File->New->Text 保存为DllRes.rc;3、向rc文件中添加资源4、把rc文件加入到工程中:V...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
09011

delphi 静态/动态调用DL

library TestDll;{$S-}uses  Vcl.Forms,  Winapi.Windows,  System.SysUtils,  System.Classes;{$R *.res}//stdcall参数的传递顺序function Add(Num1, Num2: Integer): Int...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05711

delphi package 把函数单元做成bpl调用

unit MYfunction;interfacefunction fun(i: Integer):Integer;stdcall;implementationfunction fun(i: Integer):Integer;stdcall;begin  Result := i+1;end;exports fun;end.之后New->O...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06513

delphi DLL初始化和退出处理

1. 概述一般的DLL不需要做初始化和善后工作,但如果想让DLL在被载入时先作一些初始设定,或者退出时释放资源,则可以用以下方法达到目的。#2. 利用Unit的Initalization与Finalization这两个小节...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06010

delphi 静态调用DLL和动态调用DLL优缺点

静态方法实现简单,易于掌握并且一般来说稍微快一点,也更加安全可靠一些;但是静态方法不能灵活地在运行时装卸所需的DLL,而是在主程序开始运行时就装载指定的DLL直到程序结束时才释放该DLL,...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05814
Delphi函数指针,用于加载DLL-Delphi编程技巧大全

Delphi函数指针,用于加载DLL

要点:1.DLL用exports加函数名表示导出这个函数2.Assigned函数判断参数释放为nil,也就是是否存在3.LoadLibrary用来加载一个DLL文件,参数为完整路径(同一目录下,可只写DLL文件名)。使用完了...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
04510

delphi 判断DLL动态链接库是否可用

这里只是演示代码:确保dll有这两个DllUnregisterServer DllRegisterServerfunction RegisterServer(const aDllFileName: string; aRegister: Boolean): Boolean;type  TRegProc = functio...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06514

delphi回调函数高级应用

用法一Type TProc=procedure() of object;procedure Callback(proc:TProc);begin ...end;procedure myproc()begin ...end;Callback(myproc); 用法二type TProc= reference to Procedure();...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
04512

delphi 调用GoLang dll

exportgo.go/* GoLang DLL example. Goals: load golang dll into fpc/lazarus, and load golang dll into another go executable. The syntax   //export SomeFunc&n...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06111

DELPHI使用TClientDataSet時不携带MIDAS.DLL的方法

.dll 编译 不能 简单 即使 然而 模块 人人 增加DELPHI使用TClientDataSet时不携带MIDAS.DLL的方法TClientDataSet小家碧玉,恐怕人人都喜欢使用。但是,都知道娶TClientDataSet是有代价的,因为...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0485

delphi 内存中加载DLL

MemLibrary.pas//从内存中加载DLL DELPHI版  unit MemLibrary;interfaceusesWindows;function memLoadLibrary(pLib: Pointer): DWord;function memGetProcAddress(dwLibHandle: DWord...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06612
delphi 调用dll运行正常,退出时弹出错误解决办法-Delphi编程技巧大全

delphi 调用dll运行正常,退出时弹出错误解决办法

分析原因:Dll中函数返回值最好不要使用string类型,而采用PChar类型。因为string类型是系统自动分配内存空间,而PChar则是用户根据需求而进行分配的。解决办法:得出结论了:ShareMem 应加在Dl...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0617

Delphi通过LoadLibrary调用其他动态库

procedure TFrmrydj.btnJYJJClick(Sender: TObject);type  Tfzyb_yjjgl=procedure;stdcall;  var   LibHandle: THandle;   fzyb_yjjgl:Tfzyb_yjjgl;begin&n...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05311

Delphi 检测程序有没有被DLL注入的代码

unit Unit1;interfaceuses  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdC...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
07114

Delphi Dll创建并调用

1. 文件结构每个DLL文件都包含一个导出函数表,这些导出函数由他们的函数名或函数编号与外界联系起来,函数表中还包含了DLL中函数的地址,当应用程序加载DLL模块时,应用程序并不知道DLL中的调用...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05611

DLL与EXE之间的恩爱情仇

DLL与EXE之间的恩爱情仇作者: 小坏program Bin;{$APPTYPE CONSOLE} uses  Windows;   Function RunApi(lpPorc :Pointer):Integer; Stdcall; external 'Test.Dll' name 'Run...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0569
Delphi 封装Frame到Dll文件-Delphi编程技巧大全

Delphi 封装Frame到Dll文件

做项目的时候,发现这个Frame很好用,为了省空间、调用和修改方便,就将Frame封装到dll(动态链接库)里面,确实很好使。效果图如下:上图是临时测试用的,忘了将Frame的align设置成alClient,不...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0569

Delphi写的DLL回调C#

C#的调用Delphi的DLL没有问题,DLL回调时遇到了麻烦,网上找了个方法,解决了这个问题Delphi部分,列举了三种回调函数定义library test;    uses    SysUti...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06414

Delphi 如何解决在DLL的入口函数中创建或结束线程时卡死

Delphi 如何解决在DLL的入口函数中创建或结束线程时卡死先看一下使用Delphi开发DLL时如何使用MAIN函数,通常情况下并不会使用到DLL的MAIN函数,因为delphi的框架已经把Main函数隐藏起来而工程函...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05910

Delphi的TService 服务路径获取 Dll中获取文件路径

研究delphi服务的路径,试了好几个方法 ,都没取出来,最后发现,要采用取DLL路径的方法//一、获取Dll自身路径//1)方法一:Function GetDllPath(sDllName:string):string;varModuleFileName:ar...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0537

Delphi DLL 字符串传递例子

Delphi DLL 字符串传递例子library EN;uses  SysUtils,  Classes,  UnitFormEN in 'UnitFormEN.pas' {FormEN};{$R *.res}function GetJobType(p: PChar): Boolean; stdcall;var&...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0619

delphi 解析Delphi中的LoadLibrary,GetProcAddress,FreeLibrary

GetProcAddress(Hinstance,lpname)用来获取指定的动态连接库函数的地址 Hinstance为由LoadLibrary返回的模块句柄,lpname为文件名/函数名,返回值,成功返回动态连接库的地址,失败返回NULL...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0629

delphi 使用INT3进行HOOK处理

原理:设置异常捕获,然后将需要HOOK的代码直接修改成INT3即可用的一个关键的API:SetUnhandledExceptionFilter//异常处理函数  function MyInt3(CONST P:EXCEPTION_POINTERS):Integer;cde...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
05313

delphi Dll Injection functions 注入函数

Dll Injection functionsFunction 1// PID - process Idprocedure InjectDll(PID: dword;  DLL: pChar); var   BytesWritten, hProcess, hThread, TID: Cardinal; &nb...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0666

Delphi XE, XE10, 创建 ActiveForm 和 ActiveX 工程的方法

在 Delphi 7 里面,这个问题不存在。问题的重点:在 XE10 里面,New - ActiveX 底下,看不到 New Active Form 了。只能看到 Active Library。必须要先 New 完 Active Library 以后,再 new 才能...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0695

delphi 创建DLL文件 及其调用和注意事项

首先创建一个DLL文件,项目自带的代码为:library ProjectPnr; { Important note about DLL memory management: ShareMem must be&nbs...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
0346

delphi获取dll的函数列表

function GetDLLFileExports(  szFileName: PChar;  mStrings: TStrings): Boolean;var  hFile: THANDLE;  hFileMapping:&n...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
06111

delphi 获取dll文件的函数列表

function GetDLLFileExports(  szFileName: PChar;  mStrings: TStrings): Boolean;var  hFile: THANDLE;  hFileMapping: THANDLE;  lpFileBase: Pointer;  pImg...
Top_Admin的头像-Delphi编程技巧大全Top_Admin1年前
04011