mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
added stubs for RegDeleteTreeA/W() and RegCopyTreeA/W()
svn path=/trunk/; revision=17535
This commit is contained in:
parent
d5fd7c89ea
commit
8d862306ef
2 changed files with 199 additions and 1 deletions
|
@ -467,6 +467,8 @@ ReadEventLogW@28
|
|||
RegCloseKey@4
|
||||
RegConnectRegistryA@12
|
||||
RegConnectRegistryW@12
|
||||
RegCopyTreeA@12
|
||||
RegCopyTreeW@12
|
||||
RegCreateKeyA@12
|
||||
RegCreateKeyExA@36
|
||||
RegCreateKeyExW@36
|
||||
|
@ -475,6 +477,8 @@ RegDeleteKeyA@8
|
|||
RegDeleteKeyW@8
|
||||
RegDeleteKeyValueA@12
|
||||
RegDeleteKeyValueW@12
|
||||
RegDeleteTreeA@8
|
||||
RegDeleteTreeW@8
|
||||
RegDeleteValueA@8
|
||||
RegDeleteValueW@8
|
||||
;RegDisablePredefinedCache
|
||||
|
|
|
@ -297,6 +297,108 @@ RegConnectRegistryA (LPCSTR lpMachineName,
|
|||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegCopyTreeW
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
LONG STDCALL
|
||||
RegCopyTreeW(IN HKEY hKeySrc,
|
||||
IN LPCWSTR lpSubKey OPTIONAL,
|
||||
IN HKEY hKeyDest)
|
||||
{
|
||||
HANDLE DestKeyHandle, KeyHandle, SubKeyHandle = NULL;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = MapDefaultKey(&KeyHandle,
|
||||
hKeySrc);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
|
||||
Status = MapDefaultKey(&DestKeyHandle,
|
||||
hKeyDest);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
|
||||
if (lpSubKey != NULL)
|
||||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING SubKeyName;
|
||||
|
||||
RtlInitUnicodeString(&SubKeyName,
|
||||
(LPWSTR)lpSubKey);
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&SubKeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
KeyHandle,
|
||||
NULL);
|
||||
|
||||
Status = NtOpenKey(&SubKeyHandle,
|
||||
KEY_READ,
|
||||
&ObjectAttributes);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME - copy all keys and values recursively */
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
if (SubKeyHandle != NULL)
|
||||
{
|
||||
NtClose(SubKeyHandle);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegCopyTreeA
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
LONG STDCALL
|
||||
RegCopyTreeA(IN HKEY hKeySrc,
|
||||
IN LPCSTR lpSubKey OPTIONAL,
|
||||
IN HKEY hKeyDest)
|
||||
{
|
||||
UNICODE_STRING SubKeyName;
|
||||
LONG Ret;
|
||||
|
||||
if (lpSubKey != NULL)
|
||||
{
|
||||
if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
|
||||
(LPSTR)lpSubKey))
|
||||
{
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
else
|
||||
RtlInitUnicodeString(&SubKeyName,
|
||||
NULL);
|
||||
|
||||
Ret = RegCopyTreeW(hKeySrc,
|
||||
SubKeyName.Buffer,
|
||||
hKeyDest);
|
||||
|
||||
RtlFreeUnicodeString(&SubKeyName);
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegConnectRegistryW
|
||||
*
|
||||
|
@ -802,6 +904,98 @@ RegDeleteKeyValueA(IN HKEY hKey,
|
|||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegDeleteTreeW
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
LONG STDCALL
|
||||
RegDeleteTreeW(IN HKEY hKey,
|
||||
IN LPCWSTR lpSubKey OPTIONAL)
|
||||
{
|
||||
HANDLE KeyHandle, SubKeyHandle = NULL;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = MapDefaultKey(&KeyHandle,
|
||||
hKey);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
|
||||
if (lpSubKey != NULL)
|
||||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING SubKeyName;
|
||||
|
||||
RtlInitUnicodeString(&SubKeyName,
|
||||
(LPWSTR)lpSubKey);
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&SubKeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
KeyHandle,
|
||||
NULL);
|
||||
|
||||
Status = NtOpenKey(&SubKeyHandle,
|
||||
KEY_READ,
|
||||
&ObjectAttributes);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME - delete all keys recursively */
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
if (SubKeyHandle != NULL)
|
||||
{
|
||||
NtClose(SubKeyHandle);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegDeleteTreeA
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
LONG STDCALL
|
||||
RegDeleteTreeA(IN HKEY hKey,
|
||||
IN LPCSTR lpSubKey OPTIONAL)
|
||||
{
|
||||
UNICODE_STRING SubKeyName;
|
||||
LONG Ret;
|
||||
|
||||
if (lpSubKey != NULL)
|
||||
{
|
||||
if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
|
||||
(LPSTR)lpSubKey))
|
||||
{
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
}
|
||||
else
|
||||
RtlInitUnicodeString(&SubKeyName,
|
||||
NULL);
|
||||
|
||||
Ret = RegDeleteTreeW(hKey,
|
||||
SubKeyName.Buffer);
|
||||
|
||||
RtlFreeUnicodeString(&SubKeyName);
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* RegSetKeyValueW
|
||||
*
|
||||
|
@ -897,7 +1091,7 @@ RegSetKeyValueA(IN HKEY hKey,
|
|||
if (!RtlCreateUnicodeStringFromAsciiz(&SubKeyName,
|
||||
(LPSTR)lpSubKey))
|
||||
{
|
||||
return RtlNtStatusToDosError(Status);
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
|
|
Loading…
Reference in a new issue