Re: Fwd: Re: RegOverridePredefKey stub - new

2008-03-10 Thread Jens Nestler
Am Montag, 10. März 2008 02:19:02 schrieb Vitaliy Margolen:
> Jens Nestler wrote:
> > Hello,
> > six weeks ago I've sent this patch for a basic implementation of the
> > RegOverridePredefKey function.
> > Unfortunately the patch was not considered till now.
> > Can everybody help me ?
>
> You have some extra pieces in this patch. When you are submitting patch -
> make sure only one thing is being changed. Here you have some irrelevant
> changes in your patch.
>
> Vitaliy.

Sorry, 
unfortunately there was a second patch included (which was already applied). 
Please find the revised patch attached.
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.0 +0100
+++ wine-0.9.54/dlls/advapi32/advapi32.spec	2008-02-05 23:42:46.0 +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.0 +0100
+++ wine-0.9.54/dlls/advapi32/registry.c	2008-02-05 23:42:46.0 +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/include/winreg.h wine-0.9.54/include/winreg.h
--- wine-0.9.54_org/include/winreg.h	2008-01-25 17:05:38.0 +0100
+++ wine-0.9.54/include/winreg.h	2008-02-05 23:44:46.0 +0100
@@ -143,6 +143,7 @@
 WINADVAPI LSTATUS   WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
 #defineRegOpenKeyEx 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);
 #defineRegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)



Fwd: Re: RegOverridePredefKey stub - Take 2

2008-03-09 Thread Jens Nestler
Hello,
six weeks ago I've sent this patch for a basic implementation of the  
RegOverridePredefKey function.
Unfortunately the patch was not considered till now.
Can everybody help me ?

Jens
--- 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.0 +0100
+++ wine-0.9.54/dlls/advapi32/advapi32.spec	2008-02-05 23:42:46.0 +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.0 +0100
+++ wine-0.9.54/dlls/advapi32/registry.c	2008-02-05 23:42:46.0 +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.0 +0100
+++ wine-0.9.54/dlls/kernel32/path.c	2008-01-28 22:59:19.0 +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.0 +0100
+++ wine-0.9.54/include/winreg.h	2008-02-05 23:44:46.0 +0100
@@ -143,6 +143,7 @@
 WINADVAPI LSTATUS   WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
 #defineRegOpenKeyEx 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);
 #defineRegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
--- End Message ---



Re: RegOverridePredefKey stub - Take 2

2008-02-05 Thread Jens Nestler
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.0 +0100
+++ wine-0.9.54/dlls/advapi32/advapi32.spec	2008-02-05 23:42:46.0 +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.0 +0100
+++ wine-0.9.54/dlls/advapi32/registry.c	2008-02-05 23:42:46.0 +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.0 +0100
+++ wine-0.9.54/dlls/kernel32/path.c	2008-01-28 22:59:19.0 +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.0 +0100
+++ wine-0.9.54/include/winreg.h	2008-02-05 23:44:46.0 +0100
@@ -143,6 +143,7 @@
 WINADVAPI LSTATUS   WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
 #defineRegOpenKeyEx 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);
 #defineRegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)



Re: [Patch for Bug 8551] MoveFileWithProgressW unconditional fails for directories with flag MOVEFILE_REPLACE_EXISTING

2008-02-05 Thread Jens Nestler
Am Dienstag, 29. Januar 2008 16:33:14 schrieb Dan Kegel:
> James McKenzie wrote:
> > Please submit a git diff not a UNIX diff.
>
> Now, hang on there.  Jens submitted a perfectly
> good unified diff patch taken from the right directory.
> There is no reason to turn up our noses at it.
> It will apply using patch in exactly the same way as
> a diff generated by git.
>
> Jens, you're fine, I wouldn't bother rediffing.  You might
> however resend your patch next week when Alexandre
> the maintainer is back from vacation!
> - Dan

Thank you very much, Dan

here I resend the patch for the MoveFileWithProgressW bug.
Jens




Re: RegOverridePredefKey stub

2008-01-29 Thread Jens Nestler
Am Dienstag, 29. Januar 2008 07:07:26 schrieb Dmitry Timoshkov:
> "Jens Nestler" <[EMAIL PROTECTED]> wrote:
> > 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.0 +0100
> > +++ wine-0.9.54/include/winreg.h 2008-01-28 22:07:55.0 +0100
> > @@ -131,6 +131,7 @@
> >  WINADVAPI LSTATUS   WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
> >  WINADVAPI LSTATUS   WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
> >  #defineRegLoadKey WINELIB_NAME_AW(RegLoadKey)
> > +WINADVAPI LSTATUS   WINAPI RegOverridePredefKey(HKEY,HKEY);
> >  WINADVAPI LSTATUS   WINAPI
> > RegLoadMUIStringA(HKEY,LPCSTR,LPSTR,DWORD,LPDWORD,DWORD,LPCSTR);
> > WINADVAPI LSTATUS   WINAPI
> > RegLoadMUIStringW(HKEY,LPCWSTR,LPWSTR,DWORD,LPDWORD,DWORD,LPCWSTR);
> > #defineRegLoadMUIString
> > WINELIB_NAME_AW(RegLoadMUIString)
>
> Isn't there something that suggests that the entries are alphabetically
> sorted?

Sorry, I haven't seen it.
Can you please change it, or should I deliver a changed patch ?
Jens




Re: [Patch for Bug 8551] MoveFileWithProgressW unconditional fails for directories with flag MOVEFILE_REPLACE_EXISTING

2008-01-29 Thread Jens Nestler
Am Dienstag, 29. Januar 2008 09:07:16 schrieb Rolf Kalbermatter:
> Jens Nestler wrote:
> > [Patch for Bug 8551] MoveFileWithProgressW
> > unconditional fails fordirectories with flag MOVEFILE_REPLACE_EXISTING
> >
> > http://bugs.winehq.org/show_bug.cgi?id=8551
> >
> > Hello,
> >
> > please find attached the patch for the bug mentioned above.
>
> Hi Jens,
>
> Please diff your patches from the top level wine directory itself, as it
> is it's not helpful since the patch utility couldn't even know which of
> the many path.c files in the source tree needs to be patched, and the
> maintainer has a lot more things to do than to search where a patch could
> apply to.
>
> Rolf Kalbermatter

Hi Rolf,
attached you can find the revised path.
Jens


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.0 +0100
+++ wine-0.9.54/dlls/kernel32/path.c	2008-01-28 22:59:19.0 +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)
 {



RegOverridePredefKey stub

2008-01-27 Thread Jens Nestler
Hello all,

I'm a Windows software developer and I'm trying to execute an application 
under the wine environment.
Now I have a problem introduced with wine 0.9.49.

I use the function RegOverridePredefKey from the advapi32.dll.
In wine 0.9.49 a stub entry for this function was created, but the 
implementation is missing.
To hold my code running, I need any implememtation for this function.
Please apply the attached patch for a stub implementation.

Thank you 
Jens
diff -urN wine-0.9.52/dlls/advapi32/advapi32.spec wine-0.9.52_new/dlls/advapi32/advapi32.spec
--- wine-0.9.52/dlls/advapi32/advapi32.spec	2007-12-28 16:26:23.0 +0100
+++ wine-0.9.52_new/dlls/advapi32/advapi32.spec	2008-01-04 21:35:05.0 +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.52/dlls/advapi32/registry.c wine-0.9.52_new/dlls/advapi32/registry.c
--- wine-0.9.52/dlls/advapi32/registry.c	2007-12-28 16:26:23.0 +0100
+++ wine-0.9.52_new/dlls/advapi32/registry.c	2008-01-04 21:34:59.0 +0100
@@ -2407,6 +2407,45 @@
 }
 
 /**
+ * RegOverridePredefKey [EMAIL PROTECTED]
+ *
+ * Maps a predefined registry key to the specified registry key.
+ *
+ * PARAMS
+ *  hKey [I] A handle to one of the following predefined keys:
+ *   HKEY_CLASSES_ROOT
+ *   HKEY_CURRENT_CONFIG
+ *   HKEY_CURRENT_USER
+ *   HKEY_LOCAL_MACHINE
+ *   HKEY_PERFORMANCE_DATA
+ *   HKEY_USERS
+ *  hNewHKey [I] A handle to an open registry key. This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function. 
+ *   It cannot be one of the predefined keys. The function maps hKey to refer to the hNewHKey key. 
+ *   This affects only the calling process.
+ *   If hNewHKey is NULL, the function restores the default mapping of the predefined key.
+ *
+ * RETURNS
+ *  Success: ERROR_SUCCESS
+ *  Failure: the return value is a nonzero error code defined in Winerror.h
+ * 
+ * NOTES
+ *  The RegOverridePredefKey function is intended for software installation programs.
+ *  It allows them to remap a predefined key, load a DLL component that will be installed on the system, 
+ *  call an entry point in the DLL, and examine the changes to the registry that the component attempted to make. 
+ *  The installation program can then write those changes to the locations intended by the DLL, 
+ *  or make changes to the data before writing it.
+ * 
+ * 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