ReactOS 0.4.16-dev-297-gc569aee
inffile.h
Go to the documentation of this file.
1/*
2 * PROJECT: FreeLoader
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: INF file parser that caches contents of INF file in memory.
5 * COPYRIGHT: Copyright 2002-2006 Royce Mitchell III
6 * Copyright 2003-2019 Eric Kohl
7 */
8
9#pragma once
10
11#define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
12#define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
13#define STATUS_WRONG_INF_STYLE (0xC0700003)
14#define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
15
16#define MAX_INF_STRING_LENGTH 512
17
18typedef PULONG HINF, *PHINF;
19
20typedef struct _INFCONTEXT
21{
27
28
29/* FUNCTIONS ****************************************************************/
30
32InfOpenFile (PHINF InfHandle,
34 PULONG ErrorLine);
35
36VOID
37InfCloseFile (HINF InfHandle);
38
39
41InfFindFirstLine (HINF InfHandle,
42 PCSTR Section,
43 PCSTR Key,
45
48 PINFCONTEXT ContextOut);
49
52 PCSTR Key,
53 PINFCONTEXT ContextOut);
54
57 PCSTR Key,
58 PINFCONTEXT ContextOut);
59
60
61LONG
62InfGetLineCount (HINF InfHandle,
63 PCSTR Section);
64
65LONG
67
68
72 PUCHAR ReturnBuffer,
75
79 LONG *IntegerValue);
80
84 PCHAR ReturnBuffer,
87
91 PCHAR ReturnBuffer,
94
95
96
99 PCSTR *Key,
100 PCSTR *Data);
101
105 PCSTR *Data);
106
107/* EOF */
unsigned char BOOLEAN
BOOLEAN InfFindFirstLine(HINF InfHandle, PCSTR Section, PCSTR Key, PINFCONTEXT Context)
Definition: inffile.c:1050
LONG InfGetLineCount(HINF InfHandle, PCSTR Section)
Definition: inffile.c:1209
BOOLEAN InfGetData(PINFCONTEXT Context, PCSTR *Key, PCSTR *Data)
Definition: inffile.c:1491
BOOLEAN InfGetIntField(PINFCONTEXT Context, ULONG FieldIndex, LONG *IntegerValue)
BOOLEAN InfFindNextMatchLine(PINFCONTEXT ContextIn, PCSTR Key, PINFCONTEXT ContextOut)
Definition: inffile.c:1172
struct _INFCONTEXT * PINFCONTEXT
BOOLEAN InfGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: inffile.c:1431
struct _INFCONTEXT INFCONTEXT
VOID InfCloseFile(HINF InfHandle)
Definition: inffile.c:1028
BOOLEAN InfGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: inffile.c:1361
BOOLEAN InfGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PCSTR *Data)
Definition: inffile.c:1515
BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
Definition: inffile.c:1107
BOOLEAN InfFindFirstMatchLine(PINFCONTEXT ContextIn, PCSTR Key, PINFCONTEXT ContextOut)
Definition: inffile.c:1135
PULONG HINF
Definition: inffile.h:18
BOOLEAN InfGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: inffile.c:1260
PULONG * PHINF
Definition: inffile.h:18
LONG InfGetFieldCount(PINFCONTEXT Context)
Definition: inffile.c:1250
BOOLEAN InfOpenFile(PHINF InfHandle, PCSTR FileName, PULONG ErrorLine)
Definition: inffile.c:918
long LONG
Definition: pedump.c:60
_In_ DWORD FieldIndex
Definition: setupapi.h:1895
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1897
PVOID Inf
Definition: inffile.h:22
PVOID Line
Definition: inffile.h:25
PVOID Section
Definition: inffile.h:24
PVOID CurrentInf
Definition: inffile.h:23
uint32_t * PULONG
Definition: typedefs.h:59
const char * PCSTR
Definition: typedefs.h:52
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439