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
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
31 /******************************************************************************
32 * BackupEventLogA [ADVAPI32.@]
34 BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
40 /******************************************************************************
41 * BackupEventLogW [ADVAPI32.@]
48 BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
54 /******************************************************************************
55 * ClearEventLogA [ADVAPI32.@]
57 BOOL WINAPI ClearEventLogA ( HANDLE hEventLog, LPCSTR lpBackupFileName )
63 /******************************************************************************
64 * ClearEventLogW [ADVAPI32.@]
66 BOOL WINAPI ClearEventLogW ( HANDLE hEventLog, LPCWSTR lpBackupFileName )
72 /******************************************************************************
73 * CloseEventLog [ADVAPI32.@]
75 BOOL WINAPI CloseEventLog ( HANDLE hEventLog )
81 /******************************************************************************
82 * DeregisterEventSource [ADVAPI32.@]
83 * Closes a handle to the specified event log
86 * hEventLog [I] Handle to event log
90 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
92 FIXME("(%p): stub\n",hEventLog);
96 /******************************************************************************
97 * GetNumberOfEventLogRecords [ADVAPI32.@]
104 GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
110 /******************************************************************************
111 * GetOldestEventLogRecord [ADVAPI32.@]
118 GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
124 /******************************************************************************
125 * NotifyChangeEventLog [ADVAPI32.@]
131 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
137 /******************************************************************************
138 * OpenBackupEventLogA [ADVAPI32.@]
141 OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
147 /******************************************************************************
148 * OpenBackupEventLogW [ADVAPI32.@]
155 OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
161 /******************************************************************************
162 * OpenEventLogA [ADVAPI32.@]
164 HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
166 FIXME("(%s,%s),stub!\n",uncname,source);
167 return (HANDLE)0xcafe4242;
170 /******************************************************************************
171 * OpenEventLogW [ADVAPI32.@]
178 OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
184 /******************************************************************************
185 * ReadEventLogA [ADVAPI32.@]
187 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
188 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
194 /******************************************************************************
195 * ReadEventLogW [ADVAPI32.@]
202 * nNumberOfBytesToRead []
204 * pnMinNumberOfBytesNeeded []
207 ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
208 LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
209 DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
215 /******************************************************************************
216 * RegisterEventSourceA [ADVAPI32.@]
218 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
221 UNICODE_STRING lpUNCServerNameW;
222 UNICODE_STRING lpSourceNameW;
224 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
225 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
226 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
227 RtlFreeUnicodeString (&lpUNCServerNameW);
228 RtlFreeUnicodeString (&lpSourceNameW);
232 /******************************************************************************
233 * RegisterEventSourceW [ADVAPI32.@]
234 * Returns a registered handle to an event log
237 * lpUNCServerName [I] Server name for source
238 * lpSourceName [I] Source name for registered handle
245 RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
247 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName),
248 debugstr_w(lpSourceName));
252 /******************************************************************************
253 * ReportEventA [ADVAPI32.@]
255 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
256 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
262 /******************************************************************************
263 * ReportEventW [ADVAPI32.@]
277 ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
278 DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
279 DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )