Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

registering process loaded in the system

How i can register all the process loaded in the system??
(With the respective directory and origin .exe)

                          IN WINDOWS NT
0
kort77
Asked:
kort77
1 Solution
 
viktornetCommented:
What do u mean by registering all the processes?
0
 
intheCommented:
do you mean get all active processes???
If so under Windows NT this kind of information is under the HKEY_PERFORMANCE_DATA section of the registry.if you have the sdk there is an example of how to do this called tlist,
(dont ask for it i dont have it) which produces a list of all the active processes and their handle.
Once you have the module handle you can call "GetModuleFileName"
to retrieve the full path name.
Regards Barry

0
 
MadshiCommented:
Hi kort77,

if you've Delphi4, simply download my unit "enumStuff" from my homepage "http://www.madshi.com", there's all you need for win95/98 and winNT.
If you don't have Delphi4, say something and I will convert the process enumeration to Delphi3 for you.
Hmmm. For winNT4 you can either use the HKEY_PERFORMANCE_DATA section in the registry (see Barry's comment) or you can use the Microsoft dll "psApi.dll". I'm currently working on the HKEY_PERFORMANCE_DATA solution, but it isn't ready yet. In the moment I can offer you "only" the "psApi.dll" solution. But it works fine. If you don't have the "psApi.dll" file on your harddisk, download it from Microsoft or give me your eMail address.

Regards, Madshi.
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!

 
kort77Author Commented:
I download your unit (enumStuff) and it works wonderfull, but the component that I need dosen´t works for NT (?)...
What can I do? What about the HKEY_PERFORMANCE_DATA solution... Maybe you can send me a little clue about it?

                                                Thanks a lot for your time...  
0
 
kort77Author Commented:
I download your unit (enumStuff) and it works wonderfull, but the component that I need
(GetProcessList)  dosen´t works for NT (?)...
What can I do? What about the HKEY_PERFORMANCE_DATA solution... Maybe you can send me a little clue about it?

                                                Thanks a lot for your time...  
0
 
MadshiCommented:
The HKEY_PERFORMANCE_DATA solution is still not ready. I fear, that will last some weeks...  :-(
However, the process enumeration works with NT right now. But it needs the "psApi.dll" to be in your program's directory (or in the windows directory).
Do you have the "psApi.dll"? If not, please download it from Microsoft. If you don't find it there, then give me your eMail address - then I'll send it to you...

Regards, Madshi.
0
 
kort77Author Commented:
I already download "psApi.dll" ... Now, what i have to do?

My e-mail is :  camilo_ortega@hotmail.com
0
 
MadshiCommented:
Just put it in your program's directory. Then GetProcessList *should* work. If not: Please tell me, what happens? Does your program crash or is the list just empty or does my function produce an error message/exception?

Regards, Madshi.
0
 
MadshiCommented:
Any progress?
0
 
kort77Author Commented:
Madshi, I´ve been busy
Sorry if i answer you to late...  :( ...

I tried the psApi.dll but it isn´t work... What about the HKEY_PERFORMANCE_DATA solution??? Any progress??, maybe we can work on it... Just tell me, i´ll be happy to help whit it.

Please, contact me if you find any answer...

Thanks A LOT      - kort77 -  camilo_ortega@hotmail.com -
0
 
MadshiCommented:
Hi again, in the meanwhile the HKEY_PERFORMANCE_DATA solution is ready...   :-)

But there's one big problem: It doesn't tell us the process executable's path, only the filename! I tried it under winNT5.  But I'm sure it will be the same with NT4. Then I tried the other method in winNT5 - you can use the same method in NT5 as in win95/98 - and it didn't give me the path, either...
The PsApi.dll does it! So if you really need the complete path, we will have to make PsApi working for you!

If you can live without the path, you can download the new version of "enumStuff" from my homepage (www.madshi.com). If you like it, please don't forget to accept my answer here at Experts-Exchange...   :-)

Regards, Madshi.
0
 
MadshiCommented:
Hello???
0
 
kort77Author Commented:
We must talk trourgth e-mail  :)    

Thanks a lot ...   100 points more  :)   :)   :)
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now