Release 20030408.
[wine/gsoc-2012-control.git] / dlls / advapi32 / eventlog.c
blob991e0092f9b3e32b6bb85d3ba0a9569c469e22d3
1 /*
2 * Win32 advapi functions
4 * Copyright 1995 Sven Verdoolaege, 1998 Juergen Schmied
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "winbase.h"
22 #include "windef.h"
23 #include "winerror.h"
24 #include "winternl.h"
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
30 /******************************************************************************
31 * BackupEventLogA [ADVAPI32.@]
33 BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
35 FIXME("stub\n");
36 return TRUE;
39 /******************************************************************************
40 * BackupEventLogW [ADVAPI32.@]
42 * PARAMS
43 * hEventLog []
44 * lpBackupFileName []
46 BOOL WINAPI
47 BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
49 FIXME("stub\n");
50 return TRUE;
53 /******************************************************************************
54 * ClearEventLogA [ADVAPI32.@]
56 BOOL WINAPI ClearEventLogA ( HANDLE hEventLog, LPCSTR lpBackupFileName )
58 FIXME("stub\n");
59 return TRUE;
62 /******************************************************************************
63 * ClearEventLogW [ADVAPI32.@]
65 BOOL WINAPI ClearEventLogW ( HANDLE hEventLog, LPCWSTR lpBackupFileName )
67 FIXME("stub\n");
68 return TRUE;
71 /******************************************************************************
72 * CloseEventLog [ADVAPI32.@]
74 BOOL WINAPI CloseEventLog ( HANDLE hEventLog )
76 FIXME("stub\n");
77 return TRUE;
80 /******************************************************************************
81 * DeregisterEventSource [ADVAPI32.@]
82 * Closes a handle to the specified event log
84 * PARAMS
85 * hEventLog [I] Handle to event log
87 * RETURNS STD
89 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
91 FIXME("(%p): stub\n",hEventLog);
92 return TRUE;
95 /******************************************************************************
96 * GetNumberOfEventLogRecords [ADVAPI32.@]
98 * PARAMS
99 * hEventLog []
100 * NumberOfRecords []
102 BOOL WINAPI
103 GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
105 FIXME("stub\n");
106 return TRUE;
109 /******************************************************************************
110 * GetOldestEventLogRecord [ADVAPI32.@]
112 * PARAMS
113 * hEventLog []
114 * OldestRecord []
116 BOOL WINAPI
117 GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
119 FIXME(":stub\n");
120 return TRUE;
123 /******************************************************************************
124 * NotifyChangeEventLog [ADVAPI32.@]
126 * PARAMS
127 * hEventLog []
128 * hEvent []
130 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
132 FIXME("stub\n");
133 return TRUE;
136 /******************************************************************************
137 * OpenBackupEventLogA [ADVAPI32.@]
139 HANDLE WINAPI
140 OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
142 FIXME("stub\n");
143 return (HANDLE)1;
146 /******************************************************************************
147 * OpenBackupEventLogW [ADVAPI32.@]
149 * PARAMS
150 * lpUNCServerName []
151 * lpFileName []
153 HANDLE WINAPI
154 OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
156 FIXME("stub\n");
157 return (HANDLE)1;
160 /******************************************************************************
161 * OpenEventLogA [ADVAPI32.@]
163 HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
165 FIXME("(%s,%s),stub!\n",uncname,source);
166 return (HANDLE)0xcafe4242;
169 /******************************************************************************
170 * OpenEventLogW [ADVAPI32.@]
172 * PARAMS
173 * uncname []
174 * source []
176 HANDLE WINAPI
177 OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
179 FIXME("stub\n");
180 return (HANDLE)1;
183 /******************************************************************************
184 * ReadEventLogA [ADVAPI32.@]
186 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
187 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
189 FIXME("stub\n");
190 return TRUE;
193 /******************************************************************************
194 * ReadEventLogW [ADVAPI32.@]
196 * PARAMS
197 * hEventLog []
198 * dwReadFlags []
199 * dwRecordOffset []
200 * lpBuffer []
201 * nNumberOfBytesToRead []
202 * pnBytesRead []
203 * pnMinNumberOfBytesNeeded []
205 BOOL WINAPI
206 ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
207 LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
208 DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
210 FIXME("stub\n");
211 return TRUE;
214 /******************************************************************************
215 * RegisterEventSourceA [ADVAPI32.@]
217 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
220 UNICODE_STRING lpUNCServerNameW;
221 UNICODE_STRING lpSourceNameW;
222 HANDLE ret;
223 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
224 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
225 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
226 RtlFreeUnicodeString (&lpUNCServerNameW);
227 RtlFreeUnicodeString (&lpSourceNameW);
228 return ret;
231 /******************************************************************************
232 * RegisterEventSourceW [ADVAPI32.@]
233 * Returns a registered handle to an event log
235 * PARAMS
236 * lpUNCServerName [I] Server name for source
237 * lpSourceName [I] Source name for registered handle
239 * RETURNS
240 * Success: Handle
241 * Failure: NULL
243 HANDLE WINAPI
244 RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
246 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName),
247 debugstr_w(lpSourceName));
248 return (HANDLE)1;
251 /******************************************************************************
252 * ReportEventA [ADVAPI32.@]
254 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
255 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
257 FIXME("stub\n");
258 return TRUE;
261 /******************************************************************************
262 * ReportEventW [ADVAPI32.@]
264 * PARAMS
265 * hEventLog []
266 * wType []
267 * wCategory []
268 * dwEventID []
269 * lpUserSid []
270 * wNumStrings []
271 * dwDataSize []
272 * lpStrings []
273 * lpRawData []
275 BOOL WINAPI
276 ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
277 DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
278 DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
280 FIXME("stub\n");
281 return TRUE;