Step Into Labs

Step Into C · Lesson 29 · Win32 in Depth

DLLs & Dynamic Loading

Imports vs LoadLibrary, GetProcAddress and typed function pointers, missing exports, and reference counts.

Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Implicit linking: your EXE's import table lists the DLLs and functions it needs (printf from the C runtime, CreateFileW from kernel32.dll...). The loader maps those DLLs and fills in the addresses before main runs. You met the import table in the PE lessons.

In this lesson

Missions

  1. Load it
  2. Typed function pointers
  3. What failure looks like
  4. Reference counts