Solved

Displaying Loaded Module Info from Delphi App

Posted on 2000-03-28
7
286 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: 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.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

685 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