Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Module" in win32 API function GetModuleFileName or GetModuleHandle?

Tags:

c++

winapi

api

In win32 , in some cases we need a Module handle to perform some action. But I don't know what is a Module exactly. Help me please.

like image 625
alirakiyan Avatar asked Dec 26 '12 14:12

alirakiyan


1 Answers

Your program executes within virtual memory space created by the OS when the program is loading. The program itself and all of the dynamic link libraries loaded in the virtual memory space are called modules. The HMODULE, or HINSTANCE is the address within the virtual memory where the particular module is loaded. You can use GetModuleInstance() or LoadLibrary() API calls to get the handles.

like image 83
Sandi Hrvić Avatar answered Oct 26 '22 19:10

Sandi Hrvić