- Merge to trunk r37270.
[reactos.git] / reactos / dll / win32 / advapi32 / reg / reg.c
index f018071..20f0b59 100644 (file)
@@ -41,9 +41,9 @@ static VOID CloseDefaultKeys(VOID);
         NtClose(Handle);                                                       \
     }
 #define IsPredefKey(HKey)                                                      \
-    (((ULONG)(HKey) & 0xF0000000) == 0x80000000)
+    (((ULONG_PTR)(HKey) & 0xF0000000) == 0x80000000)
 #define GetPredefKeyIndex(HKey)                                                \
-    ((ULONG)(HKey) & 0x0FFFFFFF)
+    ((ULONG_PTR)(HKey) & 0x0FFFFFFF)
 
 static NTSTATUS OpenClassesRootKey(PHANDLE KeyHandle);
 static NTSTATUS OpenLocalMachineKey (PHANDLE KeyHandle);
@@ -400,7 +400,7 @@ RegCloseKey (HKEY hKey)
   NTSTATUS Status;
 
   /* don't close null handle or a pseudo handle */
-  if ((!hKey) || (((ULONG)hKey & 0xF0000000) == 0x80000000))
+  if ((!hKey) || (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000))
     {
       return ERROR_INVALID_HANDLE;
     }
@@ -1021,7 +1021,7 @@ RegCreateKeyExA (HKEY hKey,
     {
       return RtlNtStatusToDosError (Status);
     }
-  TRACE("ParentKey %x\n", (ULONG)ParentKey);
+  TRACE("ParentKey %p\n", ParentKey);
 
   if (lpClass != NULL)
     {
@@ -1094,7 +1094,7 @@ RegCreateKeyExW (HKEY hKey,
     {
       return RtlNtStatusToDosError(Status);
     }
-  TRACE("ParentKey %x\n", (ULONG)ParentKey);
+  TRACE("ParentKey %p\n", ParentKey);
 
   RtlInitUnicodeString (&ClassString,
                        lpClass);