プロセスリスト
Windows上で動作しているプロセスの一覧を表示するプログラムを作成しました。
http://www.alles.or.jp/~hasepyon/
WMIは使っていませんので、WMIが動いていない環境でも動作します。Windows XP および Windows 98SE にて動作することを確認しています。
ソースを見ればわかるとおり、Toolhelp32 を使ってプロセスを列挙し、各プロセス毎のモジュールをさらにToolhelp32で列挙、という教科書どおりの面白味も何もないプログラムです。
実行結果は下記のような感じ。
:
PID:5940 - CMD.EXE
Parent PID: 1392
Create Time: 2004/08/11 02:10:09.971
Kernel Time: 00:00:00.125
User Time: 00:00:00.031
Module name: CMD.EXE
Base addr of module: 0x4ad00000
Size of module: 0x00076000 bytes.
Handle of the module: 1255145472
Module path: C:\WINDOWS\System32\CMD.EXE
Module name: ntdll.dll
Base addr of module: 0x77f50000
Size of module: 0x000a7000 bytes.
Handle of the module: 2012545024
Module path: C:\WINDOWS\System32\ntdll.dll
:
PID:4664 - haseps.exe
Parent PID: 5940
Create Time: 2004/08/11 02:11:40.126
Kernel Time: 00:00:00.015
User Time: 00:00:00.015
Module name: haseps.exe
Base addr of module: 0x00400000
Size of module: 0x00014000 bytes.
Handle of the module: 4194304
Module path: G:\MyDoc\Proj\haseps\haseps.exe
Module name: ntdll.dll
Base addr of module: 0x77f50000
Size of module: 0x000a7000 bytes.
Handle of the module: 2012545024
Module path: C:\WINDOWS\System32\ntdll.dll
: