Hello, i couldn't find RtlOpenCurrentUser, NtCreateKey and NtOpenKey on msdn and therefor i'm not sure that their first argument is a PHANDLE. It seems more natural to be a PHKEY. If it's a PHANDLE the attached patch silences the "incompatible pointer type" warnings (PHANDLE is a pointer to a void pointer) License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - silence some warnings in the advapi32 dll bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: dlls/advapi32/registry.c =================================================================== RCS file: /home/wine/wine/dlls/advapi32/registry.c,v retrieving revision 1.46 diff -u -r1.46 registry.c --- dlls/advapi32/registry.c 3 Oct 2002 19:46:27 -0000 1.46 +++ dlls/advapi32/registry.c 24 Oct 2002 20:03:45 -0000 @@ -101,7 +101,7 @@ if (hkey == HKEY_CURRENT_USER) { - if (RtlOpenCurrentUser( access, &hkey )) return 0; + if (RtlOpenCurrentUser( (PHANDLE)access, &hkey )) return 0; TRACE( "HKEY_CURRENT_USER -> %08x\n", hkey ); } else @@ -114,11 +114,11 @@ attr.Attributes = 0; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - if (NtCreateKey( &hkey, access, &attr, 0, NULL, 0, NULL )) return 0; + if (NtCreateKey( (PHANDLE)&hkey, access, &attr, 0, NULL, 0, NULL )) return 0; TRACE( "%s -> %08x\n", debugstr_w(attr.ObjectName->Buffer), hkey ); } - if (!(ret = InterlockedCompareExchange( (PLONG)&special_root_keys[idx], hkey, 0 ))) + if (!(ret = (HKEY)InterlockedCompareExchange( (PLONG)&special_root_keys[idx], (LONG)hkey, 0 ))) ret = hkey; else NtClose( hkey ); /* somebody beat us to it */ @@ -178,7 +178,7 @@ RtlInitUnicodeString( &nameW, name ); RtlInitUnicodeString( &classW, class ); - return RtlNtStatusToDosError( NtCreateKey( retkey, access, &attr, 0, + return RtlNtStatusToDosError( NtCreateKey( (PHANDLE)retkey, access, &attr, 0, &classW, options, dispos ) ); } @@ -216,7 +216,7 @@ { if (!(status = RtlAnsiStringToUnicodeString( &classW, &classA, TRUE ))) { - status = NtCreateKey( retkey, access, &attr, 0, &classW, options, dispos ); + status = NtCreateKey( (PHANDLE)retkey, access, &attr, 0, &classW, options, dispos ); RtlFreeUnicodeString( &classW ); } } @@ -282,7 +282,7 @@ attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; RtlInitUnicodeString( &nameW, name ); - return RtlNtStatusToDosError( NtOpenKey( retkey, access, &attr ) ); + return RtlNtStatusToDosError( NtOpenKey( (PHANDLE)retkey, access, &attr ) ); } @@ -310,7 +310,7 @@ if (!(status = RtlAnsiStringToUnicodeString( &NtCurrentTeb()->StaticUnicodeString, &nameA, FALSE ))) { - status = NtOpenKey( retkey, access, &attr ); + status = NtOpenKey( (PHANDLE)retkey, access, &attr ); } return RtlNtStatusToDosError( status ); }
Attachment:
pgp00076.pgp
Description: PGP signature