2 * Win32 advapi functions
4 * Copyright 1995 Sven Verdoolaege, 1998 Juergen Schmied
12 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(advapi
)
16 /******************************************************************************
17 * BackupEventLogA [ADVAPI32.15]
19 BOOL WINAPI
BackupEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
25 /******************************************************************************
26 * BackupEventLogW [ADVAPI32.16]
33 BackupEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
39 /******************************************************************************
40 * ClearEventLogA [ADVAPI32.19]
42 BOOL WINAPI
ClearEventLogA ( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
48 /******************************************************************************
49 * ClearEventLogW [ADVAPI32.20]
51 BOOL WINAPI
ClearEventLogW ( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
57 /******************************************************************************
58 * CloseEventLog [ADVAPI32.21]
60 BOOL WINAPI
CloseEventLog ( HANDLE hEventLog
)
66 /******************************************************************************
67 * DeregisterEventSource [ADVAPI32.32]
68 * Closes a handle to the specified event log
71 * hEventLog [I] Handle to event log
75 BOOL WINAPI
DeregisterEventSource( HANDLE hEventLog
)
77 FIXME("(%d): stub\n",hEventLog
);
81 /******************************************************************************
82 * GetNumberOfEventLogRecords [ADVAPI32.49]
89 GetNumberOfEventLogRecords( HANDLE hEventLog
, PDWORD NumberOfRecords
)
95 /******************************************************************************
96 * GetOldestEventLogRecord [ADVAPI32.50]
103 GetOldestEventLogRecord( HANDLE hEventLog
, PDWORD OldestRecord
)
109 /******************************************************************************
110 * NotifyChangeEventLog [ADVAPI32.98]
116 BOOL WINAPI
NotifyChangeEventLog( HANDLE hEventLog
, HANDLE hEvent
)
122 /******************************************************************************
123 * OpenBackupEventLogA [ADVAPI32.105]
126 OpenBackupEventLogA( LPCSTR lpUNCServerName
, LPCSTR lpFileName
)
132 /******************************************************************************
133 * OpenBackupEventLogW [ADVAPI32.106]
140 OpenBackupEventLogW( LPCWSTR lpUNCServerName
, LPCWSTR lpFileName
)
146 /******************************************************************************
147 * OpenEventLogA [ADVAPI32.107]
149 HANDLE WINAPI
OpenEventLogA(LPCSTR uncname
,LPCSTR source
)
151 FIXME("(%s,%s),stub!\n",uncname
,source
);
155 /******************************************************************************
156 * OpenEventLogW [ADVAPI32.108]
163 OpenEventLogW( LPCWSTR uncname
, LPCWSTR source
)
169 /******************************************************************************
170 * ReadEventLogA [ADVAPI32.124]
172 BOOL WINAPI
ReadEventLogA( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
173 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
179 /******************************************************************************
180 * ReadEventLogW [ADVAPI32.125]
187 * nNumberOfBytesToRead []
189 * pnMinNumberOfBytesNeeded []
192 ReadEventLogW( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
193 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
,
194 DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
200 /******************************************************************************
201 * RegisterEventSourceA [ADVAPI32.174]
203 HANDLE WINAPI
RegisterEventSourceA( LPCSTR lpUNCServerName
, LPCSTR lpSourceName
)
205 LPWSTR lpUNCServerNameW
= HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName
);
206 LPWSTR lpSourceNameW
= HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName
);
207 HANDLE ret
= RegisterEventSourceW(lpUNCServerNameW
,lpSourceNameW
);
208 HeapFree(GetProcessHeap(),0,lpSourceNameW
);
209 HeapFree(GetProcessHeap(),0,lpUNCServerNameW
);
213 /******************************************************************************
214 * RegisterEventSourceW [ADVAPI32.175]
215 * Returns a registered handle to an event log
218 * lpUNCServerName [I] Server name for source
219 * lpSourceName [I] Source name for registered handle
226 RegisterEventSourceW( LPCWSTR lpUNCServerName
, LPCWSTR lpSourceName
)
228 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName
),
229 debugstr_w(lpSourceName
));
233 /******************************************************************************
234 * ReportEventA [ADVAPI32.178]
236 BOOL WINAPI
ReportEventA ( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
237 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCSTR
*lpStrings
, LPVOID lpRawData
)
243 /******************************************************************************
244 * ReportEventW [ADVAPI32.179]
258 ReportEventW( HANDLE hEventLog
, WORD wType
, WORD wCategory
,
259 DWORD dwEventID
, PSID lpUserSid
, WORD wNumStrings
,
260 DWORD dwDataSize
, LPCWSTR
*lpStrings
, LPVOID lpRawData
)