mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 05:39:42 +00:00
[MKHIVE] Implement and use RegCloseKey().
This commit is contained in:
parent
4caf391324
commit
81d435a181
3 changed files with 21 additions and 0 deletions
|
@ -89,6 +89,10 @@ RegSetValueExW(
|
||||||
IN const UCHAR* lpData,
|
IN const UCHAR* lpData,
|
||||||
IN ULONG cbData);
|
IN ULONG cbData);
|
||||||
|
|
||||||
|
LONG WINAPI
|
||||||
|
RegCloseKey(
|
||||||
|
IN HKEY hKey);
|
||||||
|
|
||||||
LONG WINAPI
|
LONG WINAPI
|
||||||
RegDeleteKeyW(
|
RegDeleteKeyW(
|
||||||
IN HKEY hKey,
|
IN HKEY hKey,
|
||||||
|
|
|
@ -463,8 +463,11 @@ registry_callback(HINF hInf, PWCHAR Section, BOOL Delete)
|
||||||
/* and now do it */
|
/* and now do it */
|
||||||
if (!do_reg_operation(KeyHandle, ValuePtr, Context, Flags))
|
if (!do_reg_operation(KeyHandle, ValuePtr, Context, Flags))
|
||||||
{
|
{
|
||||||
|
RegCloseKey(KeyHandle);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RegCloseKey(KeyHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
InfHostFreeContext(Context);
|
InfHostFreeContext(Context);
|
||||||
|
|
|
@ -485,6 +485,18 @@ RegpCreateOrOpenKey(
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LONG WINAPI
|
||||||
|
RegCloseKey(
|
||||||
|
IN HKEY hKey)
|
||||||
|
{
|
||||||
|
PMEMKEY Key = HKEY_TO_MEMKEY(hKey); // ParentKey
|
||||||
|
|
||||||
|
/* Free the object */
|
||||||
|
free(Key);
|
||||||
|
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
LONG WINAPI
|
LONG WINAPI
|
||||||
RegCreateKeyW(
|
RegCreateKeyW(
|
||||||
IN HKEY hKey,
|
IN HKEY hKey,
|
||||||
|
@ -942,6 +954,8 @@ RegInitializeRegistry(
|
||||||
CreateSymLink(L"Registry\\Machine\\SYSTEM\\CurrentControlSet",
|
CreateSymLink(L"Registry\\Machine\\SYSTEM\\CurrentControlSet",
|
||||||
NULL, ControlSetKey);
|
NULL, ControlSetKey);
|
||||||
|
|
||||||
|
RegCloseKey(ControlSetKey);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Link SECURITY to SAM */
|
/* Link SECURITY to SAM */
|
||||||
CmpLinkKeyToHive(L"\\Registry\\Machine\\Security\\SAM", L"\\Registry\\Machine\\SAM\\SAM");
|
CmpLinkKeyToHive(L"\\Registry\\Machine\\Security\\SAM", L"\\Registry\\Machine\\SAM\\SAM");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue