DLLs for current process
how can one tell (using non-CLR C++) which DLLs is a given running process (by ID) us开发者_开发问答ing? With file system paths to those DLLs and EXE.
Thank you in advance.
If you are trying to do this in code, you are probably looking for the EnumProcessModules
function (or K32EnumProcessModules
depending on operating system. See the link for more details). There is an EnumProcessModulesEx
that can give you a little more more information. Simply give it a handle to the process you want to know which modules (DLLs) are loaded. If you don't know the handle, you can find it using EnumProcesses
or OpenProcess
if you know the PID.
精彩评论