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 InfOpenFile (PHINF InfHandle,
54 PUNICODE_STRING FileName,
58 InfCloseFile (HINF InfHandle);
62 InfFindFirstLine (HINF InfHandle,
68 InfFindNextLine (PINFCONTEXT ContextIn,
69 PINFCONTEXT ContextOut);
72 InfFindFirstMatchLine (PINFCONTEXT ContextIn,
74 PINFCONTEXT ContextOut);
77 InfFindNextMatchLine (PINFCONTEXT ContextIn,
79 PINFCONTEXT ContextOut);
83 InfGetLineCount (HINF InfHandle,
87 InfGetFieldCount (PINFCONTEXT Context);
91 InfGetBinaryField (PINFCONTEXT Context,
94 ULONG ReturnBufferSize,
98 InfGetIntField (PINFCONTEXT Context,
103 InfGetMultiSzField (PINFCONTEXT Context,
106 ULONG ReturnBufferSize,
107 PULONG RequiredSize);
110 InfGetStringField (PINFCONTEXT Context,
113 ULONG ReturnBufferSize,
114 PULONG RequiredSize);
119 InfGetData (PINFCONTEXT Context,
124 InfGetDataField (PINFCONTEXT Context,
128 #endif /* __INFCACHE_H__ */