sync trunk HEAD (r50626)
[reactos.git] / 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 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.
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 #pragma once
28
29 #ifndef __REACTOS__
30
31 #include <setupapi.h>
32
33 #else /* __REACTOS__ */
34
35 #include <infcommon.h>
36
37 #define SetupCloseInfFile InfpCloseInfFile
38 #define SetupFindFirstLineW InfpFindFirstLineW
39 #define SetupFindNextLine InfFindNextLine
40 #define SetupGetBinaryField InfGetBinaryField
41 #define SetupGetFieldCount InfGetFieldCount
42 #define SetupGetIntField InfGetIntField
43 #define SetupGetMultiSzFieldW InfpGetMultiSzFieldW
44 #define SetupGetStringFieldW InfpGetStringFieldW
45 #define SetupOpenInfFileW InfpOpenInfFileW
46
47 #define INF_STYLE_WIN4 0x00000002
48
49 /* FIXME: this structure is the one used in inflib, not in setupapi
50 * Delete it once we don't use inflib anymore */
51 typedef struct _INFCONTEXT
52 {
53 PVOID Inf;
54 PVOID Section;
55 PVOID Line;
56 } INFCONTEXT;
57
58 VOID WINAPI
59 InfpCloseInfFile(
60 IN HINF InfHandle);
61
62 BOOL WINAPI
63 InfpFindFirstLineW(
64 IN HINF InfHandle,
65 IN PCWSTR Section,
66 IN PCWSTR Key,
67 IN OUT PINFCONTEXT Context);
68
69 BOOL WINAPI
70 InfpGetMultiSzFieldW(
71 IN PINFCONTEXT Context,
72 IN ULONG FieldIndex,
73 IN OUT PWSTR ReturnBuffer,
74 IN ULONG ReturnBufferSize,
75 OUT PULONG RequiredSize);
76
77 BOOL WINAPI
78 InfpGetStringFieldW(
79 IN PINFCONTEXT Context,
80 IN ULONG FieldIndex,
81 IN OUT PWSTR ReturnBuffer,
82 IN ULONG ReturnBufferSize,
83 OUT PULONG RequiredSize);
84
85 HINF WINAPI
86 InfpOpenInfFileW(
87 IN PCWSTR FileName,
88 IN PCWSTR InfClass,
89 IN DWORD InfStyle,
90 IN LCID LocaleId,
91 OUT PUINT ErrorLine);
92
93 #endif /* __REACTOS__ */
94
95 BOOLEAN
96 INF_GetData(
97 IN PINFCONTEXT Context,
98 OUT PWCHAR *Key,
99 OUT PWCHAR *Data);
100
101 BOOLEAN
102 INF_GetDataField(
103 IN PINFCONTEXT Context,
104 IN ULONG FieldIndex,
105 OUT PWCHAR *Data);
106
107 HINF WINAPI
108 INF_OpenBufferedFileA(
109 IN PSTR FileBuffer,
110 IN ULONG FileSize,
111 IN PCSTR InfClass,
112 IN DWORD InfStyle,
113 IN LCID LocaleId,
114 OUT PUINT ErrorLine);
115
116 VOID INF_SetHeap(
117 IN PVOID Heap);
118
119 /* EOF */