- Factor out .inf handling code from usetup
[reactos.git] / reactos / lib / inflib / infrosget.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: .inf file parser
4 * FILE: lib/inflib/infrosget.c
5 * PURPOSE: Read .inf routines for use in ReactOS
6 * PROGRAMMER: Royce Mitchell III
7 * Eric Kohl
8 * Ge van Geldorp
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include "inflib.h"
14 #include "infros.h"
15
16 #define NDEBUG
17 #include <debug.h>
18
19
20 BOOLEAN
21 InfFindFirstLine(HINF InfHandle,
22 PCWSTR Section,
23 PCWSTR Key,
24 PINFCONTEXT *Context)
25 {
26 return INF_SUCCESS(InfpFindFirstLine(InfHandle, Section, Key, Context));
27 }
28
29
30 BOOLEAN
31 InfFindNextLine(PINFCONTEXT ContextIn,
32 PINFCONTEXT ContextOut)
33 {
34 return INF_SUCCESS(InfpFindNextLine(ContextIn, ContextOut));
35 }
36
37
38 BOOLEAN
39 InfFindFirstMatchLine(PINFCONTEXT ContextIn,
40 PCWSTR Key,
41 PINFCONTEXT ContextOut)
42 {
43 return INF_SUCCESS(InfpFindFirstMatchLine(ContextIn, Key, ContextOut));
44 }
45
46
47 BOOLEAN
48 InfFindNextMatchLine(PINFCONTEXT ContextIn,
49 PCWSTR Key,
50 PINFCONTEXT ContextOut)
51 {
52 return INF_SUCCESS(InfpFindNextMatchLine(ContextIn, Key, ContextOut));
53 }
54
55
56 LONG
57 InfGetLineCount(HINF InfHandle,
58 PCWSTR Section)
59 {
60 return InfpGetLineCount(InfHandle, Section);
61 }
62
63
64 /* InfGetLineText */
65
66
67 LONG
68 InfGetFieldCount(PINFCONTEXT Context)
69 {
70 return InfpGetFieldCount(Context);
71 }
72
73
74 BOOLEAN
75 InfGetBinaryField(PINFCONTEXT Context,
76 ULONG FieldIndex,
77 PUCHAR ReturnBuffer,
78 ULONG ReturnBufferSize,
79 PULONG RequiredSize)
80 {
81 return INF_SUCCESS(InfpGetBinaryField(Context, FieldIndex, ReturnBuffer,
82 ReturnBufferSize, RequiredSize));
83 }
84
85
86 BOOLEAN
87 InfGetIntField(PINFCONTEXT Context,
88 ULONG FieldIndex,
89 PLONG IntegerValue)
90 {
91 return INF_SUCCESS(InfpGetIntField(Context, FieldIndex, IntegerValue));
92 }
93
94
95 BOOLEAN
96 InfGetMultiSzField(PINFCONTEXT Context,
97 ULONG FieldIndex,
98 PWSTR ReturnBuffer,
99 ULONG ReturnBufferSize,
100 PULONG RequiredSize)
101 {
102 return INF_SUCCESS(InfpGetMultiSzField(Context, FieldIndex, ReturnBuffer,
103 ReturnBufferSize, RequiredSize));
104 }
105
106
107 BOOLEAN
108 InfGetStringField(PINFCONTEXT Context,
109 ULONG FieldIndex,
110 PWSTR ReturnBuffer,
111 ULONG ReturnBufferSize,
112 PULONG RequiredSize)
113 {
114 return INF_SUCCESS(InfpGetStringField(Context, FieldIndex, ReturnBuffer,
115 ReturnBufferSize, RequiredSize));
116 }
117
118
119 BOOLEAN
120 InfGetData(PINFCONTEXT Context,
121 PWCHAR *Key,
122 PWCHAR *Data)
123 {
124 return INF_SUCCESS(InfpGetData(Context, Key, Data));
125 }
126
127
128 BOOLEAN
129 InfGetDataField (PINFCONTEXT Context,
130 ULONG FieldIndex,
131 PWCHAR *Data)
132 {
133 return INF_SUCCESS(InfpGetDataField(Context, FieldIndex, Data));
134 }
135
136 VOID
137 InfFreeContext(PINFCONTEXT Context)
138 {
139 InfpFreeContext(Context);
140 }
141
142 /* EOF */