Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
New related comments Number of comments in the last 48 hoursPlay WAV files 1 new comments
|
Tracking DLL loading, attaching, detaching and unloading
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The code snippet shows how your DLL can track its usage.  | |  | | Library testdll;
uses
Windows, SysUtils, Classes;
procedure MyDLLProc(Reason: Integer);
begin
case Reason of
DLL_PROCESS_ATTACH: begin
end;
DLL_PROCESS_DETACH: begin
end;
end;
end;
begin
DLLProc := @MyDLLProc;
MyDLLProc(DLL_PROCESS_ATTACH); end. | |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|