1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | #ifndef _INC_CLFSW32
|
---|
7 | #define _INC_CLFSW32
|
---|
8 | #include <clfs.h>
|
---|
9 | #include <clfsmgmt.h>
|
---|
10 |
|
---|
11 | #if (_WIN32_WINNT >= 0x0600)
|
---|
12 | #ifdef __cplusplus
|
---|
13 | extern "C" {
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | typedef PVOID (* CLFS_BLOCK_ALLOCATION) (ULONG cbBufferSize, PVOID pvUserContext);
|
---|
17 | typedef void (* CLFS_BLOCK_DEALLOCATION) (PVOID pvBuffer, PVOID pvUserContext);
|
---|
18 | typedef FILE *PFILE;
|
---|
19 | typedef ULONG (__stdcall * CLFS_PRINT_RECORD_ROUTINE) (PFILE, CLFS_RECORD_TYPE, PVOID, ULONG);
|
---|
20 |
|
---|
21 | WINBOOL WINAPI AdvanceLogBase(PVOID pvMarshal,PCLFS_LSN plsnBase,ULONG fFlags,LPOVERLAPPED pOverlapped);
|
---|
22 |
|
---|
23 | WINBOOL WINAPI AlignReservedLog(PVOID pvMarshal,ULONG cReservedRecords,LONGLONG rgcbReservation,PLONGLONG pcbAlignReservation);
|
---|
24 | WINBOOL WINAPI AllocReservedLog(PVOID pvMarshal,ULONG cReservedRecords,PLONGLONG pcbAdjustment);
|
---|
25 |
|
---|
26 | WINBOOL WINAPI AddLogContainer(HANDLE hLog,PULONGLONG pcbContainer,LPWSTR pwszContainerPath,LPVOID pReserved);
|
---|
27 | WINBOOL WINAPI AddLogContainerSet(HANDLE hLog,USHORT cContainers,PULONGLONG pcbContainer,LPWSTR *rgwszContainerPath,PVOID Reserved);
|
---|
28 | WINBOOL WINAPI CloseAndResetLogFile(HANDLE hLog);
|
---|
29 |
|
---|
30 | WINBOOL WINAPI CreateLogContainerScanContext(
|
---|
31 | HANDLE hLog,
|
---|
32 | ULONG cFromContainer,
|
---|
33 | ULONG cContainers,
|
---|
34 | CLFS_SCAN_MODE eScanMode,
|
---|
35 | PCLFS_SCAN_CONTEXT pcxScan,
|
---|
36 | LPOVERLAPPED pOverlapped
|
---|
37 | );
|
---|
38 |
|
---|
39 | HANDLE WINAPI CreateLogFile(
|
---|
40 | LPCWSTR pszLogFileName,
|
---|
41 | ACCESS_MASK fDesiredAccess,
|
---|
42 | DWORD dwShareMode,
|
---|
43 | LPSECURITY_ATTRIBUTES psaLogFile,
|
---|
44 | ULONG fCreateDisposition,
|
---|
45 | ULONG fFlagsAndAttributes
|
---|
46 | );
|
---|
47 |
|
---|
48 | WINBOOL WINAPI ScanLogContainers(
|
---|
49 | PCLFS_SCAN_CONTEXT pcxScan,
|
---|
50 | CLFS_SCAN_MODE eScanMode,
|
---|
51 | LPVOID pReserved
|
---|
52 | );
|
---|
53 |
|
---|
54 | WINBOOL WINAPI CreateLogMarshallingArea(
|
---|
55 | HANDLE hLog,
|
---|
56 | CLFS_BLOCK_ALLOCATION pfnAllocBuffer,
|
---|
57 | CLFS_BLOCK_DEALLOCATION pfnFreeBuffer,
|
---|
58 | PVOID pvBlockAllocContext,
|
---|
59 | ULONG cbMarshallingBuffer,
|
---|
60 | ULONG cMaxWriteBuffers,
|
---|
61 | ULONG cMaxReadBuffers,
|
---|
62 | PVOID *ppvMarshal
|
---|
63 | );
|
---|
64 |
|
---|
65 | WINBOOL WINAPI DeleteLogMarshallingArea(
|
---|
66 | PVOID pvMarshal
|
---|
67 | );
|
---|
68 |
|
---|
69 | WINBOOL WINAPI DeleteLogByHandle(
|
---|
70 | HANDLE hLog
|
---|
71 | );
|
---|
72 |
|
---|
73 | WINBOOL WINAPI DeleteLogFile(
|
---|
74 | LPCWSTR pszLogFileName,
|
---|
75 | PVOID pvReserved
|
---|
76 | );
|
---|
77 |
|
---|
78 | WINBOOL WINAPI DeregisterManageableLogClient(
|
---|
79 | HANDLE hLog
|
---|
80 | );
|
---|
81 |
|
---|
82 | WINBOOL WINAPI DumpLogRecords(
|
---|
83 | PWSTR pwszLogFileName,
|
---|
84 | CLFS_RECORD_TYPE fRecordType,
|
---|
85 | PCLFS_LSN plsnStart,
|
---|
86 | PCLFS_LSN plsnEnd,
|
---|
87 | PFILE pstrmOut,
|
---|
88 | CLFS_PRINT_RECORD_ROUTINE pfnPrintRecord,
|
---|
89 | CLFS_BLOCK_ALLOCATION pfnAllocBlock,
|
---|
90 | CLFS_BLOCK_DEALLOCATION pfnFreeBlock,
|
---|
91 | PVOID pvBlockAllocContext,
|
---|
92 | ULONG cbBlock,
|
---|
93 | ULONG cMaxBlocks
|
---|
94 | );
|
---|
95 |
|
---|
96 | WINBOOL WINAPI ReadLogRecord(
|
---|
97 | PVOID pvMarshal,
|
---|
98 | PCLFS_LSN plsnFirst,
|
---|
99 | CLFS_CONTEXT_MODE eContextMode,
|
---|
100 | PVOID *ppvReadBuffer,
|
---|
101 | PULONG pcbReadBuffer,
|
---|
102 | PCLFS_RECORD_TYPE peRecordType,
|
---|
103 | PCLFS_LSN plsnUndoNext,
|
---|
104 | PCLFS_LSN plsnPrevious,
|
---|
105 | PVOID *ppvReadContext,
|
---|
106 | LPOVERLAPPED pOverlapped
|
---|
107 | );
|
---|
108 |
|
---|
109 | WINBOOL WINAPI ReadNextLogRecord(
|
---|
110 | PVOID pvReadContext,
|
---|
111 | PVOID *ppvBuffer,
|
---|
112 | PULONG pcbBuffer,
|
---|
113 | PCLFS_RECORD_TYPE peRecordType,
|
---|
114 | PCLFS_LSN plsnUser,
|
---|
115 | PCLFS_LSN plsnUndoNext,
|
---|
116 | PCLFS_LSN plsnPrevious,
|
---|
117 | PCLFS_LSN plsnRecord,
|
---|
118 | LPOVERLAPPED pOverlapped
|
---|
119 | );
|
---|
120 |
|
---|
121 | WINBOOL WINAPI FlushLogBuffers(
|
---|
122 | PVOID pvMarshal,
|
---|
123 | LPOVERLAPPED pOverlapped
|
---|
124 | );
|
---|
125 |
|
---|
126 | WINBOOL WINAPI FlushLogToLsn(
|
---|
127 | PVOID pvMarshalContext,
|
---|
128 | PCLFS_LSN plsnFlush,
|
---|
129 | PCLFS_LSN plsnLastFlushed,
|
---|
130 | LPOVERLAPPED pOverlapped
|
---|
131 | );
|
---|
132 |
|
---|
133 | WINBOOL WINAPI FreeReservedLog(
|
---|
134 | PVOID pvMarshal,
|
---|
135 | ULONG cReservedRecords,
|
---|
136 | PLONGLONG pcbAdjustment
|
---|
137 | );
|
---|
138 |
|
---|
139 | WINBOOL WINAPI GetLogContainerName(
|
---|
140 | HANDLE hLog,
|
---|
141 | CLFS_CONTAINER_ID cidLogicalContainer,
|
---|
142 | LPCWSTR pwstrContainerName,
|
---|
143 | ULONG cLenContainerName,
|
---|
144 | PULONG pcActualLenContainerName
|
---|
145 | );
|
---|
146 |
|
---|
147 | WINBOOL WINAPI GetLogFileInformation(
|
---|
148 | HANDLE hLog,
|
---|
149 | PCLFS_INFORMATION pinfoBuffer,
|
---|
150 | PULONG cbBuffer
|
---|
151 | );
|
---|
152 |
|
---|
153 | WINBOOL WINAPI GetLogIoStatistics(
|
---|
154 | HANDLE hLog,
|
---|
155 | PVOID pvStatsBuffer,
|
---|
156 | ULONG cbStatsBuffer,
|
---|
157 | CLFS_IOSTATS_CLASS eStatsClass,
|
---|
158 | PULONG pcbStatsWritten
|
---|
159 | );
|
---|
160 |
|
---|
161 | typedef LPVOID CLFS_LOG_ARCHIVE_CONTEXT;
|
---|
162 | typedef CLFS_LOG_ARCHIVE_CONTEXT *PCLFS_LOG_ARCHIVE_CONTEXT;
|
---|
163 |
|
---|
164 | WINBOOL WINAPI GetNextLogArchiveExtent(
|
---|
165 | CLFS_LOG_ARCHIVE_CONTEXT pvArchiveContext,
|
---|
166 | CLFS_ARCHIVE_DESCRIPTOR rgadExtent[],
|
---|
167 | ULONG cDescriptors,
|
---|
168 | PULONG pcDescriptorsReturned
|
---|
169 | );
|
---|
170 |
|
---|
171 | WINBOOL WINAPI PrepareLogArchive(
|
---|
172 | HANDLE hLog,
|
---|
173 | PWSTR pszBaseLogFileName,
|
---|
174 | ULONG cLen,
|
---|
175 | const PCLFS_LSN plsnLow,
|
---|
176 | const PCLFS_LSN plsnHigh,
|
---|
177 | PULONG pcActualLength,
|
---|
178 | PULONGLONG poffBaseLogFileData,
|
---|
179 | PULONGLONG pcbBaseLogFileLength,
|
---|
180 | PCLFS_LSN plsnBase,
|
---|
181 | PCLFS_LSN plsnLast,
|
---|
182 | PCLFS_LSN plsnCurrentArchiveTail,
|
---|
183 | PCLFS_LOG_ARCHIVE_CONTEXT ppvArchiveContext
|
---|
184 | );
|
---|
185 |
|
---|
186 | WINBOOL WINAPI TerminateLogArchive(
|
---|
187 | CLFS_LOG_ARCHIVE_CONTEXT pvArchiveContext
|
---|
188 | );
|
---|
189 |
|
---|
190 | ULONG WINAPI LsnBlockOffset(
|
---|
191 | const CLFS_LSN *plsn
|
---|
192 | );
|
---|
193 |
|
---|
194 | CLFS_CONTAINER_ID WINAPI LsnContainer(
|
---|
195 | const CLFS_LSN *plsn
|
---|
196 | );
|
---|
197 |
|
---|
198 | CLFS_LSN WINAPI LsnCreate(
|
---|
199 | CLFS_CONTAINER_ID cidContainer,
|
---|
200 | ULONG offBlock,
|
---|
201 | ULONG cRecord
|
---|
202 | );
|
---|
203 |
|
---|
204 | ULONG WINAPI LsnRecordSequence(
|
---|
205 | const CLFS_LSN *plsn
|
---|
206 | );
|
---|
207 |
|
---|
208 | WINBOOL WINAPI PrepareLogArchive(
|
---|
209 | HANDLE hLog,
|
---|
210 | PWSTR pszBaseLogFileName,
|
---|
211 | ULONG cLen,
|
---|
212 | const PCLFS_LSN plsnLow,
|
---|
213 | const PCLFS_LSN plsnHigh,
|
---|
214 | PULONG pcActualLength,
|
---|
215 | PULONGLONG poffBaseLogFileData,
|
---|
216 | PULONGLONG pcbBaseLogFileLength,
|
---|
217 | PCLFS_LSN plsnBase,
|
---|
218 | PCLFS_LSN plsnLast,
|
---|
219 | PCLFS_LSN plsnCurrentArchiveTail,
|
---|
220 | PCLFS_LOG_ARCHIVE_CONTEXT ppvArchiveContext
|
---|
221 | );
|
---|
222 |
|
---|
223 | WINBOOL WINAPI QueryLogPolicy(
|
---|
224 | HANDLE hLog,
|
---|
225 | CLFS_MGMT_POLICY_TYPE ePolicyType,
|
---|
226 | PCLFS_MGMT_POLICY pPolicyBuffer,
|
---|
227 | PULONG pcbPolicyBuffer
|
---|
228 | );
|
---|
229 |
|
---|
230 | WINBOOL WINAPI ReadLogArchiveMetadata(
|
---|
231 | CLFS_LOG_ARCHIVE_CONTEXT pvArchiveContext,
|
---|
232 | ULONG cbOffset,
|
---|
233 | ULONG cbBytesToRead,
|
---|
234 | PBYTE pbReadBuffer,
|
---|
235 | PULONG pcbBytesRead
|
---|
236 | );
|
---|
237 |
|
---|
238 | WINBOOL WINAPI ReadLogRestartArea(
|
---|
239 | PVOID pvMarshal,
|
---|
240 | PVOID *ppvRestartBuffer,
|
---|
241 | PULONG pcbRestartBuffer,
|
---|
242 | PCLFS_LSN plsn,
|
---|
243 | PVOID *ppvContext,
|
---|
244 | LPOVERLAPPED pOverlapped
|
---|
245 | );
|
---|
246 |
|
---|
247 | WINBOOL WINAPI ReadPreviousLogRestartArea(
|
---|
248 | PVOID pvReadContext,
|
---|
249 | PVOID *ppvRestartBuffer,
|
---|
250 | PULONG pcbRestartBuffer,
|
---|
251 | PCLFS_LSN plsnRestart,
|
---|
252 | LPOVERLAPPED pOverlapped
|
---|
253 | );
|
---|
254 |
|
---|
255 | WINBOOL WINAPI RemoveLogContainer(
|
---|
256 | HANDLE hLog,
|
---|
257 | LPWSTR pwszContainerPath,
|
---|
258 | WINBOOL fForce,
|
---|
259 | LPVOID pReserved
|
---|
260 | );
|
---|
261 |
|
---|
262 | WINBOOL WINAPI RemoveLogContainerSet(
|
---|
263 | HANDLE hLog,
|
---|
264 | USHORT cContainers,
|
---|
265 | LPWSTR *rgwszContainerPath,
|
---|
266 | WINBOOL fForce,
|
---|
267 | LPVOID pReserved
|
---|
268 | );
|
---|
269 |
|
---|
270 | WINBOOL WINAPI ReserveAndAppendLog(
|
---|
271 | PVOID pvMarshal,
|
---|
272 | PCLFS_WRITE_ENTRY rgWriteEntries,
|
---|
273 | ULONG cWriteEntries,
|
---|
274 | PCLFS_LSN plsnUndoNext,
|
---|
275 | PCLFS_LSN plsnPrevious,
|
---|
276 | ULONG cReserveRecords,
|
---|
277 | LONGLONG rgcbReservation[],
|
---|
278 | ULONG fFlags,
|
---|
279 | PCLFS_LSN plsn,
|
---|
280 | LPOVERLAPPED pOverlapped
|
---|
281 | );
|
---|
282 |
|
---|
283 | WINBOOL WINAPI ReserveAndAppendLogAligned(
|
---|
284 | PVOID pvMarshal,
|
---|
285 | PCLFS_WRITE_ENTRY rgWriteEntries,
|
---|
286 | ULONG cWriteEntries,
|
---|
287 | ULONG cbEntryAlignment,
|
---|
288 | PCLFS_LSN plsnUndoNext,
|
---|
289 | PCLFS_LSN plsnPrevious,
|
---|
290 | ULONG cReserveRecords,
|
---|
291 | LONGLONG rgcbReservation[],
|
---|
292 | ULONG fFlags,
|
---|
293 | PCLFS_LSN plsn,
|
---|
294 | LPOVERLAPPED overlapped
|
---|
295 | );
|
---|
296 |
|
---|
297 | WINBOOL WINAPI SetEndOfLog(
|
---|
298 | HANDLE hLog,
|
---|
299 | PCLFS_LSN plsnEnd,
|
---|
300 | LPOVERLAPPED lpOverlapped
|
---|
301 | );
|
---|
302 |
|
---|
303 | WINBOOL WINAPI SetLogArchiveMode(
|
---|
304 | HANDLE hLog,
|
---|
305 | CLFS_LOG_ARCHIVE_MODE eMode
|
---|
306 | );
|
---|
307 |
|
---|
308 | WINBOOL WINAPI SetLogArchiveTail(
|
---|
309 | HANDLE hLog,
|
---|
310 | PCLFS_LSN plsnArchiveTail,
|
---|
311 | LPVOID pReserved
|
---|
312 | );
|
---|
313 |
|
---|
314 | WINBOOL WINAPI TerminateReadLog(
|
---|
315 | PVOID pvCursorContext
|
---|
316 | );
|
---|
317 |
|
---|
318 | WINBOOL WINAPI ValidateLog(
|
---|
319 | LPCWSTR pszLogFileName,
|
---|
320 | LPSECURITY_ATTRIBUTES psaLogFile,
|
---|
321 | PCLFS_INFORMATION pinfoBuffer,
|
---|
322 | PULONG pcbBuffer
|
---|
323 | );
|
---|
324 |
|
---|
325 | #ifdef __cplusplus
|
---|
326 | }
|
---|
327 | #endif
|
---|
328 | #endif /* (_WIN32_WINNT >= 0x0600) */
|
---|
329 | #endif /*_INC_CLFSW32*/
|
---|