ReactOS 0.4.16-dev-297-gc569aee
infpriv.h
Go to the documentation of this file.
1/*
2 * PROJECT: .inf file parser
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PROGRAMMER: Royce Mitchell III
5 * Eric Kohl
6 * Ge van Geldorp <gvg@reactos.org>
7 */
8
9#pragma once
10
11#ifndef FIELD_OFFSET
12#define FIELD_OFFSET(t,f) ((ptrdiff_t)&(((t*)0)->f))
13#endif
14
15#define INF_STATUS_INSUFFICIENT_RESOURCES ((INFSTATUS)0xC000009A)
16#define INF_STATUS_BAD_SECTION_NAME_LINE ((INFSTATUS)0xC0700001)
17#define INF_STATUS_SECTION_NAME_TOO_LONG ((INFSTATUS)0xC0700002)
18#define INF_STATUS_WRONG_INF_STYLE ((INFSTATUS)0xC0700003)
19#define INF_STATUS_NOT_ENOUGH_MEMORY ((INFSTATUS)0xC0700004)
20
21typedef struct _INFCACHEFIELD
22{
23 struct _INFCACHEFIELD *Next;
24 struct _INFCACHEFIELD *Prev;
25
28
29typedef struct _INFCACHELINE
30{
31 struct _INFCACHELINE *Next;
32 struct _INFCACHELINE *Prev;
34
36
38
41
43
44typedef struct _INFCACHESECTION
45{
46 struct _INFCACHESECTION *Next;
47 struct _INFCACHESECTION *Prev;
48
52
55
58
59typedef struct _INFCACHE
60{
65
68
69typedef struct _INFCONTEXT
70{
74 UINT Line;
76
77typedef int INFSTATUS;
78
79/* FUNCTIONS ****************************************************************/
80
82 const WCHAR *buffer,
83 const WCHAR *end,
84 PULONG error_line);
87 PCWSTR Name);
90 PCWSTR Key);
92 PCWSTR Data);
94 PCWSTR Key);
96 PCWSTR Section);
97
101
102extern INFSTATUS InfpFindFirstLine(PINFCACHE InfHandle,
103 PCWSTR Section,
104 PCWSTR Key,
106extern INFSTATUS InfpFindNextLine(PINFCONTEXT ContextIn,
107 PINFCONTEXT ContextOut);
109 PCWSTR Key,
110 PINFCONTEXT ContextOut);
112 PCWSTR Key,
113 PINFCONTEXT ContextOut);
114extern LONG InfpGetLineCount(HINF InfHandle,
115 PCWSTR Section);
119 PUCHAR ReturnBuffer,
124 INT *IntegerValue);
127 PWSTR ReturnBuffer,
132 PWSTR ReturnBuffer,
136 PWCHAR *Key,
137 PWCHAR *Data);
140 PWCHAR *Data);
141
143 PCWSTR Section,
147
155
156/* EOF */
DWORD Id
Definition: bufpool.h:45
GLuint GLuint end
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
INFSTATUS InfpGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
Definition: infget.c:643
INFSTATUS InfpGetIntField(PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
Definition: infget.c:433
PINFCACHELINE InfpFindLineById(PINFCACHESECTION Section, UINT Id)
Definition: infcore.c:292
INFSTATUS InfpFindFirstMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
Definition: infget.c:251
VOID InfpFreeContext(PINFCONTEXT Context)
Definition: infget.c:679
PINFCACHELINE InfpGetLineForContext(PINFCONTEXT Context)
Definition: infcore.c:310
struct _INFCACHEFIELD * PINFCACHEFIELD
INFSTATUS InfpFindOrAddSection(PINFCACHE Cache, PCWSTR Section, PINFCONTEXT *Context)
Definition: infput.c:190
INFSTATUS InfpAddLineWithKey(PINFCONTEXT Context, PCWSTR Key)
Definition: infput.c:224
PINFCACHESECTION InfpFreeSection(PINFCACHESECTION Section)
Definition: infcore.c:119
struct _INFCACHESECTION * PINFCACHESECTION
INFSTATUS InfpFindFirstLine(PINFCACHE InfHandle, PCWSTR Section, PCWSTR Key, PINFCONTEXT *Context)
Definition: infget.c:173
INFSTATUS InfpGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:545
PVOID InfpAddKeyToLine(PINFCACHELINE Line, PCWSTR Key)
Definition: infcore.c:324
struct _INFCACHELINE INFCACHELINE
struct _INFCACHESECTION INFCACHESECTION
INFSTATUS InfpParseBuffer(PINFCACHE file, const WCHAR *buffer, const WCHAR *end, PULONG error_line)
Definition: infcore.c:865
LONG InfpGetLineCount(HINF InfHandle, PCWSTR Section)
Definition: infget.c:327
LONG InfpGetFieldCount(PINFCONTEXT Context)
Definition: infget.c:365
PINFCACHELINE InfpFindKeyLine(PINFCACHESECTION Section, PCWSTR Key)
Definition: infcore.c:390
INFSTATUS InfpGetData(PINFCONTEXT Context, PWCHAR *Key, PWCHAR *Data)
Definition: infget.c:610
struct _INFCONTEXT INFCONTEXT
PINFCACHESECTION InfpFindSection(PINFCACHE Cache, PCWSTR Section)
Definition: infcore.c:143
INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:476
INFSTATUS InfpBuildFileBuffer(PINFCACHE InfHandle, PWCHAR *Buffer, PULONG BufferSize)
Definition: infput.c:90
PVOID InfpAddFieldToLine(PINFCACHELINE Line, PCWSTR Data)
Definition: infcore.c:353
PINFCACHESECTION InfpGetSectionForContext(PINFCONTEXT Context)
Definition: infcore.c:273
int INFSTATUS
Definition: infpriv.h:77
PINFCACHELINE InfpAddLine(PINFCACHESECTION Section)
Definition: infcore.c:217
INFSTATUS InfpFindNextLine(PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
Definition: infget.c:224
INFSTATUS InfpGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:377
INFSTATUS InfpAddField(PINFCONTEXT Context, PCWSTR Data)
Definition: infput.c:254
struct _INFCACHELINE * PINFCACHELINE
INFSTATUS InfpFindNextMatchLine(PINFCONTEXT ContextIn, PCWSTR Key, PINFCONTEXT ContextOut)
Definition: infget.c:289
struct _INFCACHE * PINFCACHE
struct _INFCACHEFIELD INFCACHEFIELD
struct _INFCACHE INFCACHE
PINFCACHESECTION InfpAddSection(PINFCACHE Cache, PCWSTR Name)
Definition: infcore.c:171
USHORT LANGID
Definition: mui.h:9
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
_In_ DWORD FieldIndex
Definition: setupapi.h:1895
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1897
Definition: fatfs.h:173
Definition: ncftp.h:79
struct _INFCACHEFIELD * Next
Definition: inffile.c:29
struct _INFCACHEFIELD * Prev
Definition: inffile.c:30
PINFCACHEFIELD FirstField
Definition: inffile.c:44
PINFCACHEFIELD LastField
Definition: inffile.c:45
LONG FieldCount
Definition: infpriv.h:35
struct _INFCACHELINE * Prev
Definition: inffile.c:38
struct _INFCACHELINE * Next
Definition: inffile.c:37
PWCHAR Key
Definition: infpriv.h:37
PINFCACHELINE LastLine
Definition: inffile.c:55
struct _INFCACHESECTION * Prev
Definition: inffile.c:52
struct _INFCACHESECTION * Next
Definition: inffile.c:51
PINFCACHELINE FirstLine
Definition: inffile.c:54
UINT NextLineId
Definition: infpriv.h:54
LONG LineCount
Definition: inffile.c:57
PINFCACHESECTION FirstSection
Definition: inffile.c:64
PINFCACHESECTION LastSection
Definition: inffile.c:65
PINFCACHESECTION StringsSection
Definition: inffile.c:67
UINT NextSectionId
Definition: infpriv.h:64
LANGID LanguageId
Definition: infpriv.h:61
UINT Line
Definition: infsupp.h:27
PINFCACHE CurrentInf
Definition: infpriv.h:72
PINFCACHE Inf
Definition: infpriv.h:71
UINT Section
Definition: infsupp.h:26
Definition: fci.c:127
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
__wchar_t WCHAR
Definition: xmlstorage.h:180