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
)
219 LPWSTR lpUNCServerNameW
= HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName
);
220 LPWSTR lpSourceNameW
= HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName
);
221 HANDLE ret
= RegisterEventSourceW(lpUNCServerNameW
,lpSourceNameW
);
222 HeapFree(GetProcessHeap(),0,lpSourceNameW
);
223 HeapFree(GetProcessHeap(),0,lpUNCServerNameW
);
227 /******************************************************************************
228 * RegisterEventSourceW [ADVAPI32.@]
229 * Returns a registered handle to an event log
232 * lpUNCServerName [I] Server name for source
233 * lpSourceName [I] Source name for registered handle
240 RegisterEventSourceW( LPCWSTR lpUNCServerName
, LPCWSTR lpSourceName
)
242 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName
),
243 debugstr_w(lpSourceName
));
247 /******************************************************************************
248 * ReportEventA [ADVAPI32.@]
250 BOOL WINAPI
ReportEventA ( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
251 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCSTR
*lpStrings
, LPVOID lpRawData
)
257 /******************************************************************************
258 * ReportEventW [ADVAPI32.@]
272 ReportEventW( HANDLE hEventLog
, WORD wType
, WORD wCategory
,
273 DWORD dwEventID
, PSID lpUserSid
, WORD wNumStrings
,
274 DWORD dwDataSize
, LPCWSTR
*lpStrings
, LPVOID lpRawData
)