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
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(advapi
);
30 /******************************************************************************
31 * BackupEventLogA [ADVAPI32.@]
33 BOOL WINAPI
BackupEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
39 /******************************************************************************
40 * BackupEventLogW [ADVAPI32.@]
47 BackupEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
53 /******************************************************************************
54 * ClearEventLogA [ADVAPI32.@]
56 BOOL WINAPI
ClearEventLogA ( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
62 /******************************************************************************
63 * ClearEventLogW [ADVAPI32.@]
65 BOOL WINAPI
ClearEventLogW ( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
71 /******************************************************************************
72 * CloseEventLog [ADVAPI32.@]
74 BOOL WINAPI
CloseEventLog ( HANDLE hEventLog
)
80 /******************************************************************************
81 * DeregisterEventSource [ADVAPI32.@]
82 * Closes a handle to the specified event log
85 * hEventLog [I] Handle to event log
89 BOOL WINAPI
DeregisterEventSource( HANDLE hEventLog
)
91 FIXME("(%p): stub\n",hEventLog
);
95 /******************************************************************************
96 * GetNumberOfEventLogRecords [ADVAPI32.@]
103 GetNumberOfEventLogRecords( HANDLE hEventLog
, PDWORD NumberOfRecords
)
109 /******************************************************************************
110 * GetOldestEventLogRecord [ADVAPI32.@]
117 GetOldestEventLogRecord( HANDLE hEventLog
, PDWORD OldestRecord
)
123 /******************************************************************************
124 * NotifyChangeEventLog [ADVAPI32.@]
130 BOOL WINAPI
NotifyChangeEventLog( HANDLE hEventLog
, HANDLE hEvent
)
136 /******************************************************************************
137 * OpenBackupEventLogA [ADVAPI32.@]
140 OpenBackupEventLogA( LPCSTR lpUNCServerName
, LPCSTR lpFileName
)
146 /******************************************************************************
147 * OpenBackupEventLogW [ADVAPI32.@]
154 OpenBackupEventLogW( LPCWSTR lpUNCServerName
, LPCWSTR lpFileName
)
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.@]
177 OpenEventLogW( LPCWSTR uncname
, LPCWSTR source
)
183 /******************************************************************************
184 * ReadEventLogA [ADVAPI32.@]
186 BOOL WINAPI
ReadEventLogA( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
187 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
193 /******************************************************************************
194 * ReadEventLogW [ADVAPI32.@]
201 * nNumberOfBytesToRead []
203 * pnMinNumberOfBytesNeeded []
206 ReadEventLogW( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
207 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
,
208 DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
214 /******************************************************************************
215 * RegisterEventSourceA [ADVAPI32.@]
217 HANDLE WINAPI
RegisterEventSourceA( LPCSTR lpUNCServerName
, LPCSTR lpSourceName
)
220 UNICODE_STRING lpUNCServerNameW
;
221 UNICODE_STRING lpSourceNameW
;
223 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW
, lpUNCServerName
);
224 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW
, lpSourceName
);
225 ret
= RegisterEventSourceW(lpUNCServerNameW
.Buffer
,lpSourceNameW
.Buffer
);
226 RtlFreeUnicodeString (&lpUNCServerNameW
);
227 RtlFreeUnicodeString (&lpSourceNameW
);
231 /******************************************************************************
232 * RegisterEventSourceW [ADVAPI32.@]
233 * Returns a registered handle to an event log
236 * lpUNCServerName [I] Server name for source
237 * lpSourceName [I] Source name for registered handle
244 RegisterEventSourceW( LPCWSTR lpUNCServerName
, LPCWSTR lpSourceName
)
246 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName
),
247 debugstr_w(lpSourceName
));
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
)
261 /******************************************************************************
262 * ReportEventW [ADVAPI32.@]
276 ReportEventW( HANDLE hEventLog
, WORD wType
, WORD wCategory
,
277 DWORD dwEventID
, PSID lpUserSid
, WORD wNumStrings
,
278 DWORD dwDataSize
, LPCWSTR
*lpStrings
, LPVOID lpRawData
)