Author: gedmurphy
Date: Wed Jun 21 23:57:58 2006
New Revision: 22486
URL:
http://svn.reactos.ru/svn/reactos?rev=22486&view=rev
Log:
- Add more code for NTP server selection.
- draw clock window from resource file to fix dialog unit / pixel anomaly ;)
- Do a bit of work on the NTP client. Still untested and may change to tcp.
All untested and I'm no where near finished yet, but there are a few bug fixes in
here, and I'm running short on time ;)
Modified:
trunk/reactos/dll/cpl/timedate/En.rc
trunk/reactos/dll/cpl/timedate/clock.c
trunk/reactos/dll/cpl/timedate/monthcal.c
trunk/reactos/dll/cpl/timedate/ntpclient.c
trunk/reactos/dll/cpl/timedate/resource.h
trunk/reactos/dll/cpl/timedate/timedate.c
trunk/reactos/dll/cpl/timedate/timedate.h
trunk/reactos/dll/cpl/timedate/timedate.rbuild
Modified: trunk/reactos/dll/cpl/timedate/En.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/En.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/En.rc (original)
+++ trunk/reactos/dll/cpl/timedate/En.rc Wed Jun 21 23:57:58 2006
@@ -20,6 +20,8 @@
DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
144, 105, 90, 12
LTEXT "", IDC_TIMEZONE, 4, 136, 241, 8
+ CONTROL "", IDC_CLOCKWND, "ClockWndClass",
+ WS_CHILD | WS_VISIBLE, 138, 12, 102, 89
END
Modified: trunk/reactos/dll/cpl/timedate/clock.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/clock.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/clock.c (original)
+++ trunk/reactos/dll/cpl/timedate/clock.c Wed Jun 21 23:57:58 2006
@@ -5,10 +5,11 @@
#define TWOPI (2 * 3.14159)
static const TCHAR szClockWndClass[] = TEXT("ClockWndClass");
+
static HBRUSH hGreyBrush = NULL;
static HPEN hGreyPen = NULL;
-static VOID
+static VOID
SetIsotropic(HDC hdc, INT cxClient, INT cyClient)
{
/* set isotropic mode */
@@ -17,25 +18,25 @@
SetViewportOrgEx(hdc, cxClient / 2, cyClient / 2, NULL);
}
-static VOID
+static VOID
RotatePoint(POINT pt[], INT iNum, INT iAngle)
{
INT i;
POINT ptTemp;
-
+
for (i = 0 ; i < iNum ; i++)
{
ptTemp.x = (INT) (pt[i].x * cos (TWOPI * iAngle / 360) +
pt[i].y * sin (TWOPI * iAngle / 360));
-
+
ptTemp.y = (INT) (pt[i].y * cos (TWOPI * iAngle / 360) -
pt[i].x * sin (TWOPI * iAngle / 360));
-
+
pt[i] = ptTemp;
}
}
-static VOID
+static VOID
DrawClock(HDC hdc)
{
INT iAngle;
@@ -43,7 +44,7 @@
HBRUSH hBrushOld;
HPEN hPenOld = NULL;
- /* grey brush to fill the dots */
+ /* grey brush to fill the dots */
hBrushOld = SelectObject(hdc, hGreyBrush);
hPenOld = GetCurrentObject(hdc, OBJ_PEN);
@@ -61,7 +62,7 @@
* i.e. 1-4 or 5, 6-9 or 10, 11-14 or 15 */
if (iAngle % 5)
{
- pt[2].x = pt[2].y = 7;
+ pt[2].x = pt[2].y = 7;
SelectObject(hdc, hGreyPen);
}
else
@@ -79,12 +80,12 @@
Ellipse(hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y);
}
-
+
SelectObject(hdc, hBrushOld);
SelectObject(hdc, hPenOld);
}
-static VOID
+static VOID
DrawHands(HDC hdc, SYSTEMTIME * pst, BOOL fChange)
{
static POINT pt[3][5] = { {{0, -30}, {20, 0}, {0, 100}, {-20, 0}, {0, -30}},
@@ -101,7 +102,7 @@
iAngle[1] = pst->wMinute * 6;
iAngle[2] = pst->wSecond * 6;
- memcpy(ptTemp, pt, sizeof(pt));
+ CopyMemory(ptTemp, pt, sizeof(pt));
for(i = fChange ? 0 : 2; i < 3; i++)
{
@@ -118,7 +119,7 @@
WPARAM wParam,
LPARAM lParam)
{
-
+
static INT cxClient, cyClient;
static SYSTEMTIME stPrevious;
HDC hdc;
@@ -166,9 +167,9 @@
break;
default:
- DefWindowProc(hwnd,
- uMsg,
- wParam,
+ DefWindowProc(hwnd,
+ uMsg,
+ wParam,
lParam);
}
@@ -176,21 +177,25 @@
}
-
BOOL
-InitClockWindowClass(VOID)
+RegisterClockControl(VOID)
{
WNDCLASSEX wc = {0};
wc.cbSize = sizeof(WNDCLASSEX);
- wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = ClockWndProc;
wc.hInstance = hApplet;
- wc.hIcon = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
wc.lpszClassName = szClockWndClass;
- wc.hIconSm = NULL;
return RegisterClassEx(&wc) != (ATOM)0;
}
+
+
+VOID
+UnregisterClockControl(VOID)
+{
+ UnregisterClass(szClockWndClass,
+ hApplet);
+}
Modified: trunk/reactos/dll/cpl/timedate/monthcal.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/monthcal.c…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/monthcal.c (original)
+++ trunk/reactos/dll/cpl/timedate/monthcal.c Wed Jun 21 23:57:58 2006
@@ -80,7 +80,7 @@
(WPARAM)pnmh->idFrom,
(LPARAM)pnmh);
}
-
+
return Ret;
}
@@ -163,7 +163,7 @@
NewCellSize.cy = infoPtr->ClientSize.cy / 7;
if (infoPtr->CellSize.cx != NewCellSize.cx ||
- infoPtr->CellSize.cy != NewCellSize.cy);
+ infoPtr->CellSize.cy != NewCellSize.cy)
{
infoPtr->CellSize = NewCellSize;
RepaintHeader = TRUE;
@@ -668,15 +668,15 @@
{
PMONTHCALWND infoPtr;
LRESULT Ret = 0;
-
+
infoPtr = (PMONTHCALWND)GetWindowLongPtr(hwnd,
0);
-
+
if (infoPtr == NULL && uMsg != WM_CREATE)
{
goto HandleDefaultMessage;
}
-
+
switch (uMsg)
{
#if MONTHCAL_CTRLBG != MONTHCAL_DISABLED_CTRLBG
@@ -815,7 +815,7 @@
case WM_GETDLGCODE:
{
INT virtKey;
-
+
virtKey = (lParam != 0 ? (INT)((LPMSG)lParam)->wParam : 0);
switch (virtKey)
{
Modified: trunk/reactos/dll/cpl/timedate/ntpclient.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/ntpclient.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/ntpclient.c (original)
+++ trunk/reactos/dll/cpl/timedate/ntpclient.c Wed Jun 21 23:57:58 2006
@@ -3,7 +3,7 @@
SOCKET Sock;
SOCKADDR_IN myAddr, ntpAddr;
-BOOL InitialiseConnection()
+BOOL InitialiseConnection(CHAR *szIpAddr)
{
WSADATA wsaData;
INT Ret;
@@ -12,7 +12,6 @@
&wsaData);
if (Ret != 0)
return FALSE;
-
Sock = WSASocket(AF_INET,
SOCK_DGRAM,
@@ -27,7 +26,7 @@
ZeroMemory(&myAddr, sizeof(myAddr));
myAddr.sin_family = AF_INET;
myAddr.sin_port = htons(IPPORT_TIMESERVER);
- myAddr.sin_addr.s_addr = INADDR_ANY;
+ myAddr.sin_addr.s_addr = inet_addr(szIpAddr);
Ret = bind(Sock,
(SOCKADDR *)&myAddr,
@@ -69,19 +68,22 @@
}
-BOOL RecieveData(CHAR *Buf)
+ULONG RecieveData(ULONG ulTime)
{
INT Ret;
INT Size = sizeof(SOCKADDR_IN);
Ret = recvfrom(Sock,
- Buf,
- BUFSIZE,
+ (char *)&ulTime,
+ 4,
0,
(SOCKADDR *)&ntpAddr,
&Size);
- if (Ret == SOCKET_ERROR)
- return FALSE;
+ if (Ret != SOCKET_ERROR)
+ ulTime = ntohl(ulTime);
+ else
+ ulTime = 0;
- return TRUE;
+
+ return ulTime;
}
Modified: trunk/reactos/dll/cpl/timedate/resource.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/resource.h…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/resource.h (original)
+++ trunk/reactos/dll/cpl/timedate/resource.h Wed Jun 21 23:57:58 2006
@@ -8,6 +8,7 @@
#define IDC_MONTHCB 101
#define IDC_YEAREDIT 102
#define IDC_MONTHCALENDAR 103
+#define IDC_CLOCKWND 104
#define IDC_TIMEZONE 106
#define IDC_TIMEPICKER 107
#define IDC_YEAR 108
Modified: trunk/reactos/dll/cpl/timedate/timedate.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.c…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.c (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.c Wed Jun 21 23:57:58 2006
@@ -59,6 +59,25 @@
{
{IDC_CPLICON, IDS_CPLNAME, IDS_CPLDESCRIPTION, Applet}
};
+
+VOID GetError(VOID)
+{
+ LPVOID lpMsgBuf;
+
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &lpMsgBuf,
+ 0,
+ NULL );
+
+ MessageBox(NULL, lpMsgBuf, _T("Error!"), MB_OK | MB_ICONERROR);
+
+ LocalFree(lpMsgBuf);
+}
static BOOL
SystemSetLocalTime(LPSYSTEMTIME lpSystemTime)
@@ -284,6 +303,8 @@
AutoUpdateMonthCal(HWND hwndDlg,
PNMMCCAUTOUPDATE lpAutoUpdate)
{
+ UNREFERENCED_PARAMETER(lpAutoUpdate);
+
/* update the controls */
FillMonthsComboBox(GetDlgItem(hwndDlg,
IDC_MONTHCB));
@@ -292,9 +313,9 @@
INT_PTR CALLBACK
DTPProc(HWND hwnd,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam)
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
{
switch (uMsg)
{
@@ -302,11 +323,11 @@
/* stop the timer when the user is about to change the time */
if ((wParam != VK_LEFT) & (wParam != VK_RIGHT))
KillTimer(GetParent(hwnd), ID_TIMER);
- return CallWindowProc(pOldWndProc, hwnd, uMsg, wParam, lParam);
- break;
- default:
- return CallWindowProc(pOldWndProc, hwnd, uMsg, wParam, lParam);
+ break;
+
}
+
+ return CallWindowProc(pOldWndProc, hwnd, uMsg, wParam, lParam);
}
/* Property page dialog callback */
@@ -331,23 +352,13 @@
SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETRANGE, 0, MAKELONG ((short)
9999, (short) 1900));
SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETPOS, 0, MAKELONG( (short)
st.wYear, 0));
- InitClockWindowClass();
- CreateWindowExW(0,
- L"ClockWndClass",
- L"Clock",
- WS_CHILD | WS_VISIBLE,
- 208, 14, 150, 150,
- hwndDlg,
- NULL,
- hApplet,
- NULL);
-
pOldWndProc = (WNDPROC) SetWindowLong(GetDlgItem(hwndDlg, IDC_TIMEPICKER), GWL_WNDPROC,
(INT_PTR) DTPProc);
+
break;
case WM_TIMER:
{
- SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPICKER), DTM_SETSYSTEMTIME, GDT_VALID,
(LPARAM) &st);
+ SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPICKER), DTM_SETSYSTEMTIME, GDT_VALID,
(LPARAM) &st);
break;
}
case WM_COMMAND:
@@ -387,7 +398,7 @@
case UDN_DELTAPOS:
{
short wYear;
- LPNMUPDOWN updown = (LPNMUPDOWN) lpnm;
+ LPNMUPDOWN updown = (LPNMUPDOWN) lpnm;
wYear = SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_GETPOS,
0, 0);
/* Enable the 'Apply' button */
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
@@ -461,8 +472,6 @@
return FALSE;
}
-
-
static PTIMEZONE_ENTRY
@@ -841,15 +850,15 @@
hdc = BeginPaint(hwndDlg, &ps);
hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, hBitmap);
- StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left,
lpDrawItem->rcItem.top,
+ StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left,
lpDrawItem->rcItem.top,
lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
- lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
+ lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hwndDlg, &ps);
}
break;
- }
+ }
case WM_COMMAND:
if ((LOWORD(wParam) == IDC_TIMEZONELIST && HIWORD(wParam) == CBN_SELCHANGE)
||
(LOWORD(wParam) == IDC_AUTODAYLIGHT && HIWORD(wParam) == BN_CLICKED))
@@ -960,22 +969,23 @@
}
-
-VOID SetNTPServer(HWND hwnd)
+/* Set the selected server in the registry */
+static VOID
+SetNTPServer(HWND hwnd)
{
HKEY hKey;
HWND hList;
- INT Sel;
+ UINT Sel;
WCHAR szSel[4];
LONG Ret;
-//DebugBreak();
+
hList = GetDlgItem(hwnd,
IDC_SERVERLIST);
- Sel = (INT)SendMessage(hList,
- CB_GETCURSEL,
- 0,
- 0);
+ Sel = (UINT)SendMessage(hList,
+ CB_GETCURSEL,
+ 0,
+ 0);
_itow(Sel, szSel, 10);
@@ -985,7 +995,10 @@
KEY_SET_VALUE,
&hKey);
if (Ret != ERROR_SUCCESS)
+ {
+ GetError();
return;
+ }
Ret = RegSetValueExW(hKey,
L"",
@@ -993,34 +1006,142 @@
REG_SZ,
(LPBYTE)szSel,
sizeof(szSel));
- if (Ret == ERROR_SUCCESS)
- MessageBoxW(NULL, szSel, NULL, 0);
- else
- {
- WCHAR Buff[20];
- _itow(Ret, Buff, 10);
- //MessageBoxW(NULL, Buff, NULL, 0);
- }
+ if (Ret != ERROR_SUCCESS)
+ GetError();
RegCloseKey(hKey);
-
-
-}
-
-
-VOID UpdateSystemTime(HWND hwndDlg)
-{
- //SYSTEMTIME systime;
- CHAR Buf[BUFSIZE];
-
- InitialiseConnection();
- SendData();
- RecieveData(Buf);
+}
+
+
+/* get the dotted decimal address from the registry */
+static BOOL
+GetNTPServerAddress(CHAR *szIpAddr)
+{
+ HKEY hKey;
+ WCHAR szSel[4];
+ WCHAR buf[32];
+ DWORD dwSize;
+ LONG Ret;
+
+ Ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DateTime\\Servers",
+ 0,
+ KEY_QUERY_VALUE,
+ &hKey);
+ if (Ret != ERROR_SUCCESS)
+ {
+ GetError();
+ return FALSE;
+ }
+
+ dwSize = sizeof(szSel);
+ Ret = RegQueryValueExW(hKey,
+ L"",
+ NULL,
+ NULL,
+ (LPBYTE)szSel,
+ &dwSize);
+ if (Ret != ERROR_SUCCESS)
+ {
+ GetError();
+ return FALSE;
+ }
+
+ dwSize = sizeof(szSel);
+ Ret = RegQueryValueExW(hKey,
+ szSel,
+ NULL,
+ NULL,
+ (LPBYTE)buf,
+ &dwSize);
+ if (Ret != ERROR_SUCCESS)
+ {
+ GetError();
+ return FALSE;
+ }
+
+ if (WideCharToMultiByte(CP_ACP,
+ 0,
+ buf,
+ sizeof(buf),
+ szIpAddr,
+ sizeof(szIpAddr),
+ NULL,
+ NULL) == 0)
+ {
+ GetError();
+ return FALSE;
+ }
+
+ /* safety check */
+ if (inet_addr(szIpAddr) == INADDR_NONE)
+ return FALSE;
+
+ return TRUE;
+}
+
+
+/* request the time from the current NTP server */
+static ULONG
+GetTimeFromServer(VOID)
+{
+ CHAR szIpAddr[32];
+ ULONG ulTime = 0;
+
+ if (! GetNTPServerAddress(szIpAddr))
+ return 0;
+
+ if (InitialiseConnection(szIpAddr))
+ {
+ if (SendData())
+ {
+ RecieveData(ulTime);
+ }
+ }
+
DestroyConnection();
- //DateTime_SetSystemtime(hwndDlg, 0, systime);
-}
+ return ulTime;
+}
+
+/*
+ * NTP servers state the number of seconds passed since
+ * 1st Jan, 1900. The time returned from the server
+ * needs adding to that date to get the current Gregorian time
+ */
+static VOID
+UpdateSystemTime(ULONG ulTime)
+{
+ FILETIME ftNew;
+ LARGE_INTEGER li;
+ SYSTEMTIME stNew;
+
+ /* time at 1st Jan 1900 */
+ stNew.wYear = 1900;
+ stNew.wMonth = 1;
+ stNew.wDay = 1;
+ stNew.wHour = 0;
+ stNew.wMinute = 0;
+ stNew.wSecond = 0;
+ stNew.wMilliseconds = 0;
+
+ /* convert to a file time */
+ SystemTimeToFileTime(&stNew, &ftNew);
+
+ /* add on the time passed since 1st Jan 1900 */
+ li = *(LARGE_INTEGER *)&ftNew;
+ li.QuadPart += (LONGLONG)10000000 * ulTime;
+ ftNew = * (FILETIME *)&li;
+
+ /* convert back to a system time */
+ FileTimeToSystemTime(&ftNew, &stNew);
+
+ if (! SetSystemTime(&stNew))
+ GetError();
+
+}
+
/* Property page dialog callback */
INT_PTR CALLBACK
@@ -1040,36 +1161,46 @@
switch(LOWORD(wParam))
{
case IDC_UPDATEBUTTON:
+ {
+ ULONG ulTime;
+
SetNTPServer(hwndDlg);
- //UpdateSystemTime(hwndDlg);
- MessageBox(NULL, L"Not yet implemented", NULL, 0);
+
+ ulTime = GetTimeFromServer();
+ if (ulTime != 0)
+ UpdateSystemTime(ulTime);
+
+ }
break;
case IDC_SERVERLIST:
+ {
if (HIWORD(wParam) == CBN_SELCHANGE)
/* Enable the 'Apply' button */
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ }
break;
case IDC_AUTOSYNC:
+ {
if (HIWORD(wParam) == BN_CLICKED)
{
+ BOOL bChecked;
HWND hCheck = GetDlgItem(hwndDlg, IDC_AUTOSYNC);
- //HWND hSerText = GetDlgItem(hwndDlg, IDC_SERVERTEXT);
- //HWND hSerList = GetDlgItem(hwndDlg, IDC_SERVERLIST);
- //HWND hUpdateBut = GetDlgItem(hwndDlg, IDC_UPDATEBUTTON);
- //HWND hSucSync = GetDlgItem(hwndDlg, IDC_SUCSYNC);
- //HWND hNextSync = GetDlgItem(hwndDlg, IDC_NEXTSYNC);
-
- INT Check = (INT)SendMessageW(hCheck, BM_GETCHECK, 0, 0);
- if (Check)
- ;//show all data
- else
- ;//hide all data
+ UINT Check = (UINT)SendMessageW(hCheck, BM_GETCHECK, 0, 0);
+
+ bChecked = (Check == BST_CHECKED) ? TRUE : FALSE;
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SERVERTEXT), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SERVERLIST), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATEBUTTON), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUCSYNC), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NEXTSYNC), bChecked);
/* Enable the 'Apply' button */
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
}
+ }
break;
}
break;
@@ -1084,7 +1215,7 @@
switch (lpnm->code)
{
case PSN_APPLY:
- //DebugBreak();
+
SetNTPServer(hwndDlg);
return TRUE;
@@ -1120,7 +1251,8 @@
TCHAR Caption[256];
LONG Ret = 0;
- if (RegisterMonthCalControl(hApplet))
+ if (RegisterMonthCalControl(hApplet) &&
+ RegisterClockControl())
{
LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
@@ -1142,6 +1274,7 @@
Ret = (LONG)(PropertySheet(&psh) != -1);
UnregisterMonthCalControl(hApplet);
+ UnregisterClockControl();
}
return Ret;
@@ -1193,16 +1326,16 @@
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
- {
- INITCOMMONCONTROLSEX InitControls;
-
- InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
- InitControls.dwICC = ICC_DATE_CLASSES | ICC_PROGRESS_CLASS | ICC_UPDOWN_CLASS;
- InitCommonControlsEx(&InitControls);
-
- hApplet = hinstDLL;
- }
- break;
+ {
+ INITCOMMONCONTROLSEX InitControls;
+
+ InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ InitControls.dwICC = ICC_DATE_CLASSES | ICC_PROGRESS_CLASS | ICC_UPDOWN_CLASS;
+ InitCommonControlsEx(&InitControls);
+
+ hApplet = hinstDLL;
+ }
+ break;
}
return TRUE;
Modified: trunk/reactos/dll/cpl/timedate/timedate.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.h…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.h (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.h Wed Jun 21 23:57:58 2006
@@ -28,12 +28,18 @@
extern HINSTANCE hApplet;
-BOOL InitClockWindowClass();
+/* timedate.c */
+VOID GetError(VOID);
-BOOL InitialiseConnection(VOID);
+/* clock.c */
+BOOL RegisterClockControl(VOID);
+VOID UnregisterClockControl(VOID);
+
+/* ntpclient.c */
+BOOL InitialiseConnection(CHAR *szIpAddr);
VOID DestroyConnection(VOID);
BOOL SendData(VOID);
-BOOL RecieveData(CHAR *);
+ULONG RecieveData(ULONG ulTime);
/* monthcal.c */
#define MCCM_SETDATE (WM_USER + 1)
Modified: trunk/reactos/dll/cpl/timedate/timedate.rbuild
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.r…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.rbuild (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.rbuild Wed Jun 21 23:57:58 2006
@@ -13,7 +13,6 @@
<library>comctl32</library>
<library>ws2_32</library>
<library>iphlpapi</library>
- <library>ntdll</library>
<file>clock.c</file>
<file>ntpclient.c</file>
<file>monthcal.c</file>