mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
[MKHIVE]
Try to fix *nix build svn path=/trunk/; revision=58272
This commit is contained in:
parent
52b6469887
commit
2cd667a6d8
1 changed files with 17 additions and 9 deletions
|
@ -48,15 +48,15 @@
|
||||||
#define FLG_ADDREG_TYPE_MASK (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE)
|
#define FLG_ADDREG_TYPE_MASK (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE)
|
||||||
|
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
#define Architecture L"x86"
|
static const WCHAR Architecture[] = {'x','8','6',0};
|
||||||
#elif defined(_M_AMD64)
|
#elif defined(_M_AMD64)
|
||||||
#define Architecture L"amd64"
|
static const WCHAR Architecture[] = {'a','m','d','6','4'0};
|
||||||
#elif defined(_M_IA64)
|
#elif defined(_M_IA64)
|
||||||
#define Architecture L"ia64"
|
static const WCHAR Architecture[] = {'i','a','6','4',0};
|
||||||
#elif defined(_M_ARM)
|
#elif defined(_M_ARM)
|
||||||
#define Architecture L"arm"
|
static const WCHAR Architecture[] = {'a','r','m',0};
|
||||||
#elif defined(_M_PPC)
|
#elif defined(_M_PPC)
|
||||||
#define Architecture L"ppc"
|
static const WCHAR Architecture[] = {'p','p','c',0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const WCHAR HKCR[] = {'H','K','C','R',0};
|
static const WCHAR HKCR[] = {'H','K','C','R',0};
|
||||||
|
@ -70,6 +70,9 @@ static const WCHAR HKCUPath[] = {'\\','R','e','g','i','s','t','r','y','\\','U','
|
||||||
static const WCHAR HKLMPath[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',0};
|
static const WCHAR HKLMPath[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',0};
|
||||||
static const WCHAR HKUPath[] = {'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\',0};
|
static const WCHAR HKUPath[] = {'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\',0};
|
||||||
|
|
||||||
|
static const WCHAR AddReg[] = {'A','d','d','R','e','g',0};
|
||||||
|
static const WCHAR DelReg[] = {'D','e','l','R','e','g',0};
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
|
@ -489,6 +492,7 @@ ImportRegistryFile(PCHAR FileName)
|
||||||
{
|
{
|
||||||
HINF hInf;
|
HINF hInf;
|
||||||
ULONG ErrorLine;
|
ULONG ErrorLine;
|
||||||
|
WCHAR SectionName[40];
|
||||||
|
|
||||||
/* Load inf file from install media. */
|
/* Load inf file from install media. */
|
||||||
if (InfHostOpenFile(&hInf, FileName, 0, &ErrorLine) != 0)
|
if (InfHostOpenFile(&hInf, FileName, 0, &ErrorLine) != 0)
|
||||||
|
@ -497,22 +501,26 @@ ImportRegistryFile(PCHAR FileName)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_callback (hInf, L"DelReg", TRUE))
|
if (!registry_callback (hInf, (PWCHAR)DelReg, TRUE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for DelReg failed\n");
|
DPRINT1 ("registry_callback() for DelReg failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_callback (hInf, L"DelReg.NT" Architecture, TRUE))
|
wcsncpy(SectionName, DelReg, sizeof(SectionName) / sizeof(WCHAR));
|
||||||
|
wcsncat(SectionName, Architecture, sizeof(SectionName) / sizeof(WCHAR));
|
||||||
|
if (!registry_callback (hInf, SectionName, TRUE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for DelReg.NT* failed\n");
|
DPRINT1 ("registry_callback() for DelReg.NT* failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_callback (hInf, L"AddReg", FALSE))
|
if (!registry_callback (hInf, (PWCHAR)AddReg, FALSE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for AddReg failed\n");
|
DPRINT1 ("registry_callback() for AddReg failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry_callback (hInf, L"AddReg.NT" Architecture, FALSE))
|
wcsncpy(SectionName, AddReg, sizeof(SectionName) / sizeof(WCHAR));
|
||||||
|
wcsncat(SectionName, Architecture, sizeof(SectionName) / sizeof(WCHAR));
|
||||||
|
if (!registry_callback (hInf, SectionName, FALSE))
|
||||||
{
|
{
|
||||||
DPRINT1 ("registry_callback() for AddReg.NT* failed\n");
|
DPRINT1 ("registry_callback() for AddReg.NT* failed\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue