Partially fixed up tree after merge from HEAD. More to do.
[reactos.git] / reactos / base / setup / usetup / inffile.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2002 ReactOS Team
4 *
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.
9 *
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.
14 *
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.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS text-mode setup
22 * FILE: subsys/system/usetup/inffile.h
23 * PURPOSE: .inf files support functions
24 * PROGRAMMER: Hervé Poussineau
25 */
26
27 #ifndef __INFFILE_H__
28 #define __INFFILE_H__
29
30 #include <infcommon.h>
31
32 #define SetupCloseInfFile InfpCloseInfFile
33 #define SetupFindFirstLineW InfpFindFirstLineW
34 #define SetupFindNextLine InfpFindNextLine
35 #define SetupGetBinaryField InfpGetBinaryField
36 #define SetupGetFieldCount InfpGetFieldCount
37 #define SetupGetIntField InfpGetIntField
38 #define SetupGetMultiSzFieldW InfpGetMultiSzFieldW
39 #define SetupGetStringFieldW InfpGetStringFieldW
40 #define SetupOpenInfFileW InfpOpenInfFileW
41
42 #define INF_STYLE_WIN4 0x00000002
43
44 /* FIXME: this structure is the one used in inflib, not in setupapi
45 * Delete it once we don't use inflib anymore */
46 typedef struct _INFCONTEXT
47 {
48 PVOID Inf;
49 PVOID Section;
50 PVOID Line;
51 } INFCONTEXT;
52
53 VOID WINAPI
54 InfpCloseInfFile(
55 IN HINF InfHandle);
56
57 BOOL WINAPI
58 InfpFindFirstLineW(
59 IN HINF InfHandle,
60 IN PCWSTR Section,
61 IN PCWSTR Key,
62 IN OUT PINFCONTEXT Context);
63
64 BOOL WINAPI
65 InfpFindNextLine(
66 IN PINFCONTEXT ContextIn,
67 OUT PINFCONTEXT ContextOut);
68
69 BOOL WINAPI
70 InfpGetBinaryField(
71 IN PINFCONTEXT Context,
72 IN DWORD FieldIndex,
73 IN OUT BYTE* ReturnBuffer,
74 IN DWORD ReturnBufferSize,
75 OUT LPDWORD RequiredSize);
76
77 DWORD WINAPI
78 InfpGetFieldCount(
79 IN PINFCONTEXT Context);
80
81 BOOL WINAPI
82 InfpGetIntField(
83 IN PINFCONTEXT Context,
84 IN DWORD FieldIndex,
85 OUT PINT IntegerValue);
86
87 BOOL WINAPI
88 InfpGetMultiSzFieldW(
89 IN PINFCONTEXT Context,
90 IN DWORD FieldIndex,
91 IN OUT PWSTR ReturnBuffer,
92 IN DWORD ReturnBufferSize,
93 OUT LPDWORD RequiredSize);
94
95 BOOL WINAPI
96 InfpGetStringFieldW(
97 IN PINFCONTEXT Context,
98 IN DWORD FieldIndex,
99 IN OUT PWSTR ReturnBuffer,
100 IN DWORD ReturnBufferSize,
101 OUT PDWORD RequiredSize);
102
103 HINF WINAPI
104 InfpOpenInfFileW(
105 IN PCWSTR FileName,
106 IN PCWSTR InfClass,
107 IN DWORD InfStyle,
108 OUT PUINT ErrorLine);
109
110 BOOLEAN
111 INF_GetData(
112 IN PINFCONTEXT Context,
113 OUT PWCHAR *Key,
114 OUT PWCHAR *Data);
115
116 BOOLEAN
117 INF_GetDataField(
118 IN PINFCONTEXT Context,
119 IN ULONG FieldIndex,
120 OUT PWCHAR *Data);
121
122 HINF WINAPI
123 INF_OpenBufferedFileA(
124 IN PSTR FileBuffer,
125 IN ULONG FileSize,
126 IN PCSTR InfClass,
127 IN DWORD InfStyle,
128 OUT PUINT ErrorLine);
129
130 VOID INF_SetHeap(
131 IN PVOID Heap);
132
133 #endif /* __INFFILE_H__*/
134
135 /* EOF */