mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +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 ULONG cbData);
|
||||
|
||||
LONG WINAPI
|
||||
RegCloseKey(
|
||||
IN HKEY hKey);
|
||||
|
||||
LONG WINAPI
|
||||
RegDeleteKeyW(
|
||||
IN HKEY hKey,
|
||||
|
|
|
@ -463,8 +463,11 @@ registry_callback(HINF hInf, PWCHAR Section, BOOL Delete)
|
|||
/* and now do it */
|
||||
if (!do_reg_operation(KeyHandle, ValuePtr, Context, Flags))
|
||||
{
|
||||
RegCloseKey(KeyHandle);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RegCloseKey(KeyHandle);
|
||||
}
|
||||
|
||||
InfHostFreeContext(Context);
|
||||
|
|
|
@ -485,6 +485,18 @@ RegpCreateOrOpenKey(
|
|||
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
|
||||
RegCreateKeyW(
|
||||
IN HKEY hKey,
|
||||
|
@ -942,6 +954,8 @@ RegInitializeRegistry(
|
|||
CreateSymLink(L"Registry\\Machine\\SYSTEM\\CurrentControlSet",
|
||||
NULL, ControlSetKey);
|
||||
|
||||
RegCloseKey(ControlSetKey);
|
||||
|
||||
#if 0
|
||||
/* Link SECURITY to SAM */
|
||||
CmpLinkKeyToHive(L"\\Registry\\Machine\\Security\\SAM", L"\\Registry\\Machine\\SAM\\SAM");
|
||||
|
|
Loading…
Reference in a new issue