Click here to Skip to main content
15,896,442 members
Articles / Desktop Programming / MFC

Task Manager Extension 2.0

Rate me:
Please Sign up or sign in to vote.
4.92/5 (149 votes)
22 Jan 2007CDDL11 min read 598.6K   18.7K   263  
Task Manager Extension. This is a Windows Task Manager (NT/2000/XP/2003) plug-in. It adds lots of useful features to the standard Task Manager. It can show process modules, memory map, used handles, open files, file properties and a lot of other info!
// Export information about TaskManagerEx.dll

////////////////////////////////////////////////////////////////////////////////
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the TASKMANAGEREXDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// TASKMANAGEREXDLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef TASKMANAGEREXDLL_EXPORTS
#define TASKMANAGEREXDLL_API __declspec(dllexport)
#else
#define TASKMANAGEREXDLL_API __declspec(dllimport)
#endif

#ifdef TASKMANAGEREXDLL_EXPORTS
#	ifdef _DEBUG
#		define TASKMANAGEREXDLL_DEBUG_API __declspec(dllexport)
#	else
#		define TASKMANAGEREXDLL_DEBUG_API
#	endif
#else
#	ifdef TASKMANEX_EXE
#		define TASKMANAGEREXDLL_DEBUG_API
#	else
#		define TASKMANAGEREXDLL_DEBUG_API __declspec(dllimport)
#	endif
#endif

extern "C"
{
	TASKMANAGEREXDLL_API BOOL WINAPI Initialize();
}

TASKMANAGEREXDLL_DEBUG_API void EnableDebugPriv( void );

////////////////////////////////////////////////////////////////////////////////

#define	TASKMANAGEREX_WINDOW_LONG_USER_MAGIC_VALUE		275634

////////////////////////////////////////////////////////////////////////////////

#define	WM_TASKMANAGER_BASE				( WM_APP + 500 )

#define	WM_TASKMANAGER_FLAG				( WM_TASKMANAGER_BASE + 0 )
#define	WM_TASKMANAGER_FLAG_RET_VAL	0xaf2891fa

#define	WM_TASKMANAGER_TIP_OF_THE_DAY	( WM_TASKMANAGER_BASE + 1 )
#define	WM_TASKMANAGER_CREATE_FAKIE_WND	( WM_TASKMANAGER_BASE + 2 )

////////////////////////////////////////////////////////////////////////////////

#define	ID_TASKMANAGER_EX_BASE			30500

#define ID_PROCESSES_FILES				ID_TASKMANAGER_EX_BASE + 1
#define ID_PROCESSES_MODULES			ID_TASKMANAGER_EX_BASE + 2
#define ID_PROCESSES_HANDLES			ID_TASKMANAGER_EX_BASE + 3
#define ID_PROCESSES_WINDOWS			ID_TASKMANAGER_EX_BASE + 4
#define ID_PROCESSES_THREADS			ID_TASKMANAGER_EX_BASE + 5
#define ID_PROCESSES_MEMORY				ID_TASKMANAGER_EX_BASE + 6
#define ID_PROCESSES_INFO				ID_TASKMANAGER_EX_BASE + 7
#define ID_PROCESSES_EXE_PROPERTIES		ID_TASKMANAGER_EX_BASE + 8
#define ID_PROCESSES_EXE_DEPENDENCY		ID_TASKMANAGER_EX_BASE + 9
#define ID_PROCESSES_PROCESS_SECURITY	ID_TASKMANAGER_EX_BASE + 10

#define ID_EXTENSION_ABOUT				ID_TASKMANAGER_EX_BASE + 20
#define ID_EXTENSION_FINDUSEDFILE		ID_TASKMANAGER_EX_BASE + 21
#define ID_EXTENSION_FINDUSEDMODULE		ID_TASKMANAGER_EX_BASE + 22
#define ID_EXTENSION_PROCESSICONS		ID_TASKMANAGER_EX_BASE + 23
#define ID_EXTENSION_HIDESERVICES		ID_TASKMANAGER_EX_BASE + 24
#define ID_EXTENSION_SHOW_DRIVERS		ID_TASKMANAGER_EX_BASE + 25
#define ID_EXTENSION_ALL_HANDLES		ID_TASKMANAGER_EX_BASE + 26
#define ID_EXTENSION_TIP_OF_THE_DAY     ID_TASKMANAGER_EX_BASE + 27

#define ID_EXTENSION_CPU00				ID_TASKMANAGER_EX_BASE + 50
#define ID_EXTENSION_CPU25				ID_EXTENSION_CPU00 + 1
#define ID_EXTENSION_CPU50				ID_EXTENSION_CPU00 + 2
#define ID_EXTENSION_CPU75				ID_EXTENSION_CPU00 + 3

////////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Software Developer (Senior)
Belarus Belarus
He is a young and forward-looking software developer. He also has lots of interesting hobbies like snowboarding, bicycle riding, carting racing and of course talking about himself in a third person. Smile | :)

github.com/kolomenkin

Curriculum Vitae

Comments and Discussions