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
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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
28 #ifndef __INFCACHE_H__
29 #define __INFCACHE_H__
32 #define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
33 #define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
34 #define STATUS_WRONG_INF_STYLE (0xC0700003)
35 #define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
37 #define MAX_INF_STRING_LENGTH 512
39 typedef PVOID HINF
, *PHINF
;
41 typedef struct _INFCONTEXT
47 } INFCONTEXT
, *PINFCONTEXT
;
50 /* FUNCTIONS ****************************************************************/
53 InfOpenBufferedFile(PHINF InfHandle
,
59 InfOpenFile (PHINF InfHandle
,
60 PUNICODE_STRING FileName
,
64 InfCloseFile (HINF InfHandle
);
68 InfFindFirstLine (HINF InfHandle
,
74 InfFindNextLine (PINFCONTEXT ContextIn
,
75 PINFCONTEXT ContextOut
);
78 InfFindFirstMatchLine (PINFCONTEXT ContextIn
,
80 PINFCONTEXT ContextOut
);
83 InfFindNextMatchLine (PINFCONTEXT ContextIn
,
85 PINFCONTEXT ContextOut
);
89 InfGetLineCount (HINF InfHandle
,
93 InfGetFieldCount (PINFCONTEXT Context
);
97 InfGetBinaryField (PINFCONTEXT Context
,
100 ULONG ReturnBufferSize
,
101 PULONG RequiredSize
);
104 InfGetIntField (PINFCONTEXT Context
,
109 InfGetMultiSzField (PINFCONTEXT Context
,
112 ULONG ReturnBufferSize
,
113 PULONG RequiredSize
);
116 InfGetStringField (PINFCONTEXT Context
,
119 ULONG ReturnBufferSize
,
120 PULONG RequiredSize
);
125 InfGetData (PINFCONTEXT Context
,
130 InfGetDataField (PINFCONTEXT Context
,
134 #endif /* __INFCACHE_H__ */