Author: cwittich Date: Thu Oct 5 01:47:08 2006 New Revision: 24403
URL: http://svn.reactos.org/svn/reactos?rev=24403&view=rev Log: -don't use GetLastError with Reg* functions -remove @16 from def file (msvc doesn't like it)
Modified: trunk/reactos/dll/cpl/timedate/internettime.c trunk/reactos/dll/cpl/timedate/timedate.def
Modified: trunk/reactos/dll/cpl/timedate/internettime.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/internetti... ============================================================================== --- trunk/reactos/dll/cpl/timedate/internettime.c (original) +++ trunk/reactos/dll/cpl/timedate/internettime.c Thu Oct 5 01:47:08 2006 @@ -335,40 +335,31 @@ { HKEY hKey; HWND hCheck; - LONG Ret; WCHAR Data[8]; DWORD Size;
- Ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Parameters", 0, KEY_QUERY_VALUE, - &hKey); - if (Ret != ERROR_SUCCESS) - { - DisplayWin32Error(Ret); - return; - } - - Size = sizeof(Data); - Ret = RegQueryValueExW(hKey, + &hKey) == ERROR_SUCCESS) + { + Size = sizeof(Data); + if (RegQueryValueExW(hKey, L"Type", NULL, NULL, (LPBYTE)Data, - &Size); - if (Ret != ERROR_SUCCESS) - { - DisplayWin32Error(Ret); - } - - if (lstrcmp(Data, L"NTP") == 0) - { - hCheck = GetDlgItem(hwnd, IDC_AUTOSYNC); - SendMessageW(hCheck, BM_SETCHECK, 0, 0); - } - - RegCloseKey(hKey); + &Size) == ERROR_SUCCESS) + { + if (lstrcmp(Data, L"NTP") == 0) + { + hCheck = GetDlgItem(hwnd, IDC_AUTOSYNC); + SendMessageW(hCheck, BM_SETCHECK, 0, 0); + } + } + RegCloseKey(hKey); + } }
Modified: trunk/reactos/dll/cpl/timedate/timedate.def URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.d... ============================================================================== --- trunk/reactos/dll/cpl/timedate/timedate.def (original) +++ trunk/reactos/dll/cpl/timedate/timedate.def Thu Oct 5 01:47:08 2006 @@ -1,6 +1,6 @@ LIBRARY timedate.cpl
EXPORTS -CPlApplet@16 +CPlApplet
; EOF