824c097be9ef2d5fd9a33b06760c4fe34858b07d
[reactos.git] / reactos / include / reactos / idl / eventlogrpc.idl
1 /*
2 * Event Log RPC interface definition
3 */
4
5 #include <ms-dtyp.idl>
6
7 cpp_quote("#if !defined(__EVENTLOG_H__) && !defined(__ADVAPI32_H)")
8 typedef long NTSTATUS;
9 cpp_quote("#endif")
10
11 #define MAX_BATCH_BUFF 0x0007FFFF
12
13 typedef [range(0, MAX_BATCH_BUFF)] unsigned long RULONG;
14 typedef struct _RPC_STRING {
15 USHORT Length;
16 USHORT MaximumLength;
17 [size_is(MaximumLength), length_is(Length)] LPSTR Buffer;
18 } RPC_STRING, *PRPC_STRING;
19
20 typedef [context_handle] unsigned long IELF_HANDLE;
21 typedef IELF_HANDLE *PIELF_HANDLE;
22 typedef [handle, unique] LPWSTR EVENTLOG_HANDLE_W;
23 typedef [handle, unique] LPSTR EVENTLOG_HANDLE_A;
24
25 typedef struct _RPC_CLIENT_ID {
26 DWORD UniqueProcess;
27 DWORD UniqueThread;
28 } RPC_CLIENT_ID, *PRPC_CLIENT_ID;
29
30 [
31 uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
32 version(0.0),
33 pointer_default(unique)
34 #ifndef __midl
35 ,explicit_handle
36 #endif
37 ]
38
39 interface eventlog
40 {
41 /* Function 0 */
42 NTSTATUS ElfrClearELFW(
43 #ifndef __midl
44 [in] handle_t BindingHandle,
45 #endif
46 [in] IELF_HANDLE LogHandle,
47 [in, unique] PRPC_UNICODE_STRING BackupFileName);
48
49 /* Function 1 */
50 NTSTATUS ElfrBackupELFW(
51 #ifndef __midl
52 [in] handle_t BindingHandle,
53 #endif
54 [in] IELF_HANDLE LogHandle,
55 [in, unique] PRPC_UNICODE_STRING BackupFileName);
56
57 /* Function 2 */
58 NTSTATUS ElfrCloseEL(
59 #ifndef __midl
60 [in] handle_t BindingHandle,
61 #endif
62 [in, out] IELF_HANDLE *LogHandle);
63
64 /* Function 3 */
65 NTSTATUS ElfrDeregisterEventSource(
66 #ifndef __midl
67 [in] handle_t BindingHandle,
68 #endif
69 [in, out] IELF_HANDLE *LogHandle);
70
71 /* Function 4 */
72 NTSTATUS ElfrNumberOfRecords(
73 #ifndef __midl
74 [in] handle_t BindingHandle,
75 #endif
76 [in] IELF_HANDLE LogHandle,
77 [out] DWORD *NumberOfRecords);
78
79 /* Function 5 */
80 NTSTATUS ElfrOldestRecord(
81 #ifndef __midl
82 handle_t BindingHandle,
83 #endif
84 [in] IELF_HANDLE LogHandle,
85 [out] DWORD *OldestRecordNumber);
86
87 /* Function 6 */
88 NTSTATUS ElfrChangeNotify(
89 #ifndef __midl
90 [in] handle_t BindingHandle,
91 #endif
92 [in] IELF_HANDLE *LogHandle,
93 [in] RPC_CLIENT_ID ClientId,
94 [in] DWORD Event);
95
96 /* Function 7 */
97 NTSTATUS ElfrOpenELW(
98 #ifndef __midl
99 [in] handle_t BindingHandle,
100 #endif
101 [in] EVENTLOG_HANDLE_W UNCServerName,
102 [in] PRPC_UNICODE_STRING ModuleName,
103 [in] PRPC_UNICODE_STRING RegModuleName,
104 [in] DWORD MajorVersion,
105 [in] DWORD MinorVersion,
106 [out] IELF_HANDLE* LogHandle);
107
108 /* Function 8 */
109 NTSTATUS ElfrRegisterEventSourceW(
110 #ifndef __midl
111 [in] handle_t BindingHandle,
112 #endif
113 [in] EVENTLOG_HANDLE_W UNCServerName,
114 [in] PRPC_UNICODE_STRING ModuleName,
115 [in] PRPC_UNICODE_STRING RegModuleName,
116 [in] DWORD MajorVersion,
117 [in] DWORD MinorVersion,
118 [out] IELF_HANDLE* LogHandle);
119
120 /* Function 9 */
121 NTSTATUS ElfrOpenBELW(
122 #ifndef __midl
123 [in] handle_t BindingHandle,
124 #endif
125 [in] EVENTLOG_HANDLE_W UNCServerName,
126 [in] PRPC_UNICODE_STRING BackupFileName,
127 [in] DWORD MajorVersion,
128 [in] DWORD MinorVersion,
129 [out] IELF_HANDLE* LogHandle);
130
131 /* Function 10 */
132 NTSTATUS ElfrReadELW(
133 #ifndef __midl
134 [in] handle_t BindingHandle,
135 #endif
136 [in] IELF_HANDLE LogHandle,
137 [in] DWORD ReadFlags,
138 [in] DWORD RecordOffset,
139 [in] RULONG NumberOfBytesToRead,
140 [out, size_is(NumberOfBytesToRead)] BYTE *Buffer,
141 [out] DWORD *NumberOfBytesRead,
142 [out] DWORD *MinNumberOfBytesNeeded);
143
144 /* Function 11 */
145 NTSTATUS ElfrReportEventW(
146 #ifndef __midl
147 [in] handle_t BindingHandle,
148 #endif
149 [in] IELF_HANDLE LogHandle,
150 [in] DWORD Time,
151 [in] USHORT EventType,
152 [in] USHORT EventCategory,
153 [in] DWORD EventID,
154 [in, range(0, 256)] USHORT NumStrings,
155 [in, range(0, 61440)] DWORD DataSize,
156 [in] PRPC_UNICODE_STRING ComputerName,
157 [in, unique] PRPC_SID UserSID,
158 [in, size_is(NumStrings), unique] PRPC_UNICODE_STRING Strings[*],
159 [in, size_is(DataSize), unique] BYTE *Data,
160 [in] USHORT Flags,
161 [in, out, unique] DWORD *RecordNumber,
162 [in, out, unique] DWORD *TimeWritten);
163
164 /* Function 12 */
165 NTSTATUS ElfrClearELFA(
166 #ifndef __midl
167 [in] handle_t BindingHandle,
168 #endif
169 [in] IELF_HANDLE LogHandle,
170 [in, unique] PRPC_STRING BackupFileName);
171
172 /* Function 13 */
173 NTSTATUS ElfrBackupELFA(
174 #ifndef __midl
175 [in] handle_t BindingHandle,
176 #endif
177 [in] IELF_HANDLE LogHandle,
178 [in, unique] PRPC_STRING BackupFileName);
179
180 /* Function 14 */
181 NTSTATUS ElfrOpenELA(
182 #ifndef __midl
183 [in] handle_t BindingHandle,
184 #endif
185 [in] EVENTLOG_HANDLE_A UNCServerName,
186 [in] PRPC_STRING ModuleName,
187 [in] PRPC_STRING RegModuleName,
188 [in] DWORD MajorVersion,
189 [in] DWORD MinorVersion,
190 [out] IELF_HANDLE* LogHandle);
191
192 /* Function 15 */
193 NTSTATUS ElfrRegisterEventSourceA(
194 #ifndef __midl
195 [in] handle_t BindingHandle,
196 #endif
197 [in] EVENTLOG_HANDLE_A UNCServerName,
198 [in] PRPC_STRING ModuleName,
199 [in] PRPC_STRING RegModuleName,
200 [in] DWORD MajorVersion,
201 [in] DWORD MinorVersion,
202 [out] IELF_HANDLE* LogHandle);
203
204 /* Function 16 */
205 NTSTATUS ElfrOpenBELA(
206 #ifndef __midl
207 [in] handle_t BindingHandle,
208 #endif
209 [in] EVENTLOG_HANDLE_A UNCServerName,
210 [in] PRPC_STRING BackupFileName,
211 [in] DWORD MajorVersion,
212 [in] DWORD MinorVersion,
213 [out] IELF_HANDLE* LogHandle);
214
215 /* Function 17 */
216 NTSTATUS ElfrReadELA(
217 #ifndef __midl
218 [in] handle_t BindingHandle,
219 #endif
220 [in] IELF_HANDLE LogHandle,
221 [in] DWORD ReadFlags,
222 [in] DWORD RecordOffset,
223 [in] RULONG NumberOfBytesToRead,
224 [out, size_is(NumberOfBytesToRead)] BYTE *Buffer,
225 [out] DWORD *NumberOfBytesRead,
226 [out] DWORD *MinNumberOfBytesNeeded);
227
228 /* Function 18 */
229 NTSTATUS ElfrReportEventA(
230 #ifndef __midl
231 [in] handle_t BindingHandle,
232 #endif
233 [in] IELF_HANDLE LogHandle,
234 [in] DWORD Time,
235 [in] USHORT EventType,
236 [in] USHORT EventCategory,
237 [in] DWORD EventID,
238 [in, range(0, 256)] USHORT NumStrings,
239 [in, range(0, 61440)] DWORD DataSize,
240 [in] PRPC_STRING ComputerName,
241 [in, unique] PRPC_SID UserSID,
242 [in, size_is(NumStrings), unique] PRPC_STRING Strings[*],
243 [in, size_is(DataSize), unique] BYTE *Data,
244 [in] USHORT Flags,
245 [in, out, unique] DWORD *RecordNumber,
246 [in, out, unique] DWORD *TimeWritten);
247
248 /* Function 19 */
249 NTSTATUS ElfrRegisterClusterSvc(
250 #ifndef __midl
251 [in] handle_t BindingHandle
252 #endif
253 ); /* FIXME */
254
255 /* Function 20 */
256 NTSTATUS ElfrDeregisterClusterSvc(
257 #ifndef __midl
258 [in] handle_t BindingHandle
259 #endif
260 ); /* FIXME */
261
262 /* Function 21 */
263 NTSTATUS ElfrWriteClusterEvents(
264 #ifndef __midl
265 [in] handle_t BindingHandle
266 #endif
267 ); /* FIXME */
268
269 /* Function 22 */
270 NTSTATUS ElfrGetLogInformation(
271 #ifndef __midl
272 [in] handle_t BindingHandle,
273 #endif
274 [in] IELF_HANDLE LogHandle,
275 [in] DWORD InfoLevel,
276 [out, size_is(cbBufSize)] BYTE *Buffer,
277 [in, range(0, 1024)] DWORD cbBufSize,
278 [out] DWORD *pcbBytesNeeded);
279
280 /* Function 23 */
281 NTSTATUS ElfrFlushEL(
282 #ifndef __midl
283 [in] handle_t BindingHandle,
284 #endif
285 [in] IELF_HANDLE LogHandle);
286
287 /* Function 24 */
288 NTSTATUS ElfrReportEventAndSourceW(
289 #ifndef __midl
290 [in] handle_t BindingHandle,
291 #endif
292 [in] IELF_HANDLE LogHandle,
293 [in] DWORD Time,
294 [in] USHORT EventType,
295 [in] USHORT EventCategory,
296 [in] ULONG EventID,
297 [in] PRPC_UNICODE_STRING SourceName,
298 [in, range(0, 256)] USHORT NumStrings,
299 [in, range(0, 61440)] DWORD DataSize,
300 [in] PRPC_UNICODE_STRING ComputerName,
301 [in, unique] PRPC_SID UserSID,
302 [in, size_is(NumStrings), unique] PRPC_UNICODE_STRING Strings[*],
303 [in, size_is(DataSize), unique] BYTE *Data,
304 [in] USHORT Flags,
305 [in, out, unique] DWORD *RecordNumber,
306 [in, out, unique] DWORD *TimeWritten);
307 }