Click here to Skip to main content
Click here to Skip to main content

Task Manager Extension 2.0

By , 22 Jan 2007
 

Contents

Introduction

Back to contents

The Task Manager Extension (TaskManagerEx) is a plug-in for Windows' built-in Task Manager. It expands the basic functionality and gives a powerful control over running processes. Task Manager Extension can show process modules, process memory map, used kernel handles, opened files, file properties, and lots of other info! It is very useful in many situations.

Here you can see the Task Manager window with the Task Manager Extension plug-in loaded:

Task Manager Extension: Process context menu (Process operations)    Task Manager Extension: Main Task Manager Menu

The Task Manager Extension shows more processes, adds lots of useful items to process the context menu, adds a new "Extension" submenu to the main window menu, and so on...

Changes

Back to contents

Changes in version 2.1:

  • Added Visual Studio 2005 compile compatibility
  • Fixed bug with multiple Task Manager windows
  • Reduced splash screen show time from 3 seconds to 1 second
  • Added Service list to Process Information dialog
  • Added Command Line, Environment information to Process Information dialog
  • Fixed Process Information dialog resize bug
  • Fixed "Always on top" option bug
  • Tip Of The Day is now hidden by default
  • Removed multi-byte characters bug (for file and kernel object names)
  • Added Uninstall feature (TaskManagerEx.exe command line option).
  • WARNING! Couldn't remove bug with drawing (sometimes dialog with listview creates with a garbage on it)... (it happens since the original version 1.0)

Changes in version 2.0:

  • View process threads.
  • View memory map.
  • Edit process security.
  • View process basic information.
  • View process executable dependencies (depends.exe from MS VC++ 6 must be run at least once before).
  • Process executable file properties.
  • View module file properties.
  • View loaded drivers.
  • Edit object security.
  • Find object by part of its name.
  • Options: Start Task Manager Extension with Windows.
  • Russian localization.
  • Lots of bugs removed.
  • Lots of new small features added.

Features (from original version):

  • Show Application icons in Process list (if available).
  • Use different color for services.
  • Find a used file by any process. (Use * as file name for showing every used file.) (The search is a full text search, so for example you can use the extension only.)
  • Find a used module by any process. (The search is a full text search, so for example you can search for "kernel".)
  • Show Process ID in Applications tab.
  • Use different color for processes if the CPU usage reaches a given limit (25%, 50%, 75%).
  • Query list of every file, handle, module, window used by a given process.
  • Close a used file (you can unlock an exclusively opened file, so you can delete it).
  • Unload a used module (so you can delete it).
  • You can kill services too.
  • End process swiftly: just press DEL key!

Compatibility

Back to contents

The Task Manager Extension (TaskManagerEx) runs fine on Windows 2000, Windows XP, Windows 2003.

It doesn't work on any Windows 9x, Windows NT, or any Windows x64. I also tested the Task Manager Extension with Windows Vista, but it didn't work. I do not see a simple way to improve Task Manager Extension to work with Vista's Task Manager... :-(

Currently, two languages are supported - English and Russian. But it will work with any other localized Windows. In the Russian version of Windows, the Task Manager Extension shows all menus' captions and etc. in Russian language. It looks very native, when all user interfaces use a common language.

It is expected from the user to have Administrator rights while using the Task Manager Extension. Without these rights, some functions may not work or may work slowly.

Using Task Manager Extension

Back to contents

Warning

Back to contents

Warning! The Task Manager Extension can be very dangerous for your system! You must be sure what you are doing with the system internals! If you terminate some system thread, unload a library, or close an important handle, you may crash your system. Use the Task Manager Extension at your own risk!

Compiling

Back to contents

It is necessary to have the modern Platform SDK while compiling the Task Manager Extension on Visual Studio 6.0 (VC++ 6.0). You can download the February 2003 Windows Server 2003 PSDK Full Download with Local Install from here.

Visual Studio .NET doesn't need an extra SDK and is fully supported since this version of Task Manager Extension. You will be prompted to convert workspace and project files from 6.0 format.

Only two projects are necessary to compile the Task Manager Extension:

  • TaskManagerEx
  • TaskManagerExDll

You can compile the ANSI or Unicode version of the Task Manager Extension. Both should work.

Installation

Back to contents

The Task Manager Extension doesn't need a special installation:

  • Copy TaskManagerEx.exe and TaskManagerExDll.Dll to any folder on your computer.
  • Run TaskManagerEx.exe.
  • Run Task Manager by pressing Ctrl+Shift+Esc or by Ctrl+Alt+Del and selecting Task Manager (on Windows XP, Ctrl+Alt+Del loads the Task Manager immediately).

The Task Manager should have extended functionality now!

You can make the TaskManagerEx.exe to start during logon: select menu Extension\Options, check "Run during Windows logon" on appeared dialog and press OK.

Uninstall

Back to contents

You can run the TaskManagerEx.exe /clean command. It will unload and unregister the Task Manager Extension completely! TaskManagerEx.exe and TaskManagerExDll.Dll will remain on the disk. This operation is equal to the following operations:

  • Unregister TaskManagerEx.exe from running during Windows logon.
  • Unload TaskManagerEx.exe.
  • Restart existing Task Manager to unload TaskManagerExDll.Dll.

Hint! Try TaskManagerEx.exe /? to view all supported command line arguments!

Use Cases

Back to contents

There are lots of cases when the Task Manager Extension is very useful. Some of them are described below.

First of all, I want to say that the Task Manager Extension gives the Task Manager some extra security permissions so it may stop processes that generated "Access denied." before! You can view and terminate even processes that run services.

Detecting process service list, command line and environment

Back to contents

With the Task Manager Extension you can get the command line for any process in the system. You should only use the process context menu item "Information...".

Task Manager Extension: Process Information

You can also detect what Services are running in the selected process. It is useful when one of SVCHOST.EXE (or some other service executable) eats 100% of your CPU and you don't know what service is guilty.

Deleting blocked files: looking for used file or module

Back to contents

Sometimes file deleting is impossible. You may want to delete a file that is opened by some application. May be you are developing a hook DLL (or COM component) and you can't delete it because your DLL is loaded into some processes. In such cases, you can select a Task Manager main menu item "Extension/Find used file..." or "Extension/Find used module...".

Task Manager Extension: Find Used File

This dialog will help you find all the processes that use a specified file or executable module. You just enter a part of file, folder, or module, and press Enter. The special value "*" matches all files (or modules). Note that loaded modules may not be opened as files and vice versa! So the "Find used file..." dialog will not find the loaded modules. The user-entered string is searched in the whole path of the file.

Antivirus and anti-trojan protection

Back to contents

Sometimes, a firewall may alert you with a question about a network activity of a process. Sometimes you can see some strange process in Task Manager that is unknown to you or eats 90-100% of your CPU. With the Task Manager Extension you can simply check lots of information about suspicious processes.

First of all, you can check file information (it is usually shown through the "Properties" item of file context menu). The Task Manager Extension gives you the corresponding process context menu item. All Windows built-in modules have the correct VS_VERSION_INFO structure in its resources.

Task Manager Extension: File Properties

If an executable module is located in the Windows folder and there is no Version tab at all, or the vendor is not Microsoft, then there is a big probability that the selected module is a virus. Viruses usually don't contain the correct Windows version information because their author doesn't know what version of Windows you would use.

The second way to get important information about a process is the "Modules..." item of the context menu. It is especially important for RUNDLL32.EXE or RUNDLL.EXE processes. These processes are Microsoft EXE-files (with correct version info) that are written specially to run other DLLs.

Task Manager Extension: Process Module List

In this dialog, you can directly view any module file properties using the context menu. If the process seems to be an internal Windows process, then all of its modules usually lay in Windows folder and have version information that correlates with the version of your Windows. There are a few exclusions: Windows Hook DLLs may be loaded anywhere (it may be a DLL from your mouse driver, multimedia keyboard driver, Lingvo loader, etc.). Some DLLs may be also located in correct Microsoft folders like "C:\Program Files\Common Files\Microsoft Shared".

These are the basics of anti-virus war on your computer. My experience shows that end-users will always find a new and unexpected way of using my program. :-)

Debugging: library usage

Back to contents

You can see the process module list through the "Modules..." item of the process context menu.

Task Manager Extension: Module List (debugging)

You should pay your attention to the "Usage" column. It contains library usage counter. It increments during the LoadLibrary() call and decrements during the FreeLibrary(). "Fixed" modules are the main executable modules and all libraries that are statically linked to it. These libraries do not increment their counters and are never unloaded. You can increment or decrement the usage counter by the module context menu. When the counter goes to zero, the library is unloaded automatically. Be careful!

Debugging: kernel object usage

Back to contents

You can see all your handles using the "Handles..." item of the process context menu.

Task Manager Extension: Process Handle List

Here, you can see all the process handles to various kernel objects. Some of them have names and you can see them. You can view and edit object security information. Most of the objects support special operations through their context menu. However, every handle supports its closing.

If you want to see opened files only, then you'd better choose the "Files..." process context menu item. It is the same, but it filters to show file objects only.

Other Task Manager Extension screenshots

Back to contents

Task Manager Extension: Process Handle Operations

Task Manager Extension:

Task Manager Extension: Process Module Operations

Conclusion

History

Back to contents

Four years ago, I found TaskManagerEx. I got it without any sources and used it for a long time. It was good enough, but I always wanted a bit more from that utility. I wanted Task Manager Extension to have some additional features when I accidentally found Zoltan's article on CodeGuru with sources (CodeGuru: Task Manager Extension). I spoke with Zoltan and wrote a new version of the Task Manager Extension. It was based on its public sources. While developing and refactoring old code, there was always one big question: how Zoltan could write it 5(!) years ago? There were no information about lots of undocumented features. I have now some of these info, but he wrote and debugged his code an eternal period ago! It was a really great job, Zoltan!

When I was writing version 2.1, I suddenly found the Windows 2000 sources. I looked at them and found the Task Manager sources. How exciting it was to see all those constants and logic, that we reverse engineered with IDA, Spy++, etc... It was nice to verify that the Task Manager Extension uses one of the most correct ways to hack the Windows Task Manager.

Analogs

Back to contents

After writing Task Manager Extension 2.0, I found the ProcessExplorer from Sysinternals. ProcessExplorer does more things than the Task Manager Extension, but it works standalone while the Task Manager Extension is built-in into the system (nice and tight). ProcessExplorer has also another disadvantage: it has no open sources. Some time ago, Microsoft bought Sysinternals, so you can find the ProcessExplorer installation here.

Credits

Back to contents

Thanks to Zoltan Csizmadia for writing the original version of TaskManagerEx. TaskManagerEx helped me lots of times in my work, and encouraged me to write an improved one.

Thanks to everybody who contributed anything on CodeGuru and The Code Project.

Thanks to Yura Semashko, Konstantin Karatov, Alexey Grakov, Ivan Kirkorov for verifying my article.

Thanks to nova_, Simon.W, wumpus1 and other users from CodeProject who tested TaskManagerEx 2.0.

Thanks to Mike Russell. He made a donation and told me how Task Manager Extension helped him. This occurrence inspired me to remove old bugs, write a new version, and to compose an article for it.

Back to contents

License

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

About the Author

Sergey Kolomenkin
Software Developer (Senior)
Belarus Belarus
Member
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 | :)
You can learn more about his professional life through the link http://reinhard.at.tut.by/profession/sergey_kolomenkin.html

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberAlecGood6 Jun '12 - 19:26 
the best taskman i've ever seen!
GeneralMy vote of 5memberCho Coolman22 May '12 - 3:20 
Thank you for your effort!
BugErrorsmemberMember 808896211 Aug '11 - 18:28 
Code is:-
 
IO_COUNTERS IOCounters;// WARNING! If you get error that IO_COUNTERS is undeclared

// then undefine it's definition above.

// Latest SDK defines this structure in
 
Errors Show :
 
windowscore.h(153) : error C2146: syntax error : missing ';' before identifier 'IOCounters'
taskmanagerexdll\windowscore.h(153) : error C2501: 'IO_COUNTERS' : missing storage-class or type specifiers
taskmanagerexdll\windowscore.h(153) : error C2501: 'IOCounters' : missing storage-class or type specifiers
SuggestionRe: bug [modified]membermla15425 Jul '11 - 8:32 
Hello,
BOOL SystemInfoUtils::GetFsFileName( LPCTSTR lpDeviceFileName, CString& fsFileName )
{
	BOOL rc = FALSE;
 
	TCHAR lpDeviceName[0x1000];
	TCHAR lpDrive[3] = _T("A:");
 
	// Iterating through the drive letters
	for ( TCHAR actDrive = _T('A'); actDrive <= _T('Z'); actDrive++ )
	{
		lpDrive[0] = actDrive;
 
		// Query the device for the drive letter
		if ( QueryDosDevice( lpDrive, lpDeviceName, 0x1000 ) != 0 )
		{
			// Network drive?
			if ( _tcsnicmp( _T("\\Device\\LanmanRedirector\\"), lpDeviceName, 25 ) == 0 )
			{
				//Mapped network drive
 
				char cDriveLetter;
				DWORD dwParam;
 
				TCHAR lpSharedName[0x1000];
 
				if ( _stscanf(  lpDeviceName,
								_T("\\Device\\LanmanRedirector\\;%c:%d\\%s"),
								&cDriveLetter,
								&dwParam,
								lpSharedName ) != 3 )
						continue;
 
				_tcscpy( lpDeviceName, _T("\\Device\\LanmanRedirector\\") );
				_tcscat( lpDeviceName, lpSharedName );
			}
 
			// Is this the drive letter we are looking for?
			if ( _tcsnicmp( lpDeviceName, lpDeviceFileName, _tcslen( lpDeviceName ) ) == 0 )
			{
				fsFileName = lpDrive;
				fsFileName += (LPCTSTR)( lpDeviceFileName + _tcslen( lpDeviceName ) );
 
				rc = TRUE;
 
				break;
			}
		}
	}
 
	return rc;
}
should be changed to
BOOL SystemInfoUtils::GetFsFileName( LPCTSTR lpDeviceFileName, CString& fsFileName )
{
	BOOL rc = FALSE;
 
	TCHAR lpDeviceName[0x1000];
	TCHAR lpDrive[3] = _T("A:");
 
	// Iterating through the drive letters
	for ( TCHAR actDrive = _T('A'); actDrive <= _T('Z'); actDrive++ )
	{
		lpDrive[0] = actDrive;
 
		// Query the device for the drive letter
		if ( QueryDosDevice( lpDrive, lpDeviceName, 0x1000 ) != 0 )
		{
			// Network drive?
			if ( _tcsnicmp( _T("\\Device\\LanmanRedirector\\"), lpDeviceName, 25 ) == 0 )
			{
				//Mapped network drive
 
				TCHAR cDriveLetter;
				DWORD dwParam;
 
				TCHAR lpSharedName[0x1000];
 
				if ( _stscanf(  lpDeviceName,
								_T("\\Device\\LanmanRedirector\\;%c:%d\\%s"),
								&cDriveLetter,
								&dwParam,
								lpSharedName ) != 3 )
						continue;
 
				_tcscpy( lpDeviceName, _T("\\Device\\LanmanRedirector\\") );
				_tcscat( lpDeviceName, lpSharedName );
			}
 
			// Is this the drive letter we are looking for?
			if ( _tcsnicmp( lpDeviceName, lpDeviceFileName, _tcslen( lpDeviceName ) ) == 0 )
			{
				fsFileName = lpDrive;
				fsFileName += (LPCTSTR)( lpDeviceFileName + _tcslen( lpDeviceName ) );
 
				rc = TRUE;
 
				break;
			}
		}
	}
 
	return rc;
}
Regards,
Mike
modified on Wednesday, August 3, 2011 11:45 AM

AnswerRe: bugmemberSergey Kolomenkin28 Jul '11 - 12:19 
Thanks! Your change looks reasonable!
Such mistakes may give lot of headache during debugging...
 
P.S. But I think at least MSVC++ version worked correctly with current code due to default data alignment and didn't crashed for this reason ever. ))
GeneralMy vote of 5memberKishan Hathiwala7 Apr '11 - 19:09 
Good job done...
GeneralPartialy Working Windows 7 Versionmemberneoandrew25 Apr '10 - 13:26 
Hi.
 
I have slightly fix this app, i was using it on vista, there were no processes menu that was on xp but it shows me icons and colored user and system processes and also cpu usage alert, i loved that, but on win7 it just crashes, so i simply check why and do a quick dirty fix for win7 here it is
 
http://www.speedyshare.com/files/22127607/taskmanagerExwin7.rar[^]
 
It is compiled with vs 2010, so enjoy and remember I'm not responsible for any damages - use at your own risk.
GeneralRe: Partialy Working Windows 7 Versionmembergauravkale3 Feb '11 - 1:55 
Can you reupload the fixed Task Manager Extension for Windows 7 please?
GeneralRe: Partialy Working Windows 7 Versionmemberneoandrew31 May '11 - 3:19 
Here it is http://www.fileserve.com/file/PNNGrQN[^] File name: taskmanagerExwin7.rar File size: 696.42 KB
GeneralRe: Partialy Working Windows 7 Versionmembergauravkale2 Jul '11 - 9:10 
Thanks so much! But I have 64-bit Windows 7. Is there a 64-bit version for 64-bit XP XPx64 and 64-bit W7?
GeneralRe: Partialy Working Windows 7 VersionmemberSergey Kolomenkin28 Jul '11 - 12:25 
What has been changed there?
What kind of Windows7 support was added?
 
Can you upload sources?
GeneralRe: Partialy Working Windows 7 Versionmemberjay314112 Apr '12 - 4:47 
Do you have a version that works in Windows 7 Professional? I have compiled the code under vs2008 but it hangs on ctrl-alt-esc
GeneralRe: Partialy Working Windows 7 Versionmembergauravkale15 Jun '12 - 3:56 
Can you upload the source of your Windows 7 mod?
QuestionExcellent programmemberVladaTzar31 Mar '10 - 10:38 
I am wondering if it is possible to implement feature so some program (by choice) can be set priority to high if it starts.
I just started program, but I never really looked at the code itself, but I was amazed how nicely it did work!
 
Regards,
Vlada
Generalusing this since yearsmemberHenry2k21 Feb '10 - 1:46 
since 2003 this is a must have for me, using windows2000 without the extension wasnt an option for me since i found this.
 
But seems theres problems on my system, im using windowblinds (and xppro sp2 now) and sometimes the taskman.exe will crash when it tries to load (hook) the dll, i get the typical crashing-dialogue and after some restarting of the taskman.exe it seems to work until suddenly it crashes with no reason and then it begins from start. possibly its the "draw-bug" that brings windowblinds to fall and that follows in crashing taskman.exe?
QuestionAny plans to extend support for Windows 7?membershantanu kaushik20 Jan '10 - 22:43 
Any plans to extend support for Windows 7?
JokeThnxmemberkyo_burnit8 May '09 - 3:52 
Thank you very much..Rose | [Rose]
GeneralMarvellous Article... :)memberbnc3 Apr '09 - 3:25 
Thanx Very Much.
QuestionInfo Vista...memberdevzav30 Sep '08 - 22:15 
Does this extension work with Windows Vista too?
AnswerRe: Info Vista...memberSergey Kolomenkin4 Oct '08 - 23:02 
Unfortunatelly, not. It works very bad on Vista.
GeneralProcess Safeguardsmembersoulbladex30 Sep '08 - 10:48 
I am always grateful for any opportunity to increase the security of my system. This seems like one of those "must have" programs, but before I download it, I wanted to know what this actually does with the default task manager.
 
Mainly, I just want to be able to switch between the default task manager and this powerful extension. I read that the extension kills any process even if it is an OS protected process, potentially messing up the system. However, I don't want to override the OS process protection by default. Does running the executable embed the extension, or do you have to run the executable every time you want to use the extension?
GeneralRe: Process SafeguardsmemberSergey Kolomenkin4 Oct '08 - 23:13 
This Extension will NOT help you to kill processes like "winlogon.exe", "lsass.exe". But you will be able to kill simple windows services running as SYSTEM.
 
TaskManagerEx works like this:
It creates its own process without any visible windows. It will wait for any unhooked Task Manager and hooks it. It injects a DLL into the built-in Task Manager. Some antiviruses may say that this program seems like some kind of virus. That DLL hooks windows procs and so on to improve the usual Task Manager and to add some features.
 
You can't unhook Task Manager, but you can unload exe module by killing its process or by running
TaskManagerEx.exe /u
. Then you may close (and restart) Task Manager - it will not be hooked.
Generaluserpusermemberuserpuser7 Aug '08 - 16:46 
Спасибо! Молодец! +100
GeneralI like it but,memberNGS 54967230 Apr '08 - 4:29 
it is a little annoying to have to close down a display window to open the next one, as when I look at the associated files, then if I want to see the modules I have to close the files window and right click again to request modules. It would be a better app if I could select from a menu and/or tool bar to look at the other choices from that same window.
 
