Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Displaying Loaded Module Info from Delphi App

Posted on 2000-03-28
7
283 Views
Last Modified: 2010-04-04
I am looking for some code that will allow me to query the system and display all of the loaded modules.  I want to display the module name, the binary path, version, date, etc.  Does anyone know how to do this.  An example of what I want can be seen by running the MSInfo32 program that microsoft ships.  Select Software Environment|Loaded modules from the tree to see what I mean.  Also, it should work for all OS' (Win98/NT/2000)
0
Comment
Question by:blitz051697
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Accepted Solution

by:
nafa2221 earned 500 total points
ID: 2665352
A while back I wrote a .DLL to do that, I have an example project. Accept this anwser and I will mail it to yah ;]
0
 

Expert Comment

by:nafa2221
ID: 2665354
dont forget to leave your e-mail when you accept it...!!!
0
 

Author Comment

by:blitz051697
ID: 2665425
here is my email...

randy_michak@usiva.com

I will accept once I get the code and look at it :)

Thanks.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 20

Expert Comment

by:Madshi
ID: 2668031
I have a component that does that in Delphi without needing any dlls or such. The problem is: My components collection is not published yet. And it will NOT be free for commercial use.

If nafa2221's dkk doesn't help you, we can talk about it.

With my code you can do something like this:

var i1, i2 : integer;
begin
  with Processes do
    for i1 := 0 to ItemCount - 1 do
      with Items[i1].Modules do
        for i2 := 0 to ItemCount - 1 do
          ShowMessage(Items[i2].FileName);

Regards, Madshi.
0
 

Author Comment

by:blitz051697
ID: 2670710
Still waiting for nafa2221's code.....
0
 
LVL 9

Expert Comment

by:ITugay
ID: 2675782
Do you know about TLhelp32 unit? There are functions to work with processes and modules.

---
 The followingTLHelp32 functions allow you to enumerate processes in the system, as well as get memory and module information:

     CreateToolhelp32Snapshot()
     Process32First()
     Process32Next()
     Module32First()
     Module32Next()


---
  The Windows NT approach to creating a list of processes and modules uses functions from the PSAPI.DLL. The PSAPI.DLL file is distributed with the Platform SDK, available at:

       http://www.microsoft.com/msdn/sdk


Like the ToolHelp32 functions, the PSAPI.DLL also contains a variety of useful functions. However, this article only discusses those functions relevant to enumerating processes and  modules:

     EnumProcesses()
     EnumProcessModules()
     GetModuleFileNameExA()

---

Cheers,
Igor.

PS: this link may be interesting for you
http://support.microsoft.com/support/kb/articles/q192/9/86.asp
0
 
LVL 9

Expert Comment

by:ITugay
ID: 2675795
.. I forgot about PSAPI unit, it is for NT.
And one more link to sample how to "List Running Processes".
http://support.microsoft.com/support/kb/articles/Q187/9/13.ASP

-----
Igor.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 57
Correct Component for Shopping Cart. 2 112
Delphi Form ownership 4 112
Performance of SQL statement 37 127
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question