diff --git a/reactos/base/applications/msconfig/srvpage.c b/reactos/base/applications/msconfig/srvpage.c index 44b34884651..fbfbb4c10c5 100644 --- a/reactos/base/applications/msconfig/srvpage.c +++ b/reactos/base/applications/msconfig/srvpage.c @@ -80,7 +80,7 @@ GetServices ( void ) SC_HANDLE hService; DWORD BytesNeeded = 0; DWORD ResumeHandle = 0; - DWORD NumServices = 0; + DWORD NumServices = 0; DWORD dwHandle, dwLen; size_t Index; UINT BufLen; @@ -105,7 +105,7 @@ GetServices ( void ) { /* reserve memory for service info array */ pServiceStatus = (ENUM_SERVICE_STATUS_PROCESS *) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); - if (!pServiceStatus) + if (!pServiceStatus) return; /* fill array with service info */ @@ -137,7 +137,7 @@ GetServices ( void ) BytesNeeded = 0; hService = OpenService(ScHandle, pServiceStatus[Index].lpServiceName, SC_MANAGER_CONNECT); - if (hService != INVALID_HANDLE_VALUE) + if (hService != INVALID_HANDLE_VALUE) { /* check if service is required by the system*/ if (!QueryServiceConfig2(hService, SERVICE_CONFIG_FAILURE_ACTIONS, (LPBYTE)pServiceFailureActions, 0, &BytesNeeded)) @@ -145,7 +145,7 @@ GetServices ( void ) if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { pServiceFailureActions = (LPSERVICE_FAILURE_ACTIONS) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); - if (pServiceFailureActions == NULL) + if (pServiceFailureActions == NULL) return; if (!QueryServiceConfig2(hService, SERVICE_CONFIG_FAILURE_ACTIONS, (LPBYTE)pServiceFailureActions, BytesNeeded, &BytesNeeded)) @@ -183,7 +183,7 @@ GetServices ( void ) if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { pServiceConfig = (LPQUERY_SERVICE_CONFIG) HeapAlloc(GetProcessHeap(), 0, BytesNeeded); - if (pServiceConfig == NULL) + if (pServiceConfig == NULL) return; if (!QueryServiceConfig(hService, pServiceConfig, BytesNeeded, &BytesNeeded)) @@ -215,7 +215,7 @@ GetServices ( void ) if (dwLen) { lpData = (TCHAR*) HeapAlloc(GetProcessHeap(), 0, dwLen); - if (lpData == NULL) + if (lpData == NULL) return; if (!GetFileVersionInfo (FileName, dwHandle, dwLen, lpData)) @@ -231,12 +231,12 @@ GetServices ( void ) wsprintf(szStrFileInfo, _T("StringFileInfo\\%04X%04X\\CompanyName"), wCodePage, wLangID); } - if (VerQueryValue (lpData, szStrFileInfo, (LPVOID) &lpBuffer, (PUINT) &BufLen)) + if (VerQueryValue (lpData, szStrFileInfo, (void**) &lpBuffer, (PUINT) &BufLen)) { item.pszText = lpBuffer; item.iSubItem = 2; SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); - } + } HeapFree(GetProcessHeap(), 0, lpData); } else @@ -259,6 +259,6 @@ GetServices ( void ) HeapFree(GetProcessHeap(), 0, pServiceStatus); CloseServiceHandle(ScHandle); - } + } } diff --git a/reactos/base/applications/msconfig/startuppage.c b/reactos/base/applications/msconfig/startuppage.c index 4382a31d927..d687344f38f 100644 --- a/reactos/base/applications/msconfig/startuppage.c +++ b/reactos/base/applications/msconfig/startuppage.c @@ -14,7 +14,7 @@ HWND hStartupListCtrl; HWND hStartupDialog; void GetAutostartEntriesFromRegistry ( HKEY hRootKey, TCHAR* KeyName ); -void GetDisabledAutostartEntriesFromRegistry (); +void GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath); INT_PTR CALLBACK StartupPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) @@ -78,7 +78,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath) { HKEY hKey, hSubKey; DWORD Index, SubIndex, dwValues, dwSubValues, retVal; - DWORD dwValueLength, dwDataLength = MAX_VALUE_NAME; + DWORD dwValueLength, dwDataLength = MAX_VALUE_NAME; LV_ITEM item; TCHAR* Data; TCHAR szValueName[MAX_KEY_LENGTH]; @@ -89,7 +89,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath) { if (RegQueryInfoKey(hKey, NULL, NULL, NULL, &dwValues, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { - for (Index = 0, retVal = ERROR_SUCCESS; Index < dwValues; Index++) + for (Index = 0, retVal = ERROR_SUCCESS; Index < dwValues; Index++) { dwValueLength = MAX_KEY_LENGTH; dwDataLength = MAX_VALUE_NAME; @@ -105,7 +105,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath) item.pszText = szValueName; item.iItem = ListView_GetItemCount(hStartupListCtrl); item.lParam = 0; - (void)ListView_InsertItem(hStartupListCtrl, &item); + (void)ListView_InsertItem(hStartupListCtrl, &item); if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, szSubPath, 0, KEY_READ | KEY_ENUMERATE_SUB_KEYS, &hSubKey) == ERROR_SUCCESS) { if (RegQueryInfoKey(hSubKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwSubValues, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) @@ -121,7 +121,7 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath) GetLongPathName(Data, Data, (DWORD) _tcsclen(Data)); item.pszText = Data; item.iSubItem = 1; - SendMessage(hStartupListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); + SendMessage(hStartupListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); } else if (!_tcscmp(szSubValueName, _T("key")) || !_tcscmp(szSubValueName, _T("location"))) { @@ -154,7 +154,7 @@ GetAutostartEntriesFromRegistry ( HKEY hRootKey, TCHAR* KeyName ) { HKEY hKey; DWORD Index, dwValues, retVal, dwType; - DWORD dwValueLength, dwDataLength = MAX_VALUE_NAME; + DWORD dwValueLength, dwDataLength = MAX_VALUE_NAME; TCHAR* Data; TCHAR lpValueName[MAX_KEY_LENGTH]; TCHAR Path[MAX_KEY_LENGTH + 5]; @@ -164,7 +164,7 @@ GetAutostartEntriesFromRegistry ( HKEY hRootKey, TCHAR* KeyName ) { if (RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwValues, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { - for (Index = 0, retVal = ERROR_SUCCESS; Index < dwValues; Index++) + for (Index = 0, retVal = ERROR_SUCCESS; Index < dwValues; Index++) { dwValueLength = MAX_KEY_LENGTH; dwDataLength = MAX_VALUE_NAME; @@ -172,7 +172,7 @@ GetAutostartEntriesFromRegistry ( HKEY hRootKey, TCHAR* KeyName ) if (Data == NULL) break; retVal = RegEnumValue(hKey, Index, lpValueName, &dwValueLength, NULL, &dwType, (LPBYTE)Data, &dwDataLength); - if (retVal == ERROR_SUCCESS) + if (retVal == ERROR_SUCCESS) { memset(&item, 0, sizeof(LV_ITEM)); item.mask = LVIF_TEXT; @@ -190,7 +190,7 @@ GetAutostartEntriesFromRegistry ( HKEY hRootKey, TCHAR* KeyName ) item.iSubItem = 1; SendMessage(hStartupListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); } - + switch (PtrToLong(hRootKey)) { case PtrToLong(HKEY_LOCAL_MACHINE):