26 WCHAR HexDigits[] =
L"0123456789abcdef";
40 BOOL no_trailing_slash)
42 static const WCHAR percent =
'%';
48 WCHAR StringLangId[] =
L"Strings.XXXX";
63 ShortToHex(&StringLangId[
sizeof(
"Strings.") - 1],
72 ShortToHex(&StringLangId[
sizeof(
"Strings.") - 1],
132 if (*
p !=
'%')
continue;
183 DPRINT1(
"Invalid parameter\n");
188 if (
NULL == CacheSection)
190 DPRINT(
"Section not found\n");
203 if (
NULL == CacheLine)
205 DPRINT(
"Key not found\n");
216 (*Context)->Section = CacheSection->
Id;
217 (*Context)->Line = CacheLine->
Id;
229 if (ContextIn ==
NULL || ContextOut ==
NULL)
233 if (CacheLine ==
NULL)
239 if (ContextIn != ContextOut)
241 ContextOut->
Inf = ContextIn->
Inf;
244 ContextOut->
Line = CacheLine->
Next->Id;
266 while (CacheLine !=
NULL)
271 if (ContextIn != ContextOut)
273 ContextOut->
Inf = ContextIn->
Inf;
276 ContextOut->
Line = CacheLine->
Id;
281 CacheLine = CacheLine->
Next;
304 while (CacheLine !=
NULL)
309 if (ContextIn != ContextOut)
311 ContextOut->
Inf = ContextIn->
Inf;
314 ContextOut->
Line = CacheLine->
Id;
319 CacheLine = CacheLine->
Next;
333 if (InfHandle ==
NULL || Section ==
NULL)
335 DPRINT(
"Invalid parameter\n");
342 CacheSection =
Cache->FirstSection;
343 while (CacheSection !=
NULL)
352 CacheSection = CacheSection->
Next;
355 DPRINT(
"Section not found\n");
372 return Line->FieldCount;
391 DPRINT(
"Invalid parameter\n");
405 CacheField = CacheField->
Next;
412 if (ReturnBuffer !=
NULL)
419 while (CacheField !=
NULL)
424 CacheField = CacheField->
Next;
444 DPRINT(
"Invalid parameter\n");
452 DPRINT(
"Invalid parameter\n");
464 CacheField = CacheField->
Next;
491 DPRINT(
"Invalid parameter\n");
505 CacheField = CacheField->
Next;
508 FieldPtr = CacheField;
513 FieldPtr = FieldPtr->
Next;
520 if (ReturnBuffer !=
NULL)
527 FieldPtr = CacheField;
528 while (FieldPtr !=
NULL)
535 FieldPtr = FieldPtr->
Next;
559 DPRINT(
"Invalid parameter\n");
579 CacheField = CacheField->
Next;
593 if (ReturnBuffer !=
NULL)
618 DPRINT(
"Invalid parameter\n");
653 DPRINT(
"Invalid parameter\n");
670 CacheField = CacheField->
Next;
#define INF_STATUS_INVALID_PARAMETER
#define INF_STATUS_SUCCESS
#define INF_STATUS_NO_MEMORY
#define INF_STATUS_NOT_FOUND
#define INF_STATUS_BUFFER_OVERFLOW
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
PINFCACHESECTION InfpFindSection(PINFCACHE Cache, PCWSTR Name)
PINFCACHELINE InfpGetLineForContext(PINFCONTEXT Context)
PINFCACHELINE InfpFindKeyLine(PINFCACHESECTION Section, PCWSTR Key)
PINFCACHESECTION InfpGetSectionForContext(PINFCONTEXT Context)
struct _INFCACHE * PINFCACHE
INFSTATUS InfpGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
INFSTATUS InfpGetIntField(PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
INFSTATUS InfpFindFirstMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
INFSTATUS InfpFindFirstLine(PINFCACHE Cache, PCWSTR Section, PCWSTR Key, PINFCONTEXT *Context)
VOID InfpFreeContext(PINFCONTEXT Context)
INFSTATUS InfpGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
LONG InfpGetLineCount(HINF InfHandle, PCWSTR Section)
LONG InfpGetFieldCount(PINFCONTEXT Context)
INFSTATUS InfpGetData(PINFCONTEXT Context, PWCHAR *Key, PWCHAR *Data)
INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
INFSTATUS InfpFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
INFSTATUS InfpGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
static PCWSTR InfpGetSubstitutionString(PINFCACHE Inf, PCWSTR str, size_t *len, BOOL no_trailing_slash)
INFSTATUS InfpFindNextMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
static size_t InfpSubstituteString(PINFCACHE Inf, const WCHAR *text, WCHAR *buffer, size_t size)
static void ShortToHex(PWCHAR Buffer, USHORT Value)
#define MAX_INF_STRING_LENGTH
#define memcpy(s1, s2, n)
#define strtoulW(s1, s2, b)
_In_ DWORD _In_ DWORD ReturnBufferSize
struct _INFCACHEFIELD * Next
PINFCACHEFIELD FirstField
struct _INFCACHELINE * Next
struct _INFCACHESECTION * Next
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value