- Factor out .inf handling code from usetup
[reactos.git] / reactos / lib / inflib / infros.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: .inf file parser
4 * FILE: lib/inflib/infros.h
5 * PURPOSE: Public .inf routines for use in ReactOS
6 * PROGRAMMER: Royce Mitchell III
7 * Eric Kohl
8 * Ge van Geldorp
9 */
10
11 #ifndef INFROS_H_INCLUDED
12 #define INFROS_H_INCLUDED
13
14 #include <infcommon.h>
15
16 extern VOID InfSetHeap(PVOID Heap);
17 extern NTSTATUS InfOpenBufferedFile(PHINF InfHandle,
18 PVOID Buffer,
19 ULONG BufferSize,
20 PULONG ErrorLine);
21 extern NTSTATUS InfOpenFile(PHINF InfHandle,
22 PUNICODE_STRING FileName,
23 PULONG ErrorLine);
24 extern VOID InfCloseFile(HINF InfHandle);
25 extern BOOLEAN InfFindFirstLine(HINF InfHandle,
26 PCWSTR Section,
27 PCWSTR Key,
28 PINFCONTEXT *Context);
29 extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
30 PINFCONTEXT ContextOut);
31 extern BOOLEAN InfFindFirstMatchLine(PINFCONTEXT ContextIn,
32 PCWSTR Key,
33 PINFCONTEXT ContextOut);
34 extern BOOLEAN InfFindNextMatchLine(PINFCONTEXT ContextIn,
35 PCWSTR Key,
36 PINFCONTEXT ContextOut);
37 extern LONG InfGetLineCount(HINF InfHandle,
38 PCWSTR Section);
39 extern LONG InfGetFieldCount(PINFCONTEXT Context);
40 extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
41 ULONG FieldIndex,
42 PUCHAR ReturnBuffer,
43 ULONG ReturnBufferSize,
44 PULONG RequiredSize);
45 extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
46 ULONG FieldIndex,
47 PLONG IntegerValue);
48 extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
49 ULONG FieldIndex,
50 PWSTR ReturnBuffer,
51 ULONG ReturnBufferSize,
52 PULONG RequiredSize);
53 extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
54 ULONG FieldIndex,
55 PWSTR ReturnBuffer,
56 ULONG ReturnBufferSize,
57 PULONG RequiredSize);
58 extern BOOLEAN InfGetData(PINFCONTEXT Context,
59 PWCHAR *Key,
60 PWCHAR *Data);
61 extern BOOLEAN InfGetDataField(PINFCONTEXT Context,
62 ULONG FieldIndex,
63 PWCHAR *Data);
64 extern VOID InfFreeContext(PINFCONTEXT Context);
65
66 #endif /* INFROS_H_INCLUDED */
67
68 /* EOF */