WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DLLs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to get a list of loaded Modules

Keywords: DLL Master  DLLs in use Dlls in memory Detect DLLs 

Question:

How can I get a list of loaded modules ( *.exe, *.dll, *.drv ) in Win 95 and Win NT. When I do know the name of the module I can get all the information I need. But how do I get the names? Some help please.

Answer:

See the Process Id Extender. Here is an Example of how to get a list of modules..
Addextender("wwprc44I.dll")

proclist=tListProc()
process=Askitemlist("All processes",proclist,@TAB,@UNSORTED,@SINGLE)

; parse off process id
procid=ItemExtract(2,process,"|")
procname=ItemExtract(1,process,"|")

modlist=tListMod(procid,0)
module=Askitemlist("List of modules for %procNAME%",modlist,@TAB,@UNSORTED,@SINGLE)

modhandle=ItemExtract(2,module,"|")
modname=ItemExtract(1,module,"|")

info=tGetModInfo(procid, modhandle)
addr=Itemextract(1,info,@TAB)

size=Itemextract(2,info,@TAB)
entry=Itemextract(3,info,@TAB)
str=strcat("load address of the module: ",addr,@CRLF,"linear space that the module occupies.: ",size,@CRLF,"entry point of the module: ",entry)
message("Module information on %modname%",str)

exit

Article ID:   W13155
Filename:   Get a List of Loaded DLLs and EXEs.txt
File Created: 2013:04:01:09:15:12
Last Updated: 2013:04:01:09:15:12