#include "inflib.h"
#include <debug.h>
Go to the source code of this file.
◆ EOL
◆ NDEBUG
◆ SIZE_INC
◆ OUTPUTBUFFER
◆ POUTPUTBUFFER
◆ InfpAddField()
Definition at line 254 of file infput.c.
255{
257
259 {
260 DPRINT1(
"Invalid parameter\n");
262 }
263
266 {
267 DPRINT(
"Failed to add field\n");
269 }
270
272}
#define INF_STATUS_INVALID_PARAMETER
#define INF_STATUS_SUCCESS
#define INF_STATUS_NO_MEMORY
PINFCACHELINE InfpGetLineForContext(PINFCONTEXT Context)
static PVOID InfpAddFieldToLine(PINFCACHELINE Line, PCSTR Data)
Referenced by InfHostAddField().
◆ InfpAddLineWithKey()
Definition at line 224 of file infput.c.
225{
228
230 {
231 DPRINT1(
"Invalid parameter\n");
233 }
234
238 {
239 DPRINT(
"Failed to create line\n");
241 }
243
245 {
246 DPRINT(
"Failed to add key\n");
248 }
249
251}
PINFCACHESECTION InfpGetSectionForContext(PINFCONTEXT Context)
PINFCACHELINE InfpAddLine(PINFCACHESECTION Section)
static PVOID InfpAddKeyToLine(PINFCACHELINE Line, PCSTR Key)
Referenced by InfHostAddLine().
◆ InfpBuildFileBuffer()
Definition at line 90 of file infput.c.
93{
100
106
107
108 CacheSection =
Cache->FirstSection;
109 while (CacheSection !=
NULL)
110 {
111 DPRINT(
"Processing section %S\n", CacheSection->
Name);
112 if (CacheSection !=
Cache->FirstSection)
113 {
115 }
120
121
123 while (CacheLine !=
NULL)
124 {
126 {
127 DPRINT(
"Line with key %S\n", CacheLine->
Key);
130 }
131 else
132 {
133 DPRINT(
"Line without key\n");
134 }
135
136
138 while (CacheField !=
NULL)
139 {
141 {
143 }
144 p = CacheField->
Data;
146 while (
L'\0' != *
p && ! NeedQuotes)
147 {
151 }
152 if (NeedQuotes)
153 {
157 }
158 else
159 {
161 }
162
163
164 CacheField = CacheField->
Next;
165 }
166
168
169 CacheLine = CacheLine->
Next;
170 }
171
172
173 CacheSection = CacheSection->
Next;
174 }
175
177 {
180 }
182 {
184 }
185
187}
struct _INFCACHEFIELD * Next
PINFCACHEFIELD FirstField
struct _INFCACHELINE * Next
struct _INFCACHESECTION * Next
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Referenced by InfHostWriteFile(), and InfWriteFile().
◆ InfpFindOrAddSection()
Definition at line 190 of file infput.c.
193{
195 DPRINT(
"InfpFindOrAddSection section %S\n", Section);
196
199 {
202 }
203
204 (*Context)->Inf =
Cache;
205 (*Context)->Line = 0;
207 if (
NULL == CacheSection)
208 {
209 DPRINT(
"Section not found, creating it\n");
211 if (
NULL == CacheSection)
212 {
213 DPRINT(
"Failed to create section\n");
216 }
217 }
218
219 (*Context)->Section = CacheSection->
Id;
221}
PINFCACHESECTION InfpFindSection(PINFCACHE Cache, PCWSTR Name)
PINFCACHESECTION InfpAddSection(PINFCACHE Cache, PCWSTR Name)
Referenced by InfFindOrAddSection(), and InfHostFindOrAddSection().
◆ Output()
Definition at line 27 of file infput.c.
28{
32
33
35 {
36 return;
37 }
38
39
42 {
43 DPRINT(
"Out of free space. TotalSize %u FreeSize %u Length %u\n",
45
51
53 {
56 return;
57 }
58
59
61 {
62 DPRINT(
"Copying %u bytes from old content\n",
67 }
68 else
69 {
71 }
75 DPRINT(
"After reallocation TotalSize %u FreeSize %u\n",
77 }
78
79
80
82 {
85 }
87}
_Must_inspect_result_ _In_ USHORT NewSize
#define MEMCPY(DST, SRC, BYTES)
_In_ ULONG _In_ ULONG _In_ ULONG Length