进程(process)和模块(module)的联系和区别?以及对这段话的理解Once you have a handle you will need to get the "first" module of the process. To get the first module of a process call the EnumProcessModules() API with the following parameters: EnumProcessModules( hProcess, &hModule, sizeof(hModule), &cbReturned );
This will put the handle of the first module of the process in the hModule variable. Remember that a process doesn't really have a name, but that the first module in the process is going to be the executable of the process. Now you can use the hModule with the GetModuleFileNameEx(), GetModuleBaseName() to get the full path name, or the simple module name for the process executable. Both functions take the handle to the process, handle to the module, and a buffer pointer in which to return the name, followed by the size of the buffer.
This will put the handle of the first module of the process in the hModule variable. Remember that a process doesn't really have a name, but that the first module in the process is going to be the executable of the process. Now you can use the hModule with the GetModuleFileNameEx(), GetModuleBaseName() to get the full path name, or the simple module name for the process executable. Both functions take the handle to the process, handle to the module, and a buffer pointer in which to return the name, followed by the size of the buffer.
具体而言,例如一个exe文件被加载后就是一个module,还有DLL
被加载到某进程的内存空间里时也是一个module