43 DPRINT(
"Out of free space. TotalSize %u FreeSize %u Length %u\n",
62 DPRINT(
"Copying %u bytes from old content\n",
75 DPRINT(
"After reallocation TotalSize %u FreeSize %u\n",
108 CacheSection =
Cache->FirstSection;
109 while (CacheSection !=
NULL)
111 DPRINT(
"Processing section %S\n", CacheSection->
Name);
112 if (CacheSection !=
Cache->FirstSection)
123 while (CacheLine !=
NULL)
127 DPRINT(
"Line with key %S\n", CacheLine->
Key);
133 DPRINT(
"Line without key\n");
138 while (CacheField !=
NULL)
144 p = CacheField->
Data;
146 while (
L'\0' != *
p && ! NeedQuotes)
164 CacheField = CacheField->
Next;
169 CacheLine = CacheLine->
Next;
173 CacheSection = CacheSection->
Next;
195 DPRINT(
"InfpFindOrAddSection section %S\n", Section);
204 (*Context)->Inf =
Cache;
205 (*Context)->Line = 0;
207 if (
NULL == CacheSection)
209 DPRINT(
"Section not found, creating it\n");
211 if (
NULL == CacheSection)
213 DPRINT(
"Failed to create section\n");
219 (*Context)->Section = CacheSection->
Id;
231 DPRINT1(
"Invalid parameter\n");
239 DPRINT(
"Failed to create line\n");
246 DPRINT(
"Failed to add key\n");
260 DPRINT1(
"Invalid parameter\n");
267 DPRINT(
"Failed to add field\n");
#define INF_STATUS_INVALID_PARAMETER
#define INF_STATUS_SUCCESS
#define INF_STATUS_NO_MEMORY
_Must_inspect_result_ _In_ USHORT NewSize
PINFCACHESECTION InfpFindSection(PINFCACHE Cache, PCWSTR Name)
PINFCACHELINE InfpGetLineForContext(PINFCONTEXT Context)
PINFCACHESECTION InfpGetSectionForContext(PINFCONTEXT Context)
PINFCACHELINE InfpAddLine(PINFCACHESECTION Section)
PINFCACHESECTION InfpAddSection(PINFCACHE Cache, PCWSTR Name)
static PVOID InfpAddFieldToLine(PINFCACHELINE Line, PCSTR Data)
static PVOID InfpAddKeyToLine(PINFCACHELINE Line, PCSTR Key)
INFSTATUS InfpFindOrAddSection(PINFCACHE Cache, PCWSTR Section, PINFCONTEXT *Context)
INFSTATUS InfpAddLineWithKey(PINFCONTEXT Context, PCWSTR Key)
struct _OUTPUTBUFFER OUTPUTBUFFER
INFSTATUS InfpAddField(PINFCONTEXT Context, PCWSTR Data)
struct _OUTPUTBUFFER * POUTPUTBUFFER
INFSTATUS InfpBuildFileBuffer(PINFCACHE Cache, PWCHAR *Buffer, PULONG BufferSize)
#define MEMCPY(DST, SRC, BYTES)
_In_ ULONG _In_ ULONG _In_ ULONG Length
struct _INFCACHEFIELD * Next
PINFCACHEFIELD FirstField
struct _INFCACHELINE * Next
struct _INFCACHESECTION * Next
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize