Hey Eric, My internet connection at home is dead and I do 90% of my development from there so I cant test/commit changes for a while. Development on taskmanager in the ReactOS tree has been dead for quite a while while we work on merging more code from Winehq so change whatever you guys need and then we will resync with winehq taskmanager source later on as we are doing with regedit. Just make sure all of the Wine extentions are #if'd out with like #ifdef __WINESRC__ or something.
Thanks Steven
--- Eric Pouech pouech-eric@wanadoo.fr wrote:
Steven Edwards wrote:
Hello All, Would anyone that did work on taskmanager be willing to relicense for use in the Wine Project? It would need to be relicensed as LGPL or dual licensed LGPL/GPL.
Hi Steven,
here are a couple of changes to ROS' taskmanager in order to make it compile under Wine. It would be great if they were merged into ROS tree.
ChangeLog:
- Compilation issues
- replaced process.h dependency with winnt.h (when needed)
- converted perfpage.cpp and graphctl.cpp into C code
- Don't depend on msvcrt
- replaced _beginthread with CreateThread
- added wine only dumb macros for _ui64toa and _ultoa
- Misc.
- protected some code against division by zero (Wine won't be able to return lots of system internal values)
- removed ReactOS in title/version information
Let me know if it breaks something on ROS. (I didn't update ROS' makefile, you have to replace in it the C++ files in the new C files).
(BTW, it works with a couple of pending patches to Wine. There are still some bad artifacts in children painting, likely because of WS_EX_TRANSPARENT style in the performance page. The rest seems ok).
TIA A+
-- Eric Pouech
diff -u -N taskmgr.org/about.c taskmgr/about.c
--- taskmgr.org/about.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/about.c 2003-09-13 14:04:47.000000000 +0200 @@ -27,7 +27,6 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h>
#include "taskmgr.h" diff -u -N taskmgr.org/affinity.c taskmgr/affinity.c --- taskmgr.org/affinity.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/affinity.c 2003-09-12 21:26:34.000000000 +0200 @@ -27,7 +27,7 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> +#include <winnt.h> #include <stdio.h>
#include "taskmgr.h" diff -u -N taskmgr.org/applpage.c taskmgr/applpage.c --- taskmgr.org/applpage.c 2003-08-17 19:29:12.000000000 +0200 +++ taskmgr/applpage.c 2003-09-13 14:19:46.000000000 +0200 @@ -27,7 +27,6 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h>
#include "taskmgr.h" @@ -56,7 +55,7 @@
static BOOL bSortAscending = TRUE;
-void ApplicationPageRefreshThread(void *lpParameter); +DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter); BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam); void AddOrUpdateHwnd(HWND hWnd, TCHAR *szTitle, HICON hIcon, BOOL bHung); void ApplicationPageUpdate(void); @@ -116,7 +115,7 @@ UpdateApplicationListControlViewSetting();
// Start our refresh thread
_beginthread(ApplicationPageRefreshThread, 0, NULL);
CreateThread(NULL, 0, ApplicationPageRefreshThread, NULL, 0, NULL); return TRUE;
@@ -222,14 +221,14 @@ RefreshApplicationPage(); }
-void ApplicationPageRefreshThread(void *lpParameter) +DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter) { // Create the event hApplicationPageEvent = CreateEvent(NULL, TRUE, TRUE, _T("Application Page Event"));
// If we couldn't create the event then exit the thread if (!hApplicationPageEvent)
return;
return 0;
while (1) {
@@ -241,7 +240,7 @@ // If the wait failed then the event object must have been // closed and the task manager is exiting so exit this thread if (dwWaitVal == WAIT_FAILED)
return;
return 0; if (dwWaitVal == WAIT_OBJECT_0) {
diff -u -N taskmgr.org/column.c taskmgr/column.c --- taskmgr.org/column.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/column.c 2003-09-12 21:27:42.000000000 +0200 @@ -27,7 +27,6 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h>
#include "taskmgr.h" diff -u -N taskmgr.org/debug.c taskmgr/debug.c --- taskmgr.org/debug.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/debug.c 2003-09-12 21:27:12.000000000 +0200 @@ -27,8 +27,8 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h> +#include <winnt.h>
#include "taskmgr.h" #include "debug.h" diff -u -N taskmgr.org/endproc.c taskmgr/endproc.c --- taskmgr.org/endproc.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/endproc.c 2003-09-12 21:27:21.000000000 +0200 @@ -27,8 +27,8 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h> +#include <winnt.h>
#include "taskmgr.h" #include "endproc.h" diff -u -N taskmgr.org/font.c taskmgr/font.c --- taskmgr.org/font.c 2002-09-10 04:05:22.000000000 +0200 +++ taskmgr/font.c 2003-09-12 21:27:42.000000000 +0200 @@ -27,7 +27,6 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h>
#include "taskmgr.h" diff -u -N taskmgr.org/graph.c taskmgr/graph.c --- taskmgr.org/graph.c 2002-09-24 16:22:48.000000000 +0200 +++ taskmgr/graph.c 2003-09-13 13:56:31.000000000 +0200 @@ -27,8 +27,8 @@ #include <malloc.h> #include <memory.h> #include <tchar.h> -#include <process.h> #include <stdio.h> +#include <winnt.h>
#include "taskmgr.h" #include "graph.h" @@ -47,12 +47,11 @@ HDC hdc; PAINTSTRUCT ps; LONG WindowId;
- switch (message) { case WM_ERASEBKGND:
return TRUE;
return TRUE;
// // Filter out mouse & keyboard messages
@@ -130,7 +129,7 @@ } EndPaint(hWnd, &ps);
- return 0; }
@@ -327,7 +326,7 @@ ULONGLONG CommitChargeTotal; ULONGLONG CommitChargeLimit; int nBars;
- int nBarsUsed; // Bottom bars that are "used", i.e. are bright green, representing used
memory
- int nBarsUsed = 0; // Bottom bars that are "used", i.e. are bright green, representing used
memory int nBarsFree; // Top bars that are "unused", i.e. are dark green, representing free memory int i;
@@ -360,7 +359,8 @@ // So first find out how many bars we can fit // nBars = ((rcClient.bottom - rcClient.top) - 25) / 3;
- nBarsUsed = (nBars * (int)((CommitChargeTotal * 100) / CommitChargeLimit)) / 100;
if (CommitChargeLimit)
nBarsUsed = (nBars * (int)((CommitChargeTotal * 100) / CommitChargeLimit)) / 100;
nBarsFree = nBars - nBarsUsed;
if (nBarsUsed < 0) nBarsUsed = 0;
diff -u -N taskmgr.org/graphctl.c taskmgr/graphctl.c --- taskmgr.org/graphctl.c 1970-01-01 01:00:00.000000000 +0100 +++ taskmgr/graphctl.c 2003-09-13 13:39:54.000000000 +0200 @@ -0,0 +1,648 @@ +/*
- ReactOS Task Manager
- GraphCtrl.cpp
- Copyright (C) 2002 Robert Dickenson robd@reactos.org
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
=== message truncated ===
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com