From 54d42573b18023d26a101c659ae5b8712518f809 Mon Sep 17 00:00:00 2001 From: Ivan Leo Puoti Date: Tue, 15 Feb 2005 20:47:24 +0000 Subject: [PATCH] Move Rtl*Registry* structs, defines and prototypes to winternl.h. Fix two function declarations. --- dlls/ntdll/reg.c | 42 ++---------------------------------------- dlls/ntdll/tests/reg.c | 4 ++++ include/winternl.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 40 deletions(-) diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index ecc31beeb3..bfe73b30e8 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -45,44 +45,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); /* maximum length of a key/value name in bytes (without terminating null) */ #define MAX_NAME_LENGTH ((MAX_PATH-1) * sizeof(WCHAR)) -/* RtlQueryRegistryValues structs and defines */ -#define RTL_REGISTRY_ABSOLUTE 0 -#define RTL_REGISTRY_SERVICES 1 -#define RTL_REGISTRY_CONTROL 2 -#define RTL_REGISTRY_WINDOWS_NT 3 -#define RTL_REGISTRY_DEVICEMAP 4 -#define RTL_REGISTRY_USER 5 - -#define RTL_REGISTRY_HANDLE 0x40000000 -#define RTL_REGISTRY_OPTIONAL 0x80000000 - -#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001 -#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002 -#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004 -#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008 -#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010 -#define RTL_QUERY_REGISTRY_DIRECT 0x00000020 -#define RTL_QUERY_REGISTRY_DELETE 0x00000040 - -typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext); - -typedef struct _RTL_QUERY_REGISTRY_TABLE -{ - PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine; - ULONG Flags; - PWSTR Name; - PVOID EntryContext; - ULONG DefaultType; - PVOID DefaultData; - ULONG DefaultLength; -} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; - - /****************************************************************************** * NtCreateKey [NTDLL.@] * ZwCreateKey [NTDLL.@] @@ -1221,7 +1183,7 @@ out: * RETURNS * STATUS_SUCCESS if the specified key exists, or an NTSTATUS error code. */ -NTSTATUS WINAPI RtlCheckRegistryKey(IN ULONG RelativeTo, IN PWSTR Path) +NTSTATUS WINAPI RtlCheckRegistryKey(IN ULONG RelativeTo, IN PWSTR Path) { HKEY handle; NTSTATUS status; @@ -1252,7 +1214,7 @@ NTSTATUS WINAPI RtlCheckRegistryKey(IN ULONG RelativeTo, IN PWSTR Path) * RETURNS * STATUS_SUCCESS if the specified key is sucesfully deleted, or an NTSTATUS error code. */ -NTSTATUS RtlDeleteRegistryValue(IN ULONG RelativeTo, IN PCWSTR Path, IN PCWSTR ValueName) +NTSTATUS WINAPI RtlDeleteRegistryValue(IN ULONG RelativeTo, IN PCWSTR Path, IN PCWSTR ValueName) { NTSTATUS status; HKEY handle; diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 5dce55d363..9da48b56e2 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -31,6 +31,8 @@ #include "stdlib.h" #include "wine/unicode.h" +#ifndef __WINE_WINTERNL_H + /* RtlQueryRegistryValues structs and defines */ #define RTL_REGISTRY_ABSOLUTE 0 #define RTL_REGISTRY_SERVICES 1 @@ -67,6 +69,8 @@ typedef struct _RTL_QUERY_REGISTRY_TABLE { ULONG DefaultLength; } RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; +#endif + static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); static NTSTATUS (WINAPI * pNtDeleteValueKey)(IN HANDLE, IN PUNICODE_STRING); diff --git a/include/winternl.h b/include/winternl.h index 23c4b27e03..e4474958da 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1345,6 +1345,45 @@ typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the ri #define SE_CREATE_GLOBAL_PRIVILEGE 30L #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE + +/* Rtl*Registry* functions structs and defines */ +#define RTL_REGISTRY_ABSOLUTE 0 +#define RTL_REGISTRY_SERVICES 1 +#define RTL_REGISTRY_CONTROL 2 +#define RTL_REGISTRY_WINDOWS_NT 3 +#define RTL_REGISTRY_DEVICEMAP 4 +#define RTL_REGISTRY_USER 5 + +#define RTL_REGISTRY_HANDLE 0x40000000 +#define RTL_REGISTRY_OPTIONAL 0x80000000 + +#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001 +#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002 +#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004 +#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008 +#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010 +#define RTL_QUERY_REGISTRY_DIRECT 0x00000020 +#define RTL_QUERY_REGISTRY_DELETE 0x00000040 + +typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext); + +typedef struct _RTL_QUERY_REGISTRY_TABLE +{ + PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine; + ULONG Flags; + PWSTR Name; + PVOID EntryContext; + ULONG DefaultType; + PVOID DefaultData; + ULONG DefaultLength; +} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; + + /*********************************************************************** * Function declarations */ @@ -1515,6 +1554,7 @@ BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG); BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG); NTSTATUS WINAPI RtlCharToInteger(PCSZ,ULONG,PULONG); +NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR); void WINAPI RtlClearAllBits(PRTL_BITMAP); void WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG); ULONG WINAPI RtlCompactHeap(HANDLE,ULONG); @@ -1544,6 +1584,7 @@ NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,P NTSTATUS WINAPI RtlDeleteAce(PACL,DWORD); NTSTATUS WINAPI RtlDeleteCriticalSection(RTL_CRITICAL_SECTION *); +NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR); void WINAPI RtlDeleteResource(LPRTL_RWLOCK); DWORD WINAPI RtlDeleteSecurityObject(DWORD); PRTL_USER_PROCESS_PARAMETERS WINAPI RtlDeNormalizeProcessParams(RTL_USER_PROCESS_PARAMETERS*); @@ -1681,6 +1722,7 @@ BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRI NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING); NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS); +NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID); NTSTATUS WINAPI RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION); void WINAPI RtlRaiseException(PEXCEPTION_RECORD); -- 2.32.0.93.g670b81a890