Sync with trunk head
[reactos.git] / lib / inflib / infros.h
1 /*
2 * PROJECT: .inf file parser
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PROGRAMMER: Royce Mitchell III
5 * Eric Kohl
6 * Ge van Geldorp <gvg@reactos.org>
7 */
8
9 #pragma once
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14
15 #include <infcommon.h>
16
17 extern VOID InfSetHeap(PVOID Heap);
18 extern NTSTATUS InfOpenBufferedFile(PHINF InfHandle,
19 PVOID Buffer,
20 ULONG BufferSize,
21 PULONG ErrorLine);
22 extern NTSTATUS InfOpenFile(PHINF InfHandle,
23 PUNICODE_STRING FileName,
24 PULONG ErrorLine);
25 extern NTSTATUS InfWriteFile(HINF InfHandle,
26 PUNICODE_STRING FileName,
27 PUNICODE_STRING HeaderComment);
28 extern VOID InfCloseFile(HINF InfHandle);
29 extern BOOLEAN InfFindFirstLine(HINF InfHandle,
30 PCWSTR Section,
31 PCWSTR Key,
32 PINFCONTEXT *Context);
33 extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
34 PINFCONTEXT ContextOut);
35 extern BOOLEAN InfFindFirstMatchLine(PINFCONTEXT ContextIn,
36 PCWSTR Key,
37 PINFCONTEXT ContextOut);
38 extern BOOLEAN InfFindNextMatchLine(PINFCONTEXT ContextIn,
39 PCWSTR Key,
40 PINFCONTEXT ContextOut);
41 extern LONG InfGetLineCount(HINF InfHandle,
42 PCWSTR Section);
43 extern LONG InfGetFieldCount(PINFCONTEXT Context);
44 extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
45 ULONG FieldIndex,
46 PUCHAR ReturnBuffer,
47 ULONG ReturnBufferSize,
48 PULONG RequiredSize);
49 extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
50 ULONG FieldIndex,
51 PLONG IntegerValue);
52 extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
53 ULONG FieldIndex,
54 PWSTR ReturnBuffer,
55 ULONG ReturnBufferSize,
56 PULONG RequiredSize);
57 extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
58 ULONG FieldIndex,
59 PWSTR ReturnBuffer,
60 ULONG ReturnBufferSize,
61 PULONG RequiredSize);
62 extern BOOLEAN InfGetData(PINFCONTEXT Context,
63 PWCHAR *Key,
64 PWCHAR *Data);
65 extern BOOLEAN InfGetDataField(PINFCONTEXT Context,
66 ULONG FieldIndex,
67 PWCHAR *Data);
68 extern BOOLEAN InfFindOrAddSection(HINF InfHandle,
69 PCWSTR Section,
70 PINFCONTEXT *Context);
71 extern BOOLEAN InfAddLine(PINFCONTEXT Context, PCWSTR Key);
72 extern BOOLEAN InfAddField(PINFCONTEXT Context, PCWSTR Data);
73 extern VOID InfFreeContext(PINFCONTEXT Context);
74
75 #ifdef __cplusplus
76 }
77 #endif /* __cplusplus */
78
79 /* EOF */