3 * Copyright (C) 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 hive maker
22 * FILE: tools/mkhive/infcache.h
23 * PURPOSE: INF file parser that caches contents of INF file in memory
24 * PROGRAMMER: Royce Mitchell III
28 /* INCLUDES *****************************************************************/
30 #ifndef __INFCACHE_H__
31 #define __INFCACHE_H__
34 #define STATUS_BAD_SECTION_NAME_LINE (0xC0700001)
35 #define STATUS_SECTION_NAME_TOO_LONG (0xC0700002)
36 #define STATUS_WRONG_INF_STYLE (0xC0700003)
37 #define STATUS_NOT_ENOUGH_MEMORY (0xC0700004)
39 #define MAX_INF_STRING_LENGTH 512
41 typedef PVOID HINF, *PHINF;
43 typedef struct _INFCONTEXT
49 } INFCONTEXT, *PINFCONTEXT;
52 /* FUNCTIONS ****************************************************************/
55 InfOpenFile (PHINF InfHandle,
60 InfCloseFile (HINF InfHandle);
64 InfFindFirstLine (HINF InfHandle,
70 InfFindNextLine (PINFCONTEXT ContextIn,
71 PINFCONTEXT ContextOut);
74 InfFindFirstMatchLine (PINFCONTEXT ContextIn,
76 PINFCONTEXT ContextOut);
79 InfFindNextMatchLine (PINFCONTEXT ContextIn,
81 PINFCONTEXT ContextOut);
85 InfGetLineCount (HINF InfHandle,
89 InfGetFieldCount (PINFCONTEXT Context);
93 InfGetBinaryField (PINFCONTEXT Context,
96 ULONG ReturnBufferSize,
100 InfGetIntField (PINFCONTEXT Context,
105 InfGetMultiSzField (PINFCONTEXT Context,
108 ULONG ReturnBufferSize,
109 PULONG RequiredSize);
112 InfGetStringField (PINFCONTEXT Context,
115 ULONG ReturnBufferSize,
116 PULONG RequiredSize);
121 InfGetData (PINFCONTEXT Context,
126 InfGetDataField (PINFCONTEXT Context,
130 #endif /* __INFCACHE_H__ */