ReactOS 0.4.16-dev-297-gc569aee
infhostget.c
Go to the documentation of this file.
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/* INCLUDES *****************************************************************/
10
11#include "inflib.h"
12#include "infhost.h"
13
14#define NDEBUG
15#include <debug.h>
16
17int
19 const WCHAR *Section,
20 const WCHAR *Key,
22{
24
25 Status = InfpFindFirstLine(InfHandle, Section, Key, Context);
27 {
28 return 0;
29 }
30 else
31 {
32 errno = Status;
33 return -1;
34 }
35}
36
37
38int
40 PINFCONTEXT ContextOut)
41{
43
44 Status = InfpFindNextLine(ContextIn, ContextOut);
46 {
47 return 0;
48 }
49 else
50 {
51 errno = Status;
52 return -1;
53 }
54}
55
56
57int
59 const WCHAR *Key,
60 PINFCONTEXT ContextOut)
61{
63
64 Status = InfpFindFirstMatchLine(ContextIn, Key, ContextOut);
66 {
67 return 0;
68 }
69 else
70 {
71 errno = Status;
72 return -1;
73 }
74}
75
76
77int
79 const WCHAR *Key,
80 PINFCONTEXT ContextOut)
81{
83
84 Status = InfpFindNextMatchLine(ContextIn, Key, ContextOut);
86 {
87 return 0;
88 }
89 else
90 {
91 errno = Status;
92 return -1;
93 }
94}
95
96
97LONG
99 PCWSTR Section)
100{
101 return InfpGetLineCount(InfHandle, Section);
102}
103
104
105/* InfGetLineText */
106
107
108LONG
110{
112}
113
114
115int
118 UCHAR *ReturnBuffer,
121{
123
126 if (INF_SUCCESS(Status))
127 {
128 return 0;
129 }
130 else
131 {
132 errno = Status;
133 return -1;
134 }
135}
136
137
138int
141 INT *IntegerValue)
142{
144
145 Status = InfpGetIntField(Context, FieldIndex, IntegerValue);
146 if (INF_SUCCESS(Status))
147 {
148 return 0;
149 }
150 else
151 {
152 errno = Status;
153 return -1;
154 }
155}
156
157
158int
161 WCHAR *ReturnBuffer,
164{
166
169 if (INF_SUCCESS(Status))
170 {
171 return 0;
172 }
173 else
174 {
175 errno = Status;
176 return -1;
177 }
178}
179
180
181int
184 WCHAR *ReturnBuffer,
187{
189
192 if (INF_SUCCESS(Status))
193 {
194 return 0;
195 }
196 else
197 {
198 errno = Status;
199 return -1;
200 }
201}
202
203
204int
206 WCHAR **Key,
207 WCHAR **Data)
208{
210
212 if (INF_SUCCESS(Status))
213 {
214 return 0;
215 }
216 else
217 {
218 errno = Status;
219 return -1;
220 }
221}
222
223
224int
227 WCHAR **Data)
228{
230
232 if (INF_SUCCESS(Status))
233 {
234 return 0;
235 }
236 else
237 {
238 errno = Status;
239 return -1;
240 }
241}
242
243VOID
245{
247}
248
249/* EOF */
#define INF_SUCCESS(x)
Definition: builddep.h:82
Status
Definition: gdiplustypes.h:25
INFSTATUS InfpGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
Definition: infget.c:643
INFSTATUS InfpGetIntField(PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
Definition: infget.c:433
INFSTATUS InfpFindFirstMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
Definition: infget.c:251
INFSTATUS InfpFindFirstLine(PINFCACHE Cache, PCWSTR Section, PCWSTR Key, PINFCONTEXT *Context)
Definition: infget.c:173
VOID InfpFreeContext(PINFCONTEXT Context)
Definition: infget.c:679
INFSTATUS InfpGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:545
LONG InfpGetLineCount(HINF InfHandle, PCWSTR Section)
Definition: infget.c:327
LONG InfpGetFieldCount(PINFCONTEXT Context)
Definition: infget.c:365
INFSTATUS InfpGetData(PINFCONTEXT Context, PWCHAR *Key, PWCHAR *Data)
Definition: infget.c:610
INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:476
INFSTATUS InfpFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
Definition: infget.c:224
INFSTATUS InfpGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:377
INFSTATUS InfpFindNextMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
Definition: infget.c:289
int InfHostFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
Definition: infhostget.c:39
int InfHostFindFirstLine(HINF InfHandle, const WCHAR *Section, const WCHAR *Key, PINFCONTEXT *Context)
Definition: infhostget.c:18
int InfHostGetDataField(PINFCONTEXT Context, ULONG FieldIndex, WCHAR **Data)
Definition: infhostget.c:225
int InfHostFindFirstMatchLine(PINFCONTEXT ContextIn, const WCHAR *Key, PINFCONTEXT ContextOut)
Definition: infhostget.c:58
int InfHostGetData(PINFCONTEXT Context, WCHAR **Key, WCHAR **Data)
Definition: infhostget.c:205
int InfHostGetIntField(PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
Definition: infhostget.c:139
int InfHostGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, WCHAR *ReturnBuffer, ULONG ReturnBufferSize, ULONG *RequiredSize)
Definition: infhostget.c:159
int InfHostFindNextMatchLine(PINFCONTEXT ContextIn, const WCHAR *Key, PINFCONTEXT ContextOut)
Definition: infhostget.c:78
int InfHostGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, UCHAR *ReturnBuffer, ULONG ReturnBufferSize, ULONG *RequiredSize)
Definition: infhostget.c:116
int InfHostGetStringField(PINFCONTEXT Context, ULONG FieldIndex, WCHAR *ReturnBuffer, ULONG ReturnBufferSize, ULONG *RequiredSize)
Definition: infhostget.c:182
LONG InfHostGetFieldCount(PINFCONTEXT Context)
Definition: infhostget.c:109
LONG InfHostGetLineCount(HINF InfHandle, PCWSTR Section)
Definition: infhostget.c:98
VOID InfHostFreeContext(PINFCONTEXT Context)
Definition: infhostget.c:244
int INFSTATUS
Definition: infpriv.h:77
long LONG
Definition: pedump.c:60
#define errno
Definition: errno.h:18
_In_ DWORD FieldIndex
Definition: setupapi.h:1895
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1897
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180