📄 example.dpr
字号:
library Example;
uses
SysUtils,
Classes,
Windows,
Dialogs,
DLLAboutForm in 'DLLAboutForm.pas' {AboutBox};
{the exported functions}
exports
ShowAboutBox name 'ShowAboutBox';
{the DLL entry point procedure. this procedure will fire every time a
process or thread attaches to the DLL. if a process has attached to a DLL,
any newly created threads will automatically attach themselves}
procedure DLLMain(AttachFlag: DWORD);
begin
{display attachement type}
case AttachFlag of
DLL_PROCESS_ATTACH: MessageBox(0, 'Process: Attaching', 'Alert', MB_OK);
DLL_PROCESS_DETACH: MessageBox(0, 'Process: Detaching', 'Alert', MB_OK);
DLL_THREAD_ATTACH: MessageBox(0, 'Thread: Attaching' , 'Alert', MB_OK);
DLL_THREAD_DETACH: MessageBox(0, 'Thread: Detaching' , 'Alert', MB_OK);
end;
end;
begin
{initialize the DLL entry function}
DLLProc := @DLLMain;
{call the entry function upon DLL initialization}
DLLMain(DLL_PROCESS_ATTACH);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -