Solved

Displaying Loaded Module Info from Delphi App

Posted on 2000-03-28
7
279 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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