Author: cwittich Date: Wed Nov 22 23:19:12 2006 New Revision: 24801
URL: http://svn.reactos.org/svn/reactos?rev=24801&view=rev Log: fixed a function declaration some minor formatting changes
Modified: trunk/reactos/base/applications/msconfig/srvpage.c trunk/reactos/base/applications/msconfig/startuppage.c
Modified: trunk/reactos/base/applications/msconfig/srvpage.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig/... ============================================================================== --- trunk/reactos/base/applications/msconfig/srvpage.c (original) +++ trunk/reactos/base/applications/msconfig/srvpage.c Wed Nov 22 23:19:12 2006 @@ -80,7 +80,7 @@ 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 @@ { /* 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 @@
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 @@ 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 @@ 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 @@ 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 @@ 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 @@
HeapFree(GetProcessHeap(), 0, pServiceStatus); CloseServiceHandle(ScHandle); - } + }
}
Modified: trunk/reactos/base/applications/msconfig/startuppage.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/msconfig/... ============================================================================== --- trunk/reactos/base/applications/msconfig/startuppage.c (original) +++ trunk/reactos/base/applications/msconfig/startuppage.c Wed Nov 22 23:19:12 2006 @@ -14,7 +14,7 @@ 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 @@ { 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 @@ { 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 @@ 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 @@ 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 @@ { 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 @@ { 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 @@ 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 @@ item.iSubItem = 1; SendMessage(hStartupListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item); } - + switch (PtrToLong(hRootKey)) { case PtrToLong(HKEY_LOCAL_MACHINE):