Step Into Rust · Lesson 14 · Systems Rust
DLLs, Threads and Modules from Rust
LoadLibraryW and GetProcAddress behind a safe type, std threads on Win32 threads, and module paths.
- ~35 minreading and coding
- 4missions
- membersaccess
- Win32real Windows API
Part of Step Into Rust. 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.
Loading a DLL is a resource like a file handle: something must call FreeLibrary. The same RAII idea applies:
In this lesson
- A library type
- From an address to a function
- std::thread is a Win32 thread
- Module paths
Missions
- Load and call
- Free on drop
- Four OS threads
- Where is it loaded from?