[NEWINFLIB]
[reactos.git] / reactos / lib / newinflib / infhost.h
1 /*
2 * PROJECT: .inf file parser
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PROGRAMMER: Royce Mitchell III
5 * Eric Kohl
6 * Ge van Geldorp <gvg@reactos.org>
7 */
8
9 #pragma once
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14
15 #include "infcommon.h"
16
17 extern NTSTATUS NTAPI RtlMultiByteToUnicodeN(IN PWCHAR UnicodeString,
18 IN ULONG UnicodeSize, IN PULONG ResultSize, IN PCSTR MbString, IN ULONG MbSize);
19
20 extern BOOLEAN NTAPI RtlIsTextUnicode( PVOID buf, INT len, INT *pf );
21
22
23 extern int InfHostOpenBufferedFile(PHINF InfHandle,
24 void *Buffer,
25 ULONG BufferSize,
26 LANGID LanguageId,
27 ULONG *ErrorLine);
28 extern int InfHostOpenFile(PHINF InfHandle,
29 const CHAR *FileName,
30 LANGID LanguageId,
31 ULONG *ErrorLine);
32 extern int InfHostWriteFile(HINF InfHandle,
33 const CHAR *FileName,
34 const CHAR *HeaderComment);
35 extern void InfHostCloseFile(HINF InfHandle);
36 extern int InfHostFindFirstLine(HINF InfHandle,
37 const WCHAR *Section,
38 const WCHAR *Key,
39 PINFCONTEXT *Context);
40 extern int InfHostFindNextLine(PINFCONTEXT ContextIn,
41 PINFCONTEXT ContextOut);
42 extern int InfHostFindFirstMatchLine(PINFCONTEXT ContextIn,
43 const WCHAR *Key,
44 PINFCONTEXT ContextOut);
45 extern int InfHostFindNextMatchLine(PINFCONTEXT ContextIn,
46 const WCHAR *Key,
47 PINFCONTEXT ContextOut);
48 extern LONG InfHostGetLineCount(HINF InfHandle,
49 const WCHAR *Section);
50 extern LONG InfHostGetFieldCount(PINFCONTEXT Context);
51 extern int InfHostGetBinaryField(PINFCONTEXT Context,
52 ULONG FieldIndex,
53 UCHAR *ReturnBuffer,
54 ULONG ReturnBufferSize,
55 ULONG *RequiredSize);
56 extern int InfHostGetIntField(PINFCONTEXT Context,
57 ULONG FieldIndex,
58 ULONG *IntegerValue);
59 extern int InfHostGetMultiSzField(PINFCONTEXT Context,
60 ULONG FieldIndex,
61 WCHAR *ReturnBuffer,
62 ULONG ReturnBufferSize,
63 ULONG *RequiredSize);
64 extern int InfHostGetStringField(PINFCONTEXT Context,
65 ULONG FieldIndex,
66 WCHAR *ReturnBuffer,
67 ULONG ReturnBufferSize,
68 ULONG *RequiredSize);
69 extern int InfHostGetData(PINFCONTEXT Context,
70 WCHAR **Key,
71 WCHAR **Data);
72 extern int InfHostGetDataField(PINFCONTEXT Context,
73 ULONG FieldIndex,
74 WCHAR **Data);
75 extern int InfHostFindOrAddSection(HINF InfHandle,
76 const WCHAR *Section,
77 PINFCONTEXT *Context);
78 extern int InfHostAddLine(PINFCONTEXT Context, const WCHAR *Key);
79 extern int InfHostAddField(PINFCONTEXT Context, const WCHAR *Data);
80 extern void InfHostFreeContext(PINFCONTEXT Context);
81
82 #ifdef __cplusplus
83 }
84 #endif /* __cplusplus */
85
86 /* EOF */