Modified: trunk/reactos/subsys/system/servman/control.c
Modified: trunk/reactos/subsys/system/servman/servman.h
Modified: trunk/reactos/subsys/system/servman/start.c
--- trunk/reactos/subsys/system/servman/control.c 2006-01-22 23:35:43 UTC (rev 20995)
+++ trunk/reactos/subsys/system/servman/control.c 2006-01-22 23:42:45 UTC (rev 20996)
@@ -22,7 +22,6 @@
SERVICE_STATUS Status;
LVITEM item;
DWORD BytesNeeded = 0;
- DWORD Loop = 5; //FIXME: testing value. needs better control
DWORD dwStartTickCount, dwOldCheckPoint;
item.mask = LVIF_PARAM;
@@ -34,7 +33,7 @@
/* set the progress bar range and step */
hProgBar = GetDlgItem(hProgDlg, IDC_SERVCON_PROGRESS);
- SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, Loop));
+ SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESSRANGE));
SendMessage(hProgBar, PBM_SETSTEP, (WPARAM)1, 0);
/* open handle to the SCM */
@@ -79,7 +78,7 @@
/* loop whilst service is not running */
/* FIXME: needs more control adding. 'Loop' is temparary */
- while (ServiceStatus.dwCurrentState != Control || !Loop)
+ while (ServiceStatus.dwCurrentState != Control)
{
DWORD dwWaitTime;
@@ -129,7 +128,7 @@
if (ServiceStatus.dwCurrentState == Control)
{
- SendMessage(hProgBar, PBM_DELTAPOS, Loop, 0);
+ SendMessage(hProgBar, PBM_DELTAPOS, PROGRESSRANGE, 0);
Sleep(1000);
return TRUE;
}
--- trunk/reactos/subsys/system/servman/servman.h 2006-01-22 23:35:43 UTC (rev 20995)
+++ trunk/reactos/subsys/system/servman/servman.h 2006-01-22 23:42:45 UTC (rev 20996)
@@ -11,6 +11,7 @@
#define MAX_KEY_LENGTH 256
#define NUM_BUTTONS 13
+#define PROGRESSRANGE 8
BOOL RefreshServiceList(VOID);
--- trunk/reactos/subsys/system/servman/start.c 2006-01-22 23:35:43 UTC (rev 20995)
+++ trunk/reactos/subsys/system/servman/start.c 2006-01-22 23:42:45 UTC (rev 20996)
@@ -21,7 +21,6 @@
ENUM_SERVICE_STATUS_PROCESS *Service = NULL;
DWORD BytesNeeded = 0;
INT ArgCount = 0;
- DWORD Loop = 5; //FIXME: testing value. needs better control
DWORD dwStartTickCount, dwOldCheckPoint;
/* copy pointer to selected service */
@@ -29,7 +28,7 @@
/* set the progress bar range and step */
hProgBar = GetDlgItem(hProgDlg, IDC_SERVCON_PROGRESS);
- SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, Loop));
+ SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESSRANGE));
SendMessage(hProgBar, PBM_SETSTEP, (WPARAM)1, 0);
/* open handle to the SCM */
@@ -72,7 +71,7 @@
/* loop whilst service is not running */
/* FIXME: needs more control adding. 'Loop' is temparary */
- while (ServiceStatus.dwCurrentState != SERVICE_RUNNING || !Loop)
+ while (ServiceStatus.dwCurrentState != SERVICE_RUNNING)
{
DWORD dwWaitTime;
@@ -122,7 +121,7 @@
if (ServiceStatus.dwCurrentState == SERVICE_RUNNING)
{
- SendMessage(hProgBar, PBM_DELTAPOS, Loop, 0);
+ SendMessage(hProgBar, PBM_DELTAPOS, PROGRESSRANGE, 0);
Sleep(1000);
return TRUE;
}