Other than that, this is great!
GeneralRe: I like it but,memberMember 46842765 Oct '08 - 7:31 
You can use AnVir Task Manager Free
Have a look at http://www.anvir.com/[^]
GeneralКруто!memberAleksei Krassovskikh2 Apr '08 - 5:00 
???????? ??????! ????? ?????? ??? ?????????? ?????? ? ?????????? ??????
 
??????? ???????!
 
Alex KraS

GeneralNeeds workmemberVizCoder13 Sep '07 - 17:44 
When i first ran it, i thought it was an excellent program. But then i clicked "Find used file..." and typed in the name of a file i had open,... BSOD! Windows crashed. So i deleted the program. You need to make it more robust, other than that it's a great program
 
--------------------------------
Customer in computer shop: "Can you copy the Internet onto this disk for me?"

GeneralSetting memory protections in memory windowmemberroytam22 Aug '07 - 22:04 
It would be nice that memory protection options can be set in memory window.
GeneralExcellent Piece of WorkmemberMushq27 Jun '07 - 3:43 
Marvelous Piece of work.
 
Best Regards,
Mushq
GeneralCool~~memberwanjianxin6 Jun '07 - 4:17 
Good job!Smile | :) but it can't run on vista. I will Expect next verson.
GeneralRunning multiple instancesmembergr3gw25 Apr '07 - 2:44 
Is it possible to run multiple instances of TaskMgrEx? I would like to do this. I see that there was a 'bug' in version 2.0 that allowed a second instance to start. Dam! Too late.
 
--Greg
AnswerRe: Running multiple instancesmemberSergey Kolomenkin25 Apr '07 - 2:54 
You can find the following line in TaskManagerExDll.cpp:
 
SendMessage( hwndTaskManager, WM_TASKMANAGER_CREATE_FAKIE_WND, 0, 0 );
 
If you comment that line then multiple instances of task manager will be able to run. (I can't verify it now, but it should work)

GeneralRe: Running multiple instances [modified]membergr3gw25 Apr '07 - 11:47 
Thanks Sergey.
 
I'll dust off my Visual Studio 2005 and give it a go.
 
--Greg
 

-- modified at 1:40 Saturday 28th April, 2007
GeneralRe: Running multiple instancesmembergr3gw27 Apr '07 - 19:04 
Sergey,
 
I've applied the mod and it works fine. Thank you very much.
 
I was going to post the compiled version but then decided it would be inappropriate for me to post modified code. Perhaps you will consider adding a switch in the registry, like you have for Load DLL OnceOnly or Always, in the next version of Task Manager Extension.
 
--Greg
Generalfeature requestmemberErick Hartanto18 Feb '07 - 10:46 
would like to have column with application exe path in process tab. instead right click then choose information Smile | :)
 
thank you
GeneralMolodez!memberRazr3335 Feb '07 - 4:26 
Otlichnayia rabota! Smile | :) Wink | ;)
 
Hi, all

GeneralRe: Molodez!memberSergey Kolomenkin5 Feb '07 - 23:55 
Thanks! Spasibo!
 
Smile | :)
GeneralExcelent articlememberCatalin Murariu1 Feb '07 - 4:44 
Just awsome! I only found out about it from the last newsletter, and I must say it is very interesting.
 
Asynchronously daydreaming...

GeneralI want to helpmemberMax Santos29 Jan '07 - 12:17 
Hello, thanks for the impovements you made on this.
 
I want to help solving th paint bug. But i only get so see it ramdom.
 
Do you have a way to allways replicate the bug?
 

