最終更新:2019-11-08 (金) 17:45:28 (1628d)  

DLL
Top / DLL

Dynamic Link Library

エクスポートする関数の指定

動的リンクの方法

リンク方式

暗黙的リンク (静的リンク)

  • DLLの関数を__declspec(dllimport?)を付けて宣言する。
  • プログラマーが意識しないレベル(実行の準備段階)でDLLが勝手にロードされる

明示的リンク (動的リンク)

  • DLLの関数を宣言しない。
  • プログラマーがLoadLibraryを呼び出してやらないとDLLをロードできない

DLL/遅延読み込み

  • 関数呼び出し時にロードされる

呼び出し規約

関数

  • DisableThreadLibraryCalls? - Disables thread attach and thread detach notifications for the specified DLL.
  • DllMain - ダイナミックリンクライブラリ (DLL) のオプションのエントリポイントです。
  • FreeLibrary? - Decrements the reference count of the loaded DLL. When the reference count reaches zero, the module is unmapped from the address space of the calling process.
  • FreeLibraryAndExitThread? - Decrements the reference count of a loaded DLL by one, and then calls ExitThread? to terminate the calling thread.
  • GetDllDirectory? - Retrieves the application-specific portion of the search path used to locate DLLs for the application.
  • GetModuleFileName? - Retrieves the fully-qualified path for the file containing the specified module.
  • GetModuleFileNameEx? - Retrieves the fully-qualified path for the file containing the specified module.
  • GetModuleHandle - Retrieves a module handle for the specified module.
  • GetModuleHandleEx? - Retrieves a module handle for the specified module.
  • GetProcAddress - Retrieves the address of an exported function or variable from the specified DLL.
  • LoadLibrary - 指定された実行可能モジュールを、呼び出し側プロセスのアドレス空間内にマップします。
  • LoadLibraryEx - 指定された実行可能モジュールを、呼び出し側プロセスのアドレス空間にマップします。
  • SetDllDirectory - Modifies the search path used to locate DLLs for the application.

DLL/ツール

関連

脆弱性

ダウンロード

参考