ReactOS 0.4.15-dev-8222-g9164419
reginf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL ImportRegistryFile (PCHAR Filename)
 

Function Documentation

◆ ImportRegistryFile()

BOOL ImportRegistryFile ( PCHAR  Filename)

Definition at line 491 of file reginf.c.

492{
493 HINF hInf;
494 ULONG ErrorLine;
495
496 /* Load inf file from install media. */
497 if (InfHostOpenFile(&hInf, FileName, 0, &ErrorLine) != 0)
498 {
499 DPRINT1("InfHostOpenFile(%s) failed\n", FileName);
500 return FALSE;
501 }
502
503 if (!registry_callback(hInf, (PWCHAR)DelReg, TRUE))
504 {
505 DPRINT1("registry_callback() for DelReg failed\n");
506 InfHostCloseFile(hInf);
507 return FALSE;
508 }
509
510 if (!registry_callback(hInf, (PWCHAR)AddReg, FALSE))
511 {
512 DPRINT1("registry_callback() for AddReg failed\n");
513 InfHostCloseFile(hInf);
514 return FALSE;
515 }
516
517 InfHostCloseFile(hInf);
518 return TRUE;
519}
#define DPRINT1
Definition: precomp.h:8
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
int InfHostOpenFile(PHINF InfHandle, const CHAR *FileName, LANGID LanguageId, ULONG *ErrorLine)
Definition: infhostgen.c:128
void InfHostCloseFile(HINF InfHandle)
Definition: infhostgen.c:283
static BOOL registry_callback(HINF hInf, PCWSTR Section, BOOL Delete)
Definition: reginf.c:398
static const WCHAR AddReg[]
Definition: reginf.c:69
static const WCHAR DelReg[]
Definition: reginf.c:70
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59