I am trying to write a program which logs all use of a computer.

how can I get a list of all running tasks on a system?
I only realy need the number of tasks but a list on names would be good too.

I am working in win32 assembly but I am new to programming for windows so go easy on me :-)

Derek Robson
Posted on 2001-08-04 22:02:49 by robsonde
Well i took this from some SubHuman's post but just because i had it handy :)
Take a look at ToolHelp32 API. It's what you need for a high level modules and processes 'administration'

Here are the API names:


If you ain't got any help file on these APIs check MSDN (www.msdn.microsoft.com)



PS: Check at www.win32asm.cjb.net cos (i think) there is some ToolHelp source code :)
Posted on 2001-08-04 22:25:35 by latigo
I dont know if that is any help......

I was hoping to find a win32 api that is just in kernal32 or something.

I dont know anything about ToolHelp32.

sorry for being stupid
Posted on 2001-08-05 00:43:10 by robsonde
You are not stupid!

> dont know if that is any help......

Yes , that is help. I'm telling you that the APIs you are looking for reside in ToolHelp.dll (%WindowsRoot%\System\ToolHelp.dll). They are a bunch of APIs that give and receive information about the current processes/modules in the system at a given moment.

> I was hoping to find a win32 api that is just in kernal32 or something

Well i don't know if this is part of the Win32 implementation or if its an addenum to the system, but who cares. And the fact that they do not reside inside kernel32.dll has nothing to do with it. Just use them.

> I dont know anything about ToolHelp32.

Should have you known something about it you would have not asked from starters. Check Microsoft's site for more info about ToolHelp.

> sorry for being stupid

Again..you are not being stupid.

That's all i can say, if you want to neglect my advice then do it.


PS: i had a rough nite.
Posted on 2001-08-05 04:30:17 by latigo
Maybe these old tutorials help you to understand what
says latigo.

Windows 2k has toolhelp32 support but NT does not.
Posted on 2001-08-05 05:09:21 by n u M I T_o r
That helps lots!!

I think I will be able to do something now....

I have only had a quick look over files but it looks like just the toy for me.

it is very late at night/morning in my world so i will get some sleep and play tomorrow.

thanks so much for the help
Posted on 2001-08-05 07:17:52 by robsonde