ntdll: Fix NtUnloadKey to match the DDK.
Bang Jun-Young
junyoung at mogua.com
Mon Jan 29 07:55:02 CST 2007
2007-01-29 Bang Jun-Young <junyoung at mogua.com>
* dlls/advapi32/registry.c, dlls/ntdll/reg.c, include/winternl.h:
ntdll: Fix NtUnloadKey to match the DDK.
-------------- next part --------------
Index: dlls/advapi32/registry.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/registry.c,v
retrieving revision 1.102
diff -u -r1.102 registry.c
--- dlls/advapi32/registry.c 29 Nov 2006 13:26:36 -0000 1.102
+++ dlls/advapi32/registry.c 29 Jan 2007 10:55:13 -0000
@@ -2089,6 +2089,8 @@
{
DWORD ret;
HKEY shkey;
+ OBJECT_ATTRIBUTES attr;
+ UNICODE_STRING subkey;
TRACE("(%p,%s)\n",hkey, debugstr_w(lpSubKey));
@@ -2096,7 +2098,9 @@
if( ret )
return ERROR_INVALID_PARAMETER;
- ret = RtlNtStatusToDosError(NtUnloadKey(shkey));
+ RtlInitUnicodeString(&subkey, lpSubKey);
+ InitializeObjectAttributes(&attr, &subkey, OBJ_CASE_INSENSITIVE, shkey, NULL);
+ ret = RtlNtStatusToDosError(NtUnloadKey(&attr));
RegCloseKey(shkey);
Index: dlls/ntdll/reg.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/reg.c,v
retrieving revision 1.75
diff -u -r1.75 reg.c
--- dlls/ntdll/reg.c 18 Oct 2006 12:40:06 -0000 1.75
+++ dlls/ntdll/reg.c 29 Jan 2007 10:55:13 -0000
@@ -775,15 +775,15 @@
* NtUnloadKey [NTDLL.@]
* ZwUnloadKey [NTDLL.@]
*/
-NTSTATUS WINAPI NtUnloadKey(IN HANDLE KeyHandle)
+NTSTATUS WINAPI NtUnloadKey(IN POBJECT_ATTRIBUTES attr)
{
NTSTATUS ret;
- TRACE("(%p)\n", KeyHandle);
+ TRACE("(%p)\n", attr);
SERVER_START_REQ( unload_registry )
{
- req->hkey = KeyHandle;
+ req->hkey = attr->RootDirectory;
ret = wine_server_call(req);
}
SERVER_END_REQ;
Index: include/winternl.h
===================================================================
RCS file: /home/wine/wine/include/winternl.h,v
retrieving revision 1.189
diff -u -r1.189 winternl.h
--- include/winternl.h 13 Dec 2006 16:04:27 -0000 1.189
+++ include/winternl.h 29 Jan 2007 10:55:14 -0000
@@ -1935,7 +1935,7 @@
NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG);
NTSTATUS WINAPI NtTestAlert(VOID);
NTSTATUS WINAPI NtUnloadDriver(const UNICODE_STRING *);
-NTSTATUS WINAPI NtUnloadKey(HANDLE);
+NTSTATUS WINAPI NtUnloadKey(POBJECT_ATTRIBUTES);
NTSTATUS WINAPI NtUnloadKeyEx(POBJECT_ATTRIBUTES,HANDLE);
NTSTATUS WINAPI NtUnlockFile(HANDLE,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,PULONG);
NTSTATUS WINAPI NtUnlockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
More information about the wine-patches
mailing list