SERVICE_STATUS Status;\r
LVITEM item;\r
DWORD BytesNeeded = 0;\r
- DWORD Loop = 5; //FIXME: testing value. needs better control\r
DWORD dwStartTickCount, dwOldCheckPoint;\r
\r
item.mask = LVIF_PARAM;\r
\r
/* set the progress bar range and step */\r
hProgBar = GetDlgItem(hProgDlg, IDC_SERVCON_PROGRESS);\r
- SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, Loop));\r
+ SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESSRANGE));\r
SendMessage(hProgBar, PBM_SETSTEP, (WPARAM)1, 0);\r
\r
/* open handle to the SCM */\r
\r
/* loop whilst service is not running */\r
/* FIXME: needs more control adding. 'Loop' is temparary */\r
- while (ServiceStatus.dwCurrentState != Control || !Loop)\r
+ while (ServiceStatus.dwCurrentState != Control)\r
{\r
DWORD dwWaitTime;\r
\r
\r
if (ServiceStatus.dwCurrentState == Control)\r
{\r
- SendMessage(hProgBar, PBM_DELTAPOS, Loop, 0);\r
+ SendMessage(hProgBar, PBM_DELTAPOS, PROGRESSRANGE, 0);\r
Sleep(1000);\r
return TRUE;\r
}\r
ENUM_SERVICE_STATUS_PROCESS *Service = NULL;\r
DWORD BytesNeeded = 0;\r
INT ArgCount = 0;\r
- DWORD Loop = 5; //FIXME: testing value. needs better control\r
DWORD dwStartTickCount, dwOldCheckPoint;\r
\r
/* copy pointer to selected service */\r
\r
/* set the progress bar range and step */\r
hProgBar = GetDlgItem(hProgDlg, IDC_SERVCON_PROGRESS);\r
- SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, Loop));\r
+ SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESSRANGE));\r
SendMessage(hProgBar, PBM_SETSTEP, (WPARAM)1, 0);\r
\r
/* open handle to the SCM */\r
\r
/* loop whilst service is not running */\r
/* FIXME: needs more control adding. 'Loop' is temparary */\r
- while (ServiceStatus.dwCurrentState != SERVICE_RUNNING || !Loop)\r
+ while (ServiceStatus.dwCurrentState != SERVICE_RUNNING)\r
{\r
DWORD dwWaitTime;\r
\r
\r
if (ServiceStatus.dwCurrentState == SERVICE_RUNNING)\r
{\r
- SendMessage(hProgBar, PBM_DELTAPOS, Loop, 0);\r
+ SendMessage(hProgBar, PBM_DELTAPOS, PROGRESSRANGE, 0);\r
Sleep(1000);\r
return TRUE;\r
}\r