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
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
33 /******************************************************************************
34 * BackupEventLogA [ADVAPI32.@]
36 BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
42 /******************************************************************************
43 * BackupEventLogW [ADVAPI32.@]
50 BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
56 /******************************************************************************
57 * ClearEventLogA [ADVAPI32.@]
59 BOOL WINAPI ClearEventLogA ( HANDLE hEventLog, LPCSTR lpBackupFileName )
65 /******************************************************************************
66 * ClearEventLogW [ADVAPI32.@]
68 BOOL WINAPI ClearEventLogW ( HANDLE hEventLog, LPCWSTR lpBackupFileName )
74 /******************************************************************************
75 * CloseEventLog [ADVAPI32.@]
77 BOOL WINAPI CloseEventLog ( HANDLE hEventLog )
83 /******************************************************************************
84 * DeregisterEventSource [ADVAPI32.@]
85 * Closes a handle to the specified event log
88 * hEventLog [I] Handle to event log
92 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
94 FIXME("(%p): stub\n",hEventLog);
98 /******************************************************************************
99 * GetNumberOfEventLogRecords [ADVAPI32.@]
106 GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
112 /******************************************************************************
113 * GetOldestEventLogRecord [ADVAPI32.@]
120 GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
126 /******************************************************************************
127 * NotifyChangeEventLog [ADVAPI32.@]
133 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
139 /******************************************************************************
140 * OpenBackupEventLogA [ADVAPI32.@]
143 OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
149 /******************************************************************************
150 * OpenBackupEventLogW [ADVAPI32.@]
157 OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
163 /******************************************************************************
164 * OpenEventLogA [ADVAPI32.@]
166 HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
168 FIXME("(%s,%s),stub!\n",uncname,source);
169 return (HANDLE)0xcafe4242;
172 /******************************************************************************
173 * OpenEventLogW [ADVAPI32.@]
180 OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
186 /******************************************************************************
187 * ReadEventLogA [ADVAPI32.@]
189 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
190 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
196 /******************************************************************************
197 * ReadEventLogW [ADVAPI32.@]
204 * nNumberOfBytesToRead []
206 * pnMinNumberOfBytesNeeded []
209 ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
210 LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
211 DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
217 /******************************************************************************
218 * RegisterEventSourceA [ADVAPI32.@]
220 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
223 UNICODE_STRING lpUNCServerNameW;
224 UNICODE_STRING lpSourceNameW;
226 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
227 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
228 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
229 RtlFreeUnicodeString (&lpUNCServerNameW);
230 RtlFreeUnicodeString (&lpSourceNameW);
234 /******************************************************************************
235 * RegisterEventSourceW [ADVAPI32.@]
236 * Returns a registered handle to an event log
239 * lpUNCServerName [I] Server name for source
240 * lpSourceName [I] Source name for registered handle
247 RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
249 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName),
250 debugstr_w(lpSourceName));
254 /******************************************************************************
255 * ReportEventA [ADVAPI32.@]
257 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
258 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
264 /******************************************************************************
265 * ReportEventW [ADVAPI32.@]
279 ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
280 DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
281 DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )