--- Begin Message ---
Am Dienstag, 29. Januar 2008 14:44:35 schrieb Dmitry Timoshkov:
> "Jens Nestler" <[EMAIL PROTECTED]> wrote:
> > Sorry, I haven't seen it.
> > Can you please change it, or should I deliver a changed patch ?
>
> Please resend and updated patch with a 'Take 2' in the subject and
> an explanation in the body what's changed.
Stub implementation for RegOverridePredefKey.
The added prototype in the winreg.h is now in alphabetical order.
Jens
diff -urN wine-0.9.54_org/dlls/advapi32/advapi32.spec wine-0.9.54/dlls/advapi32/advapi32.spec
--- wine-0.9.54_org/dlls/advapi32/advapi32.spec 2008-01-25 17:05:38.000000000 +0100
+++ wine-0.9.54/dlls/advapi32/advapi32.spec 2008-02-05 23:42:46.000000000 +0100
@@ -499,7 +499,7 @@
@ stdcall RegOpenKeyExW(long wstr long long ptr)
@ stdcall RegOpenKeyW(long wstr ptr)
@ stdcall RegOpenUserClassesRoot(ptr long long ptr)
-@ stub RegOverridePredefKey
+@ stdcall RegOverridePredefKey(long long)
@ stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall RegQueryMultipleValuesA(long ptr long ptr ptr)
diff -urN wine-0.9.54_org/dlls/advapi32/registry.c wine-0.9.54/dlls/advapi32/registry.c
--- wine-0.9.54_org/dlls/advapi32/registry.c 2008-01-25 17:05:38.000000000 +0100
+++ wine-0.9.54/dlls/advapi32/registry.c 2008-02-05 23:42:46.000000000 +0100
@@ -2408,6 +2408,31 @@
}
/******************************************************************************
+ * RegOverridePredefKey [EMAIL PROTECTED]
+ *
+ * Map a predefined key to another key.
+ *
+ * PARAMS
+ * hkey [I] Handle of a key to map, could be:
+ * HKEY_CLASSES_ROOT / HKEY_CURRENT_CONFIG / HKEY_CURRENT_USER / HKEY_LOCAL_MACHINE / HKEY_PERFORMANCE_DATA / HKEY_USERS
+ * hNewHKey [I] Handle to an open key hkey is mapped to.
+ * RegOverridePredefKey restores the original mapping, if NULL is given
+ *
+ * RETURNS
+ * Success: ERROR_SUCCESS
+ * Failure: nonzero error code from Winerror.h
+ *
+ * FIXME
+ * function must be implemented
+ */
+
+LSTATUS WINAPI RegOverridePredefKey(HKEY hKey, HKEY hNewHKey)
+{
+ FIXME("(%p, %p) stub\n", hKey, hNewHKey);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/******************************************************************************
* load_string [Internal]
*
* This is basically a copy of user32/resource.c's LoadStringW. Necessary to
diff -urN wine-0.9.54_org/dlls/kernel32/path.c wine-0.9.54/dlls/kernel32/path.c
--- wine-0.9.54_org/dlls/kernel32/path.c 2008-01-25 17:05:38.000000000 +0100
+++ wine-0.9.54/dlls/kernel32/path.c 2008-01-28 22:59:19.000000000 +0100
@@ -1042,15 +1042,6 @@
goto error;
}
- if (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- if (flag & MOVEFILE_REPLACE_EXISTING) /* cannot replace directory */
- {
- SetLastError( ERROR_INVALID_PARAMETER );
- goto error;
- }
- }
-
/* we must have write access to the destination, and it must */
/* not exist except if MOVEFILE_REPLACE_EXISTING is set */
@@ -1061,7 +1052,7 @@
}
status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE, &attr, &io, 0,
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
- if (status == STATUS_SUCCESS)
+ if (status == STATUS_SUCCESS) /* destination exists */
{
NtClose( dest_handle );
if (!(flag & MOVEFILE_REPLACE_EXISTING))
@@ -1070,6 +1061,11 @@
RtlFreeUnicodeString( &nt_name );
goto error;
}
+ else if (info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) /* cannot replace directory */
+ {
+ SetLastError( ERROR_ACCESS_DENIED );
+ goto error;
+ }
}
else if (status != STATUS_OBJECT_NAME_NOT_FOUND)
{
diff -urN wine-0.9.54_org/include/winreg.h wine-0.9.54/include/winreg.h
--- wine-0.9.54_org/include/winreg.h 2008-01-25 17:05:38.000000000 +0100
+++ wine-0.9.54/include/winreg.h 2008-02-05 23:44:46.000000000 +0100
@@ -143,6 +143,7 @@
WINADVAPI LSTATUS WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
#define RegOpenKeyEx WINELIB_NAME_AW(RegOpenKeyEx)
WINADVAPI LSTATUS WINAPI RegOpenUserClassesRoot(HANDLE,DWORD,REGSAM,PHKEY);
+WINADVAPI LSTATUS WINAPI RegOverridePredefKey(HKEY,HKEY);
WINADVAPI LSTATUS WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
WINADVAPI LSTATUS WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPFILETIME);
#define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
--- End Message ---