3 * Copyright (C) 2002, 2003 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/infcache.h
23 * PURPOSE: INF file parser that caches contents of INF file in memory
24 * PROGRAMMER: Royce Mitchell III
30 #define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
31 #define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
32 #define STATUS_WRONG_INF_STYLE (0xC0700003)
33 #define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
35 #define MAX_INF_STRING_LENGTH 512
37 typedef PULONG HINF
, *PHINF
;
39 typedef struct _INFCONTEXT
45 } INFCONTEXT
, *PINFCONTEXT
;
48 /* FUNCTIONS ****************************************************************/
51 InfOpenFile (PHINF InfHandle
,
56 InfCloseFile (HINF InfHandle
);
60 InfFindFirstLine (HINF InfHandle
,
66 InfFindNextLine (PINFCONTEXT ContextIn
,
67 PINFCONTEXT ContextOut
);
70 InfFindFirstMatchLine (PINFCONTEXT ContextIn
,
72 PINFCONTEXT ContextOut
);
75 InfFindNextMatchLine (PINFCONTEXT ContextIn
,
77 PINFCONTEXT ContextOut
);
81 InfGetLineCount (HINF InfHandle
,
85 InfGetFieldCount (PINFCONTEXT Context
);
89 InfGetBinaryField (PINFCONTEXT Context
,
92 ULONG ReturnBufferSize
,
96 InfGetIntField (PINFCONTEXT Context
,
101 InfGetMultiSzField (PINFCONTEXT Context
,
104 ULONG ReturnBufferSize
,
105 PULONG RequiredSize
);
108 InfGetStringField (PINFCONTEXT Context
,
111 ULONG ReturnBufferSize
,
112 PULONG RequiredSize
);
117 InfGetData (PINFCONTEXT Context
,
122 InfGetDataField (PINFCONTEXT Context
,