- implemented RegDisablePredefinedCache()
- added stubs for RegEnableReflectionKey(), RegDisableReflectionKey()
and RegQueryReflectionKey()
Modified: trunk/reactos/lib/advapi32/advapi32.def
Modified: trunk/reactos/lib/advapi32/reg/reg.c
Modified: trunk/reactos/w32api/include/winreg.h
_____
Modified: trunk/reactos/lib/advapi32/advapi32.def
--- trunk/reactos/lib/advapi32/advapi32.def 2006-01-14 22:47:35 UTC
(rev 20869)
+++ trunk/reactos/lib/advapi32/advapi32.def 2006-01-14 23:17:26 UTC
(rev 20870)
@@ -482,8 +482,10 @@
RegDeleteTreeW@8
RegDeleteValueA@8
RegDeleteValueW@8
-;RegDisablePredefinedCache
+RegDisablePredefinedCache@0
RegDisablePredefinedCacheEx@0
+RegDisableReflectionKey@4
+RegEnableReflectionKey@4
RegEnumKeyA@16
RegEnumKeyExA@32
RegEnumKeyExW@32
@@ -508,6 +510,7 @@
RegQueryInfoKeyW@48
RegQueryMultipleValuesA@20
RegQueryMultipleValuesW@20
+RegQueryReflectionKey@8
RegQueryValueA@16
RegQueryValueExA@24
RegQueryValueExW@24
_____
Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 22:47:35 UTC
(rev 20869)
+++ trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 23:17:26 UTC
(rev 20870)
@@ -30,6 +30,7 @@
static HANDLE DefaultHandleTable[MAX_DEFAULT_HANDLES];
static HANDLE ProcessHeap;
static BOOLEAN DefaultHandlesDisabled = FALSE;
+static BOOLEAN DefaultHandleHKUDisabled = FALSE;
/* PROTOTYPES
***************************************************************/
@@ -143,7 +144,7 @@
{
PHANDLE Handle;
ULONG Index;
- BOOLEAN DoOpen;
+ BOOLEAN DoOpen, DefDisabled;
NTSTATUS Status = STATUS_SUCCESS;
TRACE("MapDefaultKey (Key %x)\n", Key);
@@ -162,8 +163,13 @@
}
RtlEnterCriticalSection (&HandleTableCS);
-
- if (!DefaultHandlesDisabled)
+
+ if (Key == HKEY_CURRENT_USER)
+ DefDisabled = DefaultHandleHKUDisabled;
+ else
+ DefDisabled = DefaultHandlesDisabled;
+
+ if (!DefDisabled)
{
Handle = &DefaultHandleTable[Index];
DoOpen = (*Handle == NULL);
@@ -183,7 +189,7 @@
if (NT_SUCCESS(Status))
{
- if (!DefaultHandlesDisabled)
+ if (!DefDisabled)
*RealKey = *Handle;
else
*(PULONG_PTR)Handle |= 0x1;
@@ -295,6 +301,21 @@
/***********************************************************************
*
+ * RegDisablePredefinedCache
+ *
+ * @implemented
+ */
+LONG WINAPI
+RegDisablePredefinedCache(VOID)
+{
+ RtlEnterCriticalSection (&HandleTableCS);
+ DefaultHandleHKUDisabled = TRUE;
+ RtlLeaveCriticalSection (&HandleTableCS);
+ return ERROR_SUCCESS;
+}
+
+
+/**********************************************************************
**
* RegDisablePredefinedCacheEx
*
* @implemented
@@ -1634,6 +1655,32 @@
/***********************************************************************
*
+ * RegDisableReflectionKey
+ *
+ * @unimplemented
+ */
+LONG WINAPI
+RegDisableReflectionKey(IN HKEY hBase)
+{
+ DPRINT1("RegDisableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/**********************************************************************
**
+ * RegEnableReflectionKey
+ *
+ * @unimplemented
+ */
+LONG WINAPI
+RegEnableReflectionKey(IN HKEY hBase)
+{
+ DPRINT1("RegEnableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/**********************************************************************
**
* RegSetKeyValueW
*
* @implemented
@@ -3372,6 +3419,21 @@
/***********************************************************************
*
+ * RegQueryReflectionKey
+ *
+ * @unimplemented
+ */
+LONG WINAPI
+RegQueryReflectionKey(IN HKEY hBase,
+ OUT BOOL* bIsReflectionDisabled)
+{
+ DPRINT1("RegQueryReflectionKey(0x%p, 0x%p) UNIMPLEMENTED!\n",
+ hBase, bIsReflectionDisabled);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/**********************************************************************
**
* RegQueryValueExW
*
* @implemented
_____
Modified: trunk/reactos/w32api/include/winreg.h
--- trunk/reactos/w32api/include/winreg.h 2006-01-14 22:47:35 UTC
(rev 20869)
+++ trunk/reactos/w32api/include/winreg.h 2006-01-14 23:17:26 UTC
(rev 20870)
@@ -78,8 +78,13 @@
#endif
LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
+#if (_WIN32_WINNT >= 0x0500)
+LONG WINAPI RegDisablePredefinedCache(VOID);
+#endif
#if (_WIN32_WINNT >= 0x0600)
LONG WINAPI RegDisablePredefinedCacheEx(VOID);
+LONG WINAPI RegDisableReflectionKey(HKEY);
+LONG WINAPI RegEnableReflectionKey(HKEY);
#endif
LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
@@ -104,6 +109,9 @@
LONG WINAPI
RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,P
DWORD,PDWORD,PDWORD,PFILETIME);
LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
LONG WINAPI
RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
+#if (_WIN32_WINNT >= 0x0600)
+LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*);
+#endif
LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
LONG WINAPI
RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
LONG WINAPI
RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);