2005-11-24 08:07:12 +00:00
|
|
|
/*
|
2005-11-25 21:37:23 +00:00
|
|
|
* PROJECT: .inf file parser
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* PROGRAMMER: Royce Mitchell III
|
|
|
|
* Eric Kohl
|
|
|
|
* Ge van Geldorp <gvg@reactos.org>
|
2005-11-24 08:07:12 +00:00
|
|
|
*/
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2005-11-24 08:07:12 +00:00
|
|
|
|
2005-11-25 21:37:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2007-09-02 19:23:43 +00:00
|
|
|
#include "infcommon.h"
|
2005-11-24 08:07:12 +00:00
|
|
|
|
|
|
|
extern int InfHostOpenBufferedFile(PHINF InfHandle,
|
|
|
|
void *Buffer,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG BufferSize,
|
|
|
|
ULONG *ErrorLine);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostOpenFile(PHINF InfHandle,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *FileName,
|
|
|
|
ULONG *ErrorLine);
|
2005-11-25 21:37:23 +00:00
|
|
|
extern int InfHostWriteFile(HINF InfHandle,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *FileName,
|
|
|
|
const CHAR *HeaderComment);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern void InfHostCloseFile(HINF InfHandle);
|
|
|
|
extern int InfHostFindFirstLine(HINF InfHandle,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *Section,
|
|
|
|
const CHAR *Key,
|
2005-11-24 08:07:12 +00:00
|
|
|
PINFCONTEXT *Context);
|
|
|
|
extern int InfHostFindNextLine(PINFCONTEXT ContextIn,
|
|
|
|
PINFCONTEXT ContextOut);
|
|
|
|
extern int InfHostFindFirstMatchLine(PINFCONTEXT ContextIn,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *Key,
|
2005-11-24 08:07:12 +00:00
|
|
|
PINFCONTEXT ContextOut);
|
|
|
|
extern int InfHostFindNextMatchLine(PINFCONTEXT ContextIn,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *Key,
|
2005-11-24 08:07:12 +00:00
|
|
|
PINFCONTEXT ContextOut);
|
2007-08-18 10:27:23 +00:00
|
|
|
extern LONG InfHostGetLineCount(HINF InfHandle,
|
|
|
|
const CHAR *Section);
|
|
|
|
extern LONG InfHostGetFieldCount(PINFCONTEXT Context);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetBinaryField(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG FieldIndex,
|
|
|
|
UCHAR *ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
ULONG *RequiredSize);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetIntField(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG FieldIndex,
|
|
|
|
ULONG *IntegerValue);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetMultiSzField(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG FieldIndex,
|
|
|
|
CHAR *ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
ULONG *RequiredSize);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetStringField(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG FieldIndex,
|
|
|
|
CHAR *ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
ULONG *RequiredSize);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetData(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
CHAR **Key,
|
|
|
|
CHAR **Data);
|
2005-11-24 08:07:12 +00:00
|
|
|
extern int InfHostGetDataField(PINFCONTEXT Context,
|
2007-08-18 10:27:23 +00:00
|
|
|
ULONG FieldIndex,
|
|
|
|
CHAR **Data);
|
2005-11-25 21:37:23 +00:00
|
|
|
extern int InfHostFindOrAddSection(HINF InfHandle,
|
2007-08-18 10:27:23 +00:00
|
|
|
const CHAR *Section,
|
2005-11-25 21:37:23 +00:00
|
|
|
PINFCONTEXT *Context);
|
2007-08-18 10:27:23 +00:00
|
|
|
extern int InfHostAddLine(PINFCONTEXT Context, const CHAR *Key);
|
|
|
|
extern int InfHostAddField(PINFCONTEXT Context, const CHAR *Data);
|
2005-11-25 21:37:23 +00:00
|
|
|
extern void InfHostFreeContext(PINFCONTEXT Context);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2005-11-24 08:07:12 +00:00
|
|
|
|
|
|
|
/* EOF */
|