mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
- Process the "DelReg" section in .inf files.
svn path=/trunk/; revision=9613
This commit is contained in:
parent
fe2abd0550
commit
b820cca03e
2 changed files with 19 additions and 8 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: reginf.c,v 1.6 2003/11/14 17:13:36 weiden Exp $
|
||||
/* $Id: reginf.c,v 1.7 2004/06/04 23:47:04 navaraf Exp $
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS hive maker
|
||||
* FILE: tools/mkhive/reginf.h
|
||||
|
@ -379,7 +379,7 @@ registry_callback (HINF hInf, PCHAR Section, BOOL Delete)
|
|||
|
||||
Ok = InfFindFirstLine (hInf, Section, NULL, &Context);
|
||||
if (!Ok)
|
||||
return FALSE;
|
||||
return TRUE; /* Don't fail if the section isn't present */
|
||||
|
||||
for (;Ok; Ok = InfFindNextLine (&Context, &Context))
|
||||
{
|
||||
|
@ -396,9 +396,16 @@ registry_callback (HINF hInf, PCHAR Section, BOOL Delete)
|
|||
|
||||
DPRINT("KeyName: <%s>\n", Buffer);
|
||||
|
||||
/* get flags */
|
||||
if (!InfGetIntField (&Context, 4, (PLONG)&Flags))
|
||||
Flags = 0;
|
||||
if (Delete)
|
||||
{
|
||||
Flags = FLG_ADDREG_DELVAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* get flags */
|
||||
if (!InfGetIntField (&Context, 4, (PLONG)&Flags))
|
||||
Flags = 0;
|
||||
}
|
||||
|
||||
DPRINT("Flags: %lx\n", Flags);
|
||||
|
||||
|
@ -455,6 +462,11 @@ ImportRegistryFile(PCHAR FileName,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!registry_callback (hInf, "DelReg", TRUE))
|
||||
{
|
||||
DPRINT1 ("registry_callback() failed\n");
|
||||
}
|
||||
|
||||
if (!registry_callback (hInf, "AddReg", FALSE))
|
||||
{
|
||||
DPRINT1 ("registry_callback() failed\n");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: registry.c,v 1.9 2004/05/29 21:15:58 navaraf Exp $
|
||||
/* $Id: registry.c,v 1.10 2004/06/04 23:47:04 navaraf Exp $
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS hive maker
|
||||
* FILE: tools/mkhive/registry.c
|
||||
|
@ -241,8 +241,7 @@ LONG
|
|||
RegDeleteKey(HKEY Key,
|
||||
PCHAR Name)
|
||||
{
|
||||
|
||||
if (strchr(Name, '\\') != NULL)
|
||||
if (Name != NULL && strchr(Name, '\\') != NULL)
|
||||
return(ERROR_INVALID_PARAMETER);
|
||||
|
||||
DPRINT1("FIXME!\n");
|
||||
|
|
Loading…
Reference in a new issue