⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example.dpr

📁 DelphiWin32核心API参考光盘内容.是学习书籍中的源码,便于学习.
💻 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 + -