ReactOS  0.4.14-dev-77-gd9e7c48
infsupp.c File Reference
#include "usetup.h"
#include <debug.h>
Include dependency graph for infsupp.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID InfCloseFile (HINF InfHandle)
 
VOID WINAPI SetupCloseInfFile (IN HINF InfHandle)
 
BOOL WINAPI SetupFindFirstLineW (IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
 
BOOLEAN InfFindNextLine (PINFCONTEXT ContextIn, PINFCONTEXT ContextOut)
 
BOOL WINAPI SetupFindNextLine (IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
 
LONG InfGetFieldCount (PINFCONTEXT Context)
 
ULONG WINAPI SetupGetFieldCount (IN PINFCONTEXT Context)
 
BOOLEAN InfGetDataField (PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
 
PCWSTR WINAPI pSetupGetField (IN PINFCONTEXT Context, IN ULONG FieldIndex)
 
BOOLEAN InfGetBinaryField (PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
 
BOOL WINAPI SetupGetBinaryField (IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PUCHAR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
 
BOOLEAN InfGetIntField (PINFCONTEXT Context, ULONG FieldIndex, INT *IntegerValue)
 
BOOL WINAPI SetupGetIntField (IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
 
BOOLEAN InfGetMultiSzField (PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
 
BOOL WINAPI SetupGetMultiSzFieldW (IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
 
BOOLEAN InfGetStringField (PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
 
BOOL WINAPI SetupGetStringFieldW (IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
 
HINF WINAPI SetupOpenInfFileExW (IN PCWSTR FileName, IN PCWSTR InfClass, IN DWORD InfStyle, IN LCID LocaleId, OUT PUINT ErrorLine)
 
HINF WINAPI INF_OpenBufferedFileA (IN PSTR FileBuffer, IN ULONG FileSize, IN PCSTR InfClass, IN DWORD InfStyle, IN LCID LocaleId, OUT PUINT ErrorLine)
 

Variables

pSpInfCloseInfFile SpInfCloseInfFile = SetupCloseInfFile
 
pSpInfFindFirstLine SpInfFindFirstLine = SetupFindFirstLineW
 
pSpInfFindNextLine SpInfFindNextLine = SetupFindNextLine
 
pSpInfGetFieldCount SpInfGetFieldCount = SetupGetFieldCount
 
pSpInfGetBinaryField SpInfGetBinaryField = SetupGetBinaryField
 
pSpInfGetIntField SpInfGetIntField = SetupGetIntField
 
pSpInfGetMultiSzField SpInfGetMultiSzField = SetupGetMultiSzFieldW
 
pSpInfGetStringField SpInfGetStringField = SetupGetStringFieldW
 
pSpInfGetField SpInfGetField = pSetupGetField
 
pSpInfOpenInfFile SpInfOpenInfFile = SetupOpenInfFileExW
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 32 of file infsupp.c.

Function Documentation

◆ INF_OpenBufferedFileA()

HINF WINAPI INF_OpenBufferedFileA ( IN PSTR  FileBuffer,
IN ULONG  FileSize,
IN PCSTR  InfClass,
IN DWORD  InfStyle,
IN LCID  LocaleId,
OUT PUINT  ErrorLine 
)

Definition at line 244 of file infsupp.c.

251 {
252  HINF hInf = NULL;
253  ULONG ErrorLineUL;
255 
256  Status = InfOpenBufferedFile(&hInf,
257  FileBuffer,
258  FileSize,
259  LANGIDFROMLCID(LocaleId),
260  &ErrorLineUL);
261  *ErrorLine = (UINT)ErrorLineUL;
262  if (!NT_SUCCESS(Status))
263  return INVALID_HANDLE_VALUE;
264 
265  return hInf;
266 }
NTSTATUS InfOpenBufferedFile(PHINF InfHandle, PVOID Buffer, ULONG BufferSize, LANGID LanguageId, PULONG ErrorLine)
Definition: infrosgen.c:51
LONG NTSTATUS
Definition: precomp.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define LANGIDFROMLCID(l)
Definition: nls.h:18
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
Status
Definition: gdiplustypes.h:24
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1

Referenced by PrepareFileCopy().

◆ InfCloseFile()

VOID InfCloseFile ( HINF  InfHandle)

Definition at line 1028 of file inffile.c.

1029 {
1030  PINFCACHE Cache;
1031 
1032  Cache = (PINFCACHE)InfHandle;
1033 
1034  if (Cache == NULL)
1035  {
1036  return;
1037  }
1038 
1039  while (Cache->FirstSection != NULL)
1040  {
1041  Cache->FirstSection = InfpCacheFreeSection(Cache->FirstSection);
1042  }
1043  Cache->LastSection = NULL;
1044 
1046 }
#define TAG_INF_CACHE
Definition: inffile.c:24
Definition: fatfs.h:173
smooth NULL
Definition: ftsmooth.c:416
struct _INFCACHE * PINFCACHE
static PINFCACHESECTION InfpCacheFreeSection(PINFCACHESECTION Section)
Definition: inffile.c:170
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: mm.h:186

Referenced by LoadReactOSSetup(), and SetupCloseInfFile().

◆ InfFindNextLine()

BOOLEAN InfFindNextLine ( PINFCONTEXT  ContextIn,
PINFCONTEXT  ContextOut 
)

Definition at line 1107 of file inffile.c.

1110 {
1111  PINFCACHELINE CacheLine;
1112 
1113  if ((ContextIn == NULL) || (ContextOut == NULL))
1114  return FALSE;
1115 
1116  if (ContextIn->Line == NULL)
1117  return FALSE;
1118 
1119  CacheLine = (PINFCACHELINE)ContextIn->Line;
1120  if (CacheLine->Next == NULL)
1121  return FALSE;
1122 
1123  if (ContextIn != ContextOut)
1124  {
1125  ContextOut->Inf = ContextIn->Inf;
1126  ContextOut->Section = ContextIn->Section;
1127  }
1128  ContextOut->Line = (PVOID)(CacheLine->Next);
1129 
1130  return TRUE;
1131 }
#define TRUE
Definition: types.h:120
struct _INFCACHELINE * PINFCACHELINE
smooth NULL
Definition: ftsmooth.c:416
void * PVOID
Definition: retypes.h:9
if(!(yy_init))
Definition: macro.lex.yy.c:714
UINT Section
Definition: infsupp.h:26
struct _INFCACHELINE * Next
Definition: inffile.c:37
HINF Inf
Definition: infsupp.h:24
UINT Line
Definition: infsupp.h:27

Referenced by SetupFindNextLine(), and SetupLdrScanBootDrivers().

◆ InfGetBinaryField()

BOOLEAN InfGetBinaryField ( PINFCONTEXT  Context,
ULONG  FieldIndex,
PUCHAR  ReturnBuffer,
ULONG  ReturnBufferSize,
PULONG  RequiredSize 
)

Definition at line 1260 of file inffile.c.

1266 {
1267  PINFCACHELINE CacheLine;
1268  PINFCACHEFIELD CacheField;
1269  ULONG Index;
1270  ULONG Size;
1271  PUCHAR Ptr;
1272 
1273  if ((Context == NULL) || (Context->Line == NULL) || (FieldIndex == 0))
1274  {
1275 // DPRINT("Invalid parameter\n");
1276  return FALSE;
1277  }
1278 
1279  if (RequiredSize != NULL)
1280  *RequiredSize = 0;
1281 
1282  CacheLine = (PINFCACHELINE)Context->Line;
1283 
1284  if (FieldIndex > CacheLine->FieldCount)
1285  return FALSE;
1286 
1287  CacheField = CacheLine->FirstField;
1288  for (Index = 1; Index < FieldIndex; Index++)
1289  CacheField = CacheField->Next;
1290 
1291  Size = CacheLine->FieldCount - FieldIndex + 1;
1292 
1293  if (RequiredSize != NULL)
1294  *RequiredSize = Size;
1295 
1296  if (ReturnBuffer != NULL)
1297  {
1298  if (ReturnBufferSize < Size)
1299  return FALSE;
1300 
1301  /* Copy binary data */
1302  Ptr = ReturnBuffer;
1303  while (CacheField != NULL)
1304  {
1305  *Ptr = (UCHAR)atoi(CacheField->Data); //strtoul(CacheField->Data, NULL, 16);
1306 
1307  Ptr++;
1308  CacheField = CacheField->Next;
1309  }
1310  }
1311 
1312  return TRUE;
1313 }
#define TRUE
Definition: types.h:120
struct _INFCACHELINE * PINFCACHELINE
struct _INFCACHEFIELD * Next
Definition: inffile.c:29
unsigned char * PUCHAR
Definition: retypes.h:3
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
ULONG FieldCount
Definition: inffile.c:40
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
PINFCACHEFIELD FirstField
Definition: inffile.c:44
smooth NULL
Definition: ftsmooth.c:416
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
if(!(yy_init))
Definition: macro.lex.yy.c:714
_In_ DWORD FieldIndex
Definition: setupapi.h:1890
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned char UCHAR
Definition: xmlstorage.h:181
CHAR Data[1]
Definition: inffile.c:32
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
unsigned int ULONG
Definition: retypes.h:1

Referenced by SetupGetBinaryField().

◆ InfGetDataField()

BOOLEAN InfGetDataField ( PINFCONTEXT  Context,
ULONG  FieldIndex,
PWCHAR Data 
)

Definition at line 127 of file infrosget.c.

130 {
132 }
#define INF_SUCCESS(x)
Definition: builddep.h:82
INFSTATUS InfpGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
Definition: infget.c:643
_In_ DWORD FieldIndex
Definition: setupapi.h:1890

Referenced by LoadReactOSSetup(), pSetupGetField(), SetupLdrInitErrataInf(), SetupLdrLoadNlsData(), and SetupLdrScanBootDrivers().

◆ InfGetFieldCount()

LONG InfGetFieldCount ( PINFCONTEXT  Context)

Definition at line 1250 of file inffile.c.

1251 {
1252  if ((Context == NULL) || (Context->Line == NULL))
1253  return 0;
1254 
1255  return ((PINFCACHELINE)Context->Line)->FieldCount;
1256 }
smooth NULL
Definition: ftsmooth.c:416

Referenced by SetupGetFieldCount().

◆ InfGetIntField()

BOOLEAN InfGetIntField ( PINFCONTEXT  Context,
ULONG  FieldIndex,
INT IntegerValue 
)

Definition at line 1317 of file inffile.c.

1321 {
1322  PINFCACHELINE CacheLine;
1323  PINFCACHEFIELD CacheField;
1324  ULONG Index;
1325  PCHAR Ptr;
1326 
1327  if ((Context == NULL) || (Context->Line == NULL) || (IntegerValue == NULL))
1328  {
1329 // DPRINT("Invalid parameter\n");
1330  return FALSE;
1331  }
1332 
1333  CacheLine = (PINFCACHELINE)Context->Line;
1334 
1335  if (FieldIndex > CacheLine->FieldCount)
1336  {
1337 // DPRINT("Invalid parameter\n");
1338  return FALSE;
1339  }
1340 
1341  if (FieldIndex == 0)
1342  {
1343  Ptr = CacheLine->Key;
1344  }
1345  else
1346  {
1347  CacheField = CacheLine->FirstField;
1348  for (Index = 1; Index < FieldIndex; Index++)
1349  CacheField = CacheField->Next;
1350 
1351  Ptr = CacheField->Data;
1352  }
1353 
1354  *IntegerValue = atoi(Ptr); //strtol(Ptr, NULL, 0);
1355 
1356  return TRUE;
1357 }
signed char * PCHAR
Definition: retypes.h:7
#define TRUE
Definition: types.h:120
struct _INFCACHELINE * PINFCACHELINE
struct _INFCACHEFIELD * Next
Definition: inffile.c:29
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
ULONG FieldCount
Definition: inffile.c:40
PINFCACHEFIELD FirstField
Definition: inffile.c:44
smooth NULL
Definition: ftsmooth.c:416
if(!(yy_init))
Definition: macro.lex.yy.c:714
_In_ DWORD FieldIndex
Definition: setupapi.h:1890
static const UCHAR Index[8]
Definition: usbohci.c:18
CHAR Data[1]
Definition: inffile.c:32
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
unsigned int ULONG
Definition: retypes.h:1
PCHAR Key
Definition: inffile.c:42

Referenced by SetupGetIntField().

◆ InfGetMultiSzField()

BOOLEAN InfGetMultiSzField ( PINFCONTEXT  Context,
ULONG  FieldIndex,
PWSTR  ReturnBuffer,
ULONG  ReturnBufferSize,
PULONG  RequiredSize 
)

Definition at line 94 of file infrosget.c.

99 {
100  return INF_SUCCESS(InfpGetMultiSzField(Context, FieldIndex, ReturnBuffer,
102 }
#define INF_SUCCESS(x)
Definition: builddep.h:82
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_ DWORD FieldIndex
Definition: setupapi.h:1890
INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:476

Referenced by SetupGetMultiSzFieldW().

◆ InfGetStringField()

BOOLEAN InfGetStringField ( PINFCONTEXT  Context,
ULONG  FieldIndex,
PWSTR  ReturnBuffer,
ULONG  ReturnBufferSize,
PULONG  RequiredSize 
)

Definition at line 106 of file infrosget.c.

111 {
112  return INF_SUCCESS(InfpGetStringField(Context, FieldIndex, ReturnBuffer,
114 }
#define INF_SUCCESS(x)
Definition: builddep.h:82
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
INFSTATUS InfpGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infget.c:545
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_ DWORD FieldIndex
Definition: setupapi.h:1890

Referenced by SetupGetStringFieldW().

◆ pSetupGetField()

PCWSTR WINAPI pSetupGetField ( IN PINFCONTEXT  Context,
IN ULONG  FieldIndex 
)

Definition at line 108 of file infsupp.c.

111 {
112  PWCHAR Data = NULL;
114  return NULL;
115  return Data;
116 }
uint16_t * PWCHAR
Definition: typedefs.h:54
BOOLEAN InfGetDataField(PINFCONTEXT Context, ULONG FieldIndex, PWCHAR *Data)
Definition: infrosget.c:127
smooth NULL
Definition: ftsmooth.c:416
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
_In_ DWORD FieldIndex
Definition: setupapi.h:1890

◆ SetupCloseInfFile()

◆ SetupFindFirstLineW()

BOOL WINAPI SetupFindFirstLineW ( IN HINF  InfHandle,
IN PCWSTR  Section,
IN PCWSTR  Key,
IN OUT PINFCONTEXT  Context 
)

Definition at line 54 of file infsupp.c.

59 {
60  PINFCONTEXT pContext;
61  BOOL ret;
62 
63  if (InfHandle == INVALID_HANDLE_VALUE)
64  return FALSE;
65 
66  ret = InfFindFirstLine(InfHandle, Section, Key, &pContext);
67  if (!ret)
68  return FALSE;
69 
70  memcpy(Context, pContext, sizeof(INFCONTEXT));
71  InfFreeContext(pContext);
72  return TRUE;
73 }
#define TRUE
Definition: types.h:120
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID InfFreeContext(PINFCONTEXT Context)
Definition: infrosget.c:135
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
BOOLEAN InfFindFirstLine(HINF InfHandle, PCSTR Section, PCSTR Key, PINFCONTEXT Context)
Definition: inffile.c:1050

Referenced by ApplyRegistryValues(), check_admin_rights(), CheckInfFile(), del_dirs_callback(), get_dest_dir(), get_destination_dir(), get_source_id(), get_src_file_info(), GetDefaultLayoutForLocale(), GetSupportedCP(), InstallPrivileges(), InstallSysSetupInfComponents(), InstallSysSetupInfDevices(), iterate_section_fields(), LoadBootSettings(), LoadFreeldrSettings(), NetClassInstaller(), ParseSetupInf(), per_user_install_callback(), ProcessSetupInf(), ProcessUnattendSection(), profile_items_callback(), ReadFreeldrSection(), register_dlls_callback(), register_ocxs_callback(), registry_callback(), run_setup_commands_callback(), set_ldids(), SetupDiBuildDriverInfoList(), SetupDiInstallDeviceInterfaces(), SetupGetSourceInfoW(), SetupGetTargetPathW(), SetupInstallFileW(), SetupInstallServicesFromInfSectionExW(), SetupQueueCopySectionW(), SetupQueueDeleteSectionW(), SetupQueueRenameSectionW(), StartComponentRegistration(), update_ini_callback(), and UseCmdParameters().

◆ SetupFindNextLine()

◆ SetupGetBinaryField()

BOOL WINAPI SetupGetBinaryField ( IN PINFCONTEXT  Context,
IN ULONG  FieldIndex,
OUT PUCHAR  ReturnBuffer,
IN ULONG  ReturnBufferSize,
OUT PULONG  RequiredSize 
)

Definition at line 126 of file infsupp.c.

132 {
133  return !!InfGetBinaryField(Context,
134  FieldIndex,
135  ReturnBuffer,
137  RequiredSize);
138 }
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
BOOLEAN InfGetBinaryField(PINFCONTEXT Context, ULONG FieldIndex, PUCHAR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: inffile.c:1260
_In_ DWORD FieldIndex
Definition: setupapi.h:1890

Referenced by ApplyRegistryValues(), and do_reg_operation().

◆ SetupGetFieldCount()

ULONG WINAPI SetupGetFieldCount ( IN PINFCONTEXT  Context)

◆ SetupGetIntField()

◆ SetupGetMultiSzFieldW()

BOOL WINAPI SetupGetMultiSzFieldW ( IN PINFCONTEXT  Context,
IN ULONG  FieldIndex,
OUT PWSTR  ReturnBuffer,
IN ULONG  ReturnBufferSize,
OUT PULONG  RequiredSize 
)

Definition at line 162 of file infsupp.c.

168 {
169  return !!InfGetMultiSzField(Context,
170  FieldIndex,
171  ReturnBuffer,
173  RequiredSize);
174 }
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_ DWORD FieldIndex
Definition: setupapi.h:1890
BOOLEAN InfGetMultiSzField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infrosget.c:94

Referenced by do_reg_operation().

◆ SetupGetStringFieldW()

BOOL WINAPI SetupGetStringFieldW ( IN PINFCONTEXT  Context,
IN ULONG  FieldIndex,
OUT PWSTR  ReturnBuffer,
IN ULONG  ReturnBufferSize,
OUT PULONG  RequiredSize 
)

Definition at line 184 of file infsupp.c.

190 {
191  return !!InfGetStringField(Context,
192  FieldIndex,
193  ReturnBuffer,
195  RequiredSize);
196 }
_In_ DWORD _In_ DWORD ReturnBufferSize
Definition: setupapi.h:1892
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_ DWORD FieldIndex
Definition: setupapi.h:1890
BOOLEAN InfGetStringField(PINFCONTEXT Context, ULONG FieldIndex, PWSTR ReturnBuffer, ULONG ReturnBufferSize, PULONG RequiredSize)
Definition: infrosget.c:106

Referenced by AddDriverToList(), ApplyRegistryValues(), CheckInfFile(), CreateShortcuts(), CreateShortcutsFromSection(), do_reg_operation(), get_dest_dir(), get_field_string(), get_source_id(), get_src_file_info(), GetDefaultLayoutForLocale(), GetStringField(), GetSupportedCP(), InstallPrivileges(), InstallSysSetupInfComponents(), InstallSysSetupInfDevices(), LoadBootSettings(), LoadFreeldrSettings(), NetClassInstaller(), ParseSetupInf(), ProcessSetupInf(), ProcessUnattendSection(), ReadFreeldrSection(), register_dlls_callback(), register_ocxs_callback(), RegisterTypeLibraries(), registry_callback(), set_ldids(), SetupDiBuildDriverInfoList(), SetupGetSourceFileLocationW(), SetupGetSourceInfoW(), SetupInstallFileW(), SetupQueueCopySectionW(), SetupQueueDeleteSectionW(), SetupQueueRenameSectionW(), StartComponentRegistration(), update_ini_callback(), and UseCmdParameters().

◆ SetupOpenInfFileExW()

HINF WINAPI SetupOpenInfFileExW ( IN PCWSTR  FileName,
IN PCWSTR  InfClass,
IN DWORD  InfStyle,
IN LCID  LocaleId,
OUT PUINT  ErrorLine 
)

Definition at line 202 of file infsupp.c.

208 {
209  HINF hInf = NULL;
210  UNICODE_STRING FileNameU;
211  ULONG ErrorLineUL;
213 
214  RtlInitUnicodeString(&FileNameU, FileName);
215  Status = InfOpenFile(&hInf,
216  &FileNameU,
217  LANGIDFROMLCID(LocaleId),
218  &ErrorLineUL);
219  *ErrorLine = (UINT)ErrorLineUL;
220  if (!NT_SUCCESS(Status))
221  return INVALID_HANDLE_VALUE;
222 
223  return hInf;
224 }
LONG NTSTATUS
Definition: precomp.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define LANGIDFROMLCID(l)
Definition: nls.h:18
Status
Definition: gdiplustypes.h:24
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
BOOLEAN InfOpenFile(PHINF InfHandle, PCSTR FileName, PULONG ErrorLine)
Definition: inffile.c:918

Variable Documentation

◆ SpInfCloseInfFile

◆ SpInfFindFirstLine

◆ SpInfFindNextLine

◆ SpInfGetBinaryField

Definition at line 233 of file infsupp.c.

Referenced by do_reg_operation().

◆ SpInfGetField

pSpInfGetField SpInfGetField = pSetupGetField

Definition at line 237 of file infsupp.c.

◆ SpInfGetFieldCount

Definition at line 232 of file infsupp.c.

Referenced by do_reg_operation().

◆ SpInfGetIntField

pSpInfGetIntField SpInfGetIntField = SetupGetIntField

Definition at line 234 of file infsupp.c.

Referenced by CheckUnattendedSetup(), LoadSetupInf(), and registry_callback().

◆ SpInfGetMultiSzField

Definition at line 235 of file infsupp.c.

Referenced by do_reg_operation().

◆ SpInfGetStringField

Definition at line 236 of file infsupp.c.

Referenced by do_reg_operation(), and registry_callback().

◆ SpInfOpenInfFile