Please enable JavaScript to view this site.

DWARF Browser Help

Navigation: » No topics above this level «

What is a module?

Scroll Prev Top Next More

A module is a contained block of executable code and data. For example, a DLL or EXE.

 

Some software vendors name their DLLs with different file extensions, for example .BPL, .ARX.

 

When you call LoadLibrary to load a module, you are returned a HMODULE, which is an opaque handle to a module. The HMODULE is most often the same as the module load address, but not always.

The lower few bits of the HMODULE can get OR'd with some flags to create a HMODULE value that is not the same as the module load address.

 

You can get the load address of a module from it's HMODULE by masking out the lower 16 bits of the HMODULE value then casting to a DWORD_PTR.

 

In this documentation when you read EXE or DLL or module, we are effectively referring to the same thing. It's easier to read and write "DLLs" rather than "DLLs or EXE".