hmLoadTopic({ hmKeywords:"", hmTitle:"What is a module?", hmDescription:"A module is a contained block of executable code and data. For example, a DLL or EXE. ", hmPrevLink:"whatdoesthreadlockcheckerdo.html", hmNextLink:"menu.html", hmParentLink:"index.html", hmBreadCrumbs:"", hmTitlePath:"What is a module?", hmHeader:"
A module is a contained block of executable code and data. For example, a DLL or EXE. <\/p>\n\r
<\/p>\n\r
Some software vendors name their DLLs with different file extensions, for example .BPL, .ARX. <\/p>\n\r
<\/p>\n\r
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. <\/p>\n\r
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.<\/p>\n\r
<\/p>\n\r
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.<\/p>\n\r
<\/p>\n\r
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".<\/p>\n\r
<\/p>\n\r" })