TaskList

Description

Short story: Recreation of Task Manager's Applications tab shows how to properly terminate processes.

Longer description from old site: click here.

To be edited...

Published

This sample, or the one from which it originally derived, was published (or at least peripherally mentioned) in the following article(s):

APIs Usage

This sample uses the following API calls:

Module Library Function
CTaskList.cls kernel32
user32















GetVersionEx
GetClassLong
GetClassName
GetForegroundWindow
GetParent
GetTopWindow
GetWindow
GetWindowLong
GetWindowText
GetWindowThreadProcessId
IsIconic
IsWindow
IsWindowVisible
LoadIcon
SendMessage
SendMessageTimeout
SetForegroundWindow
ShowWindow
FTaskList.frm user32
GetWindowLong
GetWindowThreadProcessId
MCreatePicture.bas olepro32 OleCreatePictureIndirect
MForceFore.bas user32






AttachThreadInput
GetForegroundWindow
GetParent
GetWindowThreadProcessId
IsIconic
IsWindowVisible
SetForegroundWindow
ShowWindow
MHung.bas user32
IsWindow
SendMessageTimeout
MRunDialog.bas kernel32
shell32
user32







GetVersionEx
#61
FindWindow
GetWindow
GetWindowRect
KillTimer
MoveWindow
SendMessage
SetForegroundWindow
SetTimer
ShowWindow
MTermProc.bas kernel32







psapi


user32





vdmdbg

CloseHandle
FormatMessage
GetPriorityClass
OpenProcess
SetPriorityClass
Sleep
TerminateProcess
WaitForSingleObject
EnumProcessModules
GetModuleBaseName
GetModuleFileNameEx
EnumWindows
GetClassName
GetWindowLong
GetWindowThreadProcessId
IsWindowVisible
PostMessage
VDMEnumProcessWOW
VDMEnumTaskWOWEx
VDMTerminateTaskWOW
MVdmInfo.bas kernel32

psapi


vdmdbg

CloseHandle
OpenProcess
EnumProcessModules
GetModuleBaseName
GetModuleFileNameEx
VDMEnumProcessWOW
VDMEnumTaskWowEx
VDMTerminateTaskWow
Sleeper.frm kernel32 Sleep

Don't see what you're looking for? Here's a complete API cross-reference.

Download

Download TaskList.zip   Please, enjoy and learn from this sample. Include its code within your own projects, if you wish. But, in order to insure only the most recent code is available to all, I ask that you don't share the sample by any form of mass distribution.

Download TaskList.zip, 106Kb, Last Updated: Wednesday, February 13, 2002

See Also

The following resources may also be of interest: