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;
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
INFSTATUS InfpGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
struct _INFCACHEFIELD * Next
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG _In_opt_ PVOID Data
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
INFSTATUS InfpFindFirstLine(PINFCACHE Cache, PCWSTR Section, PCWSTR Key, PINFCONTEXT *Context)
IN PVOID IN PVOID IN USHORT IN USHORT Size
_In_ DWORD _In_ DWORD ReturnBufferSize
#define INF_STATUS_NO_MEMORY
INFSTATUS InfpGetData(PINFCONTEXT Context, PWCHAR *Key, PWCHAR *Data)
INFSTATUS InfpGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
INFSTATUS InfpGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
struct _INFCACHESECTION * Next
PINFCACHESECTION InfpFindSection(PINFCACHE Cache, PCWSTR Name)
PINFCACHELINE InfpFindKeyLine(PINFCACHESECTION Section, PCWSTR Key)
PINFCACHEFIELD FirstField
static size_t InfpSubstituteString(PINFCACHE Inf, const WCHAR *text, WCHAR *buffer, size_t size)
#define INF_STATUS_BUFFER_OVERFLOW
static PCWSTR InfpGetSubstitutionString(PINFCACHE Inf, PCWSTR str, size_t *len, BOOL no_trailing_slash)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
INFSTATUS InfpFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
#define MAX_INF_STRING_LENGTH
_In_ WDFCOLLECTION _In_ ULONG Index
struct _INFCACHE * PINFCACHE
INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
INFSTATUS InfpFindNextMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
#define INF_STATUS_NOT_FOUND
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
#define INF_STATUS_INVALID_PARAMETER
#define memcpy(s1, s2, n)
LONG InfpGetFieldCount(PINFCONTEXT Context)
LONG InfpGetLineCount(HINF InfHandle, PCWSTR Section)
#define INF_STATUS_SUCCESS
static void ShortToHex(PWCHAR Buffer, USHORT Value)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
VOID InfpFreeContext(PINFCONTEXT Context)
struct _INFCACHELINE * Next
PINFCACHELINE InfpGetLineForContext(PINFCONTEXT Context)
#define strtoulW(s1, s2, b)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
INFSTATUS InfpFindFirstMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
INFSTATUS InfpGetIntField(PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
PINFCACHESECTION InfpGetSectionForContext(PINFCONTEXT Context)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *