source: trunk/src/kernel32/time.cpp@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 9.0 KB
Line 
1/*
2 *
3 * Project Odin Software License can be found in LICENSE.TXT
4 *
5 */
6/*
7 * Win32 timer API functions
8 *
9 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
10 *
11 */
12#include <os2win.h>
13#include <winnls.h>
14
15//******************************************************************************
16//******************************************************************************
17VOID WIN32API GetLocalTime( LPSYSTEMTIME arg1)
18{
19/// dprintf(("KERNEL32: GetLocalTime\n"));
20 O32_GetLocalTime(arg1);
21}
22//******************************************************************************
23//******************************************************************************
24BOOL WIN32API SetLocalTime( const SYSTEMTIME * arg1)
25{
26 dprintf(("KERNEL32: SetLocalTime\n"));
27 return O32_SetLocalTime(arg1);
28}
29//******************************************************************************
30//******************************************************************************
31BOOL WIN32API FileTimeToDosDateTime(const FILETIME * arg1, LPWORD arg2, LPWORD arg3)
32{
33 dprintf(("KERNEL32: FileTimeToDosDateTime\n"));
34 return O32_FileTimeToDosDateTime(arg1, arg2, arg3);
35}
36//******************************************************************************
37//******************************************************************************
38BOOL WIN32API FileTimeToLocalFileTime(const FILETIME * arg1, LPFILETIME arg2)
39{
40 dprintf(("KERNEL32: FileTimeToLocalFileTime\n"));
41 return O32_FileTimeToLocalFileTime(arg1, arg2);
42}
43//******************************************************************************
44//******************************************************************************
45BOOL WIN32API LocalFileTimeToFileTime(const FILETIME * arg1, LPFILETIME arg2)
46{
47 dprintf(("KERNEL32: LocalFileTimeToFileTime\n"));
48 return O32_LocalFileTimeToFileTime(arg1, arg2);
49}
50//******************************************************************************
51//******************************************************************************
52BOOL WIN32API FileTimeToSystemTime(const FILETIME * arg1, LPSYSTEMTIME arg2)
53{
54 dprintf(("KERNEL32: FileTimeToSystemTime"));
55 return O32_FileTimeToSystemTime(arg1, arg2);
56}
57//******************************************************************************
58//******************************************************************************
59BOOL WIN32API DosDateTimeToFileTime( WORD arg1, WORD arg2, LPFILETIME arg3)
60{
61 dprintf(("KERNEL32: DosDateTimeToFileTime\n"));
62 return O32_DosDateTimeToFileTime(arg1, arg2, arg3);
63}
64//******************************************************************************
65//******************************************************************************
66BOOL WIN32API GetFileTime( HANDLE arg1, LPFILETIME arg2, LPFILETIME arg3, LPFILETIME arg4)
67{
68 dprintf(("KERNEL32: GetFileTime\n"));
69 return O32_GetFileTime(arg1, arg2, arg3, arg4);
70}
71//******************************************************************************
72//******************************************************************************
73DWORD WIN32API GetTimeZoneInformation( LPTIME_ZONE_INFORMATION arg1)
74{
75 dprintf(("KERNEL32: GetTimeZoneInformation\n"));
76 return O32_GetTimeZoneInformation(arg1);
77}
78//******************************************************************************
79//******************************************************************************
80DWORD WIN32API GetTickCount(void)
81{
82//// dprintf(("KERNEL32: GetTickCount\n"));
83 return O32_GetTickCount();
84}
85//******************************************************************************
86//******************************************************************************
87VOID WIN32API GetSystemTime( LPSYSTEMTIME arg1)
88{
89 dprintf(("KERNEL32: OS2GetSystemTime\n"));
90 O32_GetSystemTime(arg1);
91}
92//******************************************************************************
93//******************************************************************************
94BOOL WIN32API SystemTimeToFileTime( const SYSTEMTIME * arg1, LPFILETIME arg2)
95{
96 dprintf(("KERNEL32: OS2SystemTimeToFileTime\n"));
97 return O32_SystemTimeToFileTime(arg1, arg2);
98}
99//******************************************************************************
100//******************************************************************************
101BOOL WIN32API SystemTimeToTzSpecificLocalTime( LPTIME_ZONE_INFORMATION arg1, LPSYSTEMTIME arg2, LPSYSTEMTIME arg3)
102{
103 dprintf(("KERNEL32: OS2SystemTimeToTzSpecificLocalTime\n"));
104 return O32_SystemTimeToTzSpecificLocalTime(arg1, arg2, arg3);
105}
106//******************************************************************************
107//******************************************************************************
108BOOL WIN32API SetTimeZoneInformation( const LPTIME_ZONE_INFORMATION arg1)
109{
110 dprintf(("KERNEL32: OS2SetTimeZoneInformation\n"));
111 return O32_SetTimeZoneInformation(arg1);
112}
113//******************************************************************************
114//******************************************************************************
115BOOL WIN32API SetSystemTime(const SYSTEMTIME * arg1)
116{
117 dprintf(("KERNEL32: OS2SetSystemTime\n"));
118 return O32_SetSystemTime(arg1);
119}
120//******************************************************************************
121//******************************************************************************
122INT WIN32API GetTimeFormatA(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
123 LPCSTR lpFormat, LPSTR lpTimeStr, INT cchTime)
124{
125 dprintf(("KERNEL32: OS2GetTimeFormatA not implemented!!\n"));
126 return(0);
127}
128//******************************************************************************
129//******************************************************************************
130INT WIN32API GetTimeFormatW(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
131 LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchTime)
132{
133 dprintf(("KERNEL32: OS2GetTimeFormatW not implemented!!\n"));
134 return(0);
135}
136//******************************************************************************
137//******************************************************************************
138int WIN32API GetDateFormatA(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
139 LPCSTR lpFormat, LPSTR lpDateStr, int cchDate)
140{
141 dprintf(("KERNEL32: OS2GetDateFormatA not implemented!!\n"));
142 return(0);
143}
144//******************************************************************************
145//******************************************************************************
146int WIN32API GetDateFormatW(LCID Locale, DWORD dwFlags, LPSYSTEMTIME lpTime,
147 LPCWSTR lpFormat, LPWSTR lpDateStr, int cchDate)
148{
149 dprintf(("KERNEL32: OS2GetDateFormatW not implemented!!\n"));
150 return(0);
151}
152//******************************************************************************
153//******************************************************************************
154BOOL WIN32API EnumTimeFormatsA(TIMEFMT_ENUMPROCA lpDataFmtEnumProc,
155 LCID Locale, DWORD dwFlags)
156{
157 dprintf(("KERNEL32: OS2EnumTimeFormatsA, not implemented\n"));
158 return(FALSE);
159}
160//******************************************************************************
161//******************************************************************************
162BOOL WIN32API EnumTimeFormatsW(TIMEFMT_ENUMPROCW lpDataFmtEnumProc,
163 LCID Locale, DWORD dwFlags)
164{
165 dprintf(("KERNEL32: OS2EnumTimeFormatsW, not implemented\n"));
166 return(FALSE);
167}
168/*****************************************************************************
169 * Name : DWORD GetSystemTimeAsFileTime
170 * Purpose : The GetSystemTimeAsFileTime function obtains the current system
171 * date and time. The information is in Coordinated Universal Time (UTC) format.
172 * Parameters: LLPFILETIME lLPSYSTEMTIMEAsFileTime
173 * Variables :
174 * Result :
175 * Remark :
176 * Status : UNTESTED
177 *
178 * Author : Patrick Haller [Mon, 1998/06/15 08:00]
179 *****************************************************************************/
180
181VOID WIN32API GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)
182{
183 FILETIME ft; /* code sequence from WIN32.HLP */
184 SYSTEMTIME st;
185
186 dprintf(("KERNEL32: GetSystemTimeAsFileTime(%08xh)\n", lpSystemTimeAsFileTime));
187
188 GetSystemTime(&st);
189 SystemTimeToFileTime(&st, &ft);
190}
191//******************************************************************************
192//******************************************************************************
193BOOL WIN32API EnumDateFormatsA(DATEFMT_ENUMPROCA lpDataFmtEnumProc,
194 LCID Locale, DWORD dwFlags)
195{
196 dprintf(("KERNEL32: OS2EnumDateFormatsA, not implemented\n"));
197 return(FALSE);
198}
199//******************************************************************************
200//******************************************************************************
201BOOL WIN32API EnumDateFormatsW(DATEFMT_ENUMPROCW lpDataFmtEnumProc,
202 LCID Locale, DWORD dwFlags)
203{
204 dprintf(("KERNEL32: OS2EnumDateFormatsW, not implemented\n"));
205 return(FALSE);
206}
Note: See TracBrowser for help on using the repository browser.