GeneralRe: I want to help (paint bug)memberSergey Kolomenkin6 Feb '07 - 0:04 
I have NO way to reproduce paint bug with high frequency.
Frown | :-(
 
Sometimes it gets frequently, but it can hide for a long time...
I tried to remove a bug, but I couldn't experiment with a code without good reproducing of a bug...

GeneralRe: I want to help (paint bug) [modified]memberMax Santos9 Feb '07 - 15:39 
as far i can only tell that i thing is a sync problem between the dlg and the thread
 
if i undefine this //#define RUN_SYSTEM_INFO_DLG_IN_SEPARATE_THREAD
i will never get the paint bug
 
still on this topic, i dont understand the reason behind function "MyWait".
It seams a very bad way of working with threads.
 
i will try to investigate if this funcntion has something to do with it (the bug).
GeneralIconmemberTran Ngoc Minh17 Dec '06 - 17:01 
Hi !
In Task Manager program (When Press Ctrl+Alt+Del) , at tab Application uses to display applications Which are running .When display name of applications , it also display icon of those applications .I want to ask everybody ,Who know how can get icon of application (as above) ,please help me (I want to write a program like as Task Manager by Win32) .
Thanks !
AnswerRe: Icon [modified]memberSergey Kolomenkin4 Jan '07 - 4:02 
You can enumerate all top level windows and get their icons.
The other way is to determine main executable for all processes and extract first icon from their's resources.
 

GeneralSW_RESTOREmemberBassam Abdul-Baki14 Nov '06 - 5:38 
Any chance you can add the ability to restore a windows dialog after a Window crash? It seems the only thing missing from your and the original Task Manager.
 

"Religion is assurance in numbers."
 
Web - Blog - RSS - Math - LinkedIn - BM

GeneralRe: SW_RESTOREmemberSergey Kolomenkin14 Nov '06 - 6:17 
What exactly do you want to have?
Do you want TaskManager to collect the information about all top-level window sizes and positions and restore it manually when the applications are starting again?

GeneralRe: SW_RESTOREmemberBassam Abdul-Baki14 Nov '06 - 12:08 
How about both? In case some applications have it built-in, create two menu's one that restores all and one that restores selected applications.
 
Also, can you override the listbox to display in groups (i.e., user, system)? Kinda like having a treeview for the items displayed.
 
Finally, at the bottom, there is a checkbox for "show processes from all users". Can you add another that says, show only users processes? The list that I've seen are user, system, local service and network service. The last two options should make them easier to work with.
 
Thanks.
 

"Marge, don't discourage the boy! Weasling out of things is important to learn. It's what separates us from the animals! Except the weasel." - Homer Simpson
 
Web - Blog - RSS - Math - LinkedIn - BM

Questionhow can i destroy a window of nfs or counter strike..memberCYRIL K THANKACHAN23 Oct '06 - 7:40 
can anyone help me...

actually i'm developing a spy software.I've to close the 'counter strike' game as soon as it is loaded.i got the handle to that window by using GetForegroundWindow() ..and also the window text by using GetWindowText()
and i posted a msg PostMessage(HWND,WM_DESTROY,NULL,NULL)...
stil the woondow is not closing...how can i termnate this process..?

AnswerRe: how can i destroy a window of nfs or counter strike..memberSergey Kolomenkin5 Dec '06 - 3:24 
1) DWORD dwProcessID = 0; GetWindowThreadProcessId( hWnd, &dwProcessID );
2) HANDLE hProcess = OpenProcess( PROCESS_TERMINATE, FALSE, ProcessID );
3) TerminateProcess( hProcess, 0 );
4) CloseHandle( hProcess );
 
Your process should have enough rights to OpenProcess with PROCESS_TERMINATE access.
Administrator usually have such rights.
 
Smile | :) )
You can also do some other trick with it (it opens process with other access rights):
1) DWORD dwProcessID = 0; GetWindowThreadProcessId( hWnd, &dwProcessID );
2) HANDLE hProcess = OpenProcess( PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, FALSE, ProcessID );
3) FARPROC pfnProc = GetProcAddress( GetModuleHandle(_T("kernel32.dll")), "ExitProcess");
4) HANDLE hRemoteThread = CreateRemoteThread( hProcess, 0, 0, (LPTHREAD_START_ROUTINE)pfnProc, (LPVOID)0, 0, NULL );
5) CloseHandle(hRemoteThread);
6) CloseHandle(hProcess);
 
You should check all called function for error codes, of course!

General2 questionsmemberZzeeshan Arif20 Sep '06 - 0:18 
Frist of all i want to know which process playing with any particular file. I know the "File ..." tab is for this but i was somehow unable to get execute the code in debug version.
My question now is
 
1. How can i rum your program in debg mode.
2. Suppose i have PID, how can i know this process is having read/write operation on which file... (obviously "File ..." tab do this
 
I will be grateful if you answer these
 
Zeeshan
GeneralRe: 2 questionsmemberSergey Kolomenkin5 Dec '06 - 3:47 
1. To debug DLL code you should attach your debugger (Visual Studio) to running Taskmgr.exe
2. Someone said here that "File ..." don't work while compiling on studio rather 6.0.
You can use menu: Extension/Find used file...
It will find used file in all processes.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 22 Jan 2007
Article Copyright 2005 by Sergey Kolomenkin
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid