Use correct format for arguments in debug messages
Modified: trunk/reactos/lib/rtl/critical.c
Modified: trunk/reactos/lib/rtl/dbgbuffer.c
Modified: trunk/reactos/lib/rtl/dos8dot3.c
Modified: trunk/reactos/lib/rtl/exception.c
Modified: trunk/reactos/lib/rtl/handle.c
Modified: trunk/reactos/lib/rtl/heap.c
Modified: trunk/reactos/lib/rtl/i386/exception.c
Modified: trunk/reactos/lib/rtl/image.c
Modified: trunk/reactos/lib/rtl/message.c
Modified: trunk/reactos/lib/rtl/path.c
Modified: trunk/reactos/lib/rtl/process.c
Modified: trunk/reactos/lib/rtl/registry.c
Modified: trunk/reactos/lib/rtl/thread.c
Modified: trunk/reactos/lib/rtl/unicodeprefix.c

Modified: trunk/reactos/lib/rtl/critical.c
--- trunk/reactos/lib/rtl/critical.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/critical.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -63,14 +63,14 @@
                 RtlRaiseStatus(Status);
                 return;
         }
-        DPRINT("Created Event: %x \n", hNewEvent);
+        DPRINT("Created Event: %p \n", hNewEvent);
 
         if ((hEvent = InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
                                                          (PVOID)hNewEvent,
                                                          0))) {
 
             /* Some just created an event */
-            DPRINT("Closing already created event: %x\n", hNewEvent);
+            DPRINT("Closing already created event: %p\n", hNewEvent);
             NtClose(hNewEvent);
         }
     }
@@ -114,7 +114,7 @@
     }
 
     /* Increase the Debug Entry count */
-    DPRINT("Waiting on Critical Section Event: %x %x\n",
+    DPRINT("Waiting on Critical Section Event: %p %p\n",
             CriticalSection,
             CriticalSection->LockSemaphore);
     CriticalSection->DebugInfo->EntryCount++;
@@ -135,7 +135,7 @@
             /* Is this the 2nd time we've timed out? */
             if (LastChance) {
 
-                DPRINT1("Deadlock: %x\n", CriticalSection);
+                DPRINT1("Deadlock: %p\n", CriticalSection);
 
                 /* Yes it is, we are raising an exception */
                 ExceptionRecord.ExceptionCode    = STATUS_POSSIBLE_DEADLOCK;
@@ -186,7 +186,7 @@
     }
 
     /* Signal the Event */
-    DPRINT("Signaling Critical Section Event: %x, %x\n",
+    DPRINT("Signaling Critical Section Event: %p, %p\n",
             CriticalSection,
             CriticalSection->LockSemaphore);
     Status = NtSetEvent(CriticalSection->LockSemaphore, NULL);
@@ -194,7 +194,7 @@
     if (!NT_SUCCESS(Status)) {
 
         /* We've failed */
-        DPRINT1("Signaling Failed for: %x, %x, %x\n",
+        DPRINT1("Signaling Failed for: %p, %p, 0x%08lx\n",
                 CriticalSection,
                 CriticalSection->LockSemaphore,
 		Status);
@@ -261,7 +261,7 @@
         if (!RtlpDebugInfoFreeList[i]) {
 
             /* Mark entry in use */
-            DPRINT("Using entry: %d. Buffer: %x\n", i, &RtlpStaticDebugInfo[i]);
+            DPRINT("Using entry: %lu. Buffer: %p\n", i, &RtlpStaticDebugInfo[i]);
             RtlpDebugInfoFreeList[i] = TRUE;
 
             /* Use free entry found */
@@ -307,7 +307,7 @@
 
         /* Mark as free */
         EntryId = (DebugInfo - RtlpStaticDebugInfo);
-        DPRINT("Freeing from Buffer: %x. Entry: %d inside Process: %x\n",
+        DPRINT("Freeing from Buffer: %p. Entry: %lu inside Process: %p\n",
                DebugInfo,
                EntryId,
                NtCurrentTeb()->Cid.UniqueProcess);
@@ -316,7 +316,7 @@
     } else {
 
         /* It's a dynamic one, so free from the heap */
-        DPRINT("Freeing from Heap: %x inside Process: %x\n",
+        DPRINT("Freeing from Heap: %p inside Process: %p\n",
                DebugInfo,
                NtCurrentTeb()->Cid.UniqueProcess);
         RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo);
@@ -346,7 +346,7 @@
 {
     NTSTATUS Status = STATUS_SUCCESS;
 
-    DPRINT("Deleting Critical Section: %x\n", CriticalSection);
+    DPRINT("Deleting Critical Section: %p\n", CriticalSection);
     /* Close the Event Object Handle if it exists */
     if (CriticalSection->LockSemaphore) {
 
@@ -511,7 +511,7 @@
     PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData;
 
     /* First things first, set up the Object */
-    DPRINT("Initializing Critical Section: %x\n", CriticalSection);
+    DPRINT("Initializing Critical Section: %p\n", CriticalSection);
     CriticalSection->LockCount = -1;
     CriticalSection->RecursionCount = 0;
     CriticalSection->OwningThread = 0;
@@ -520,14 +520,14 @@
 
     /* Allocate the Debug Data */
     CritcalSectionDebugData = RtlpAllocateDebugInfo();
-    DPRINT("Allocated Debug Data: %x inside Process: %x\n",
+    DPRINT("Allocated Debug Data: %p inside Process: %p\n",
            CritcalSectionDebugData,
            NtCurrentTeb()->Cid.UniqueProcess);
 
     if (!CritcalSectionDebugData) {
 
         /* This is bad! */
-        DPRINT1("Couldn't allocate Debug Data for: %x\n", CriticalSection);
+        DPRINT1("Couldn't allocate Debug Data for: %p\n", CriticalSection);
         return STATUS_NO_MEMORY;
     }
 
@@ -545,7 +545,7 @@
     */
     if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) {
 
-        DPRINT("Securely Inserting into ProcessLocks: %x, %x, %x\n",
+        DPRINT("Securely Inserting into ProcessLocks: %p, %p, %p\n",
                &CritcalSectionDebugData->ProcessLocksList,
                CriticalSection,
                &RtlCriticalSectionList);
@@ -561,7 +561,7 @@
 
     } else {
 
-        DPRINT("Inserting into ProcessLocks: %x, %x, %x\n",
+        DPRINT("Inserting into ProcessLocks: %p, %p, %p\n",
                &CritcalSectionDebugData->ProcessLocksList,
                CriticalSection,
                &RtlCriticalSectionList);

Modified: trunk/reactos/lib/rtl/dbgbuffer.c
--- trunk/reactos/lib/rtl/dbgbuffer.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/dbgbuffer.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -38,7 +38,7 @@
    Buf->SectionBase = Buf;
    Buf->SectionSize = SectionSize;
 
-   DPRINT("RtlCQDB: BA: %x BS: %d\n", Buf->SectionBase, Buf->SectionSize);
+   DPRINT("RtlCQDB: BA: %p BS: 0x%lx\n", Buf->SectionBase, Buf->SectionSize);
 
    return Buf;
 }
@@ -99,7 +99,7 @@
   if (!NT_SUCCESS(Status))
     {
        /* failure */
-       DPRINT("NtQueryInformationProcess 1 &x \n", Status);
+       DPRINT("NtQueryInformationProcess 1 0x%lx \n", Status);
        return Status;
     }
 
@@ -124,7 +124,7 @@
   if (!NT_SUCCESS(Status))
     {
        /* failure */
-       DPRINT("NtReadVirtualMemory 1 %x \n", Status);
+       DPRINT("NtReadVirtualMemory 1 0x%lx \n", Status);
        return Status;
     }
 
@@ -142,7 +142,7 @@
    if (!NT_SUCCESS(Status))
      {
         /* failure */
-        DPRINT("NtReadVirtualMemory 2 %x \n", Status);
+        DPRINT("NtReadVirtualMemory 2 0x%lx \n", Status);
         return Status;
      }
 
@@ -173,7 +173,7 @@
    if (!NT_SUCCESS(Status))
      {
         /* failure */
-        DPRINT( "NtReadVirtualMemory 3 %x \n", Status);
+        DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
         return Status;
      }
 
@@ -307,7 +307,7 @@
     }
 
    DPRINT("QueryProcessDebugInformation end \n");
-   DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+   DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
 }
 else
 {
@@ -391,7 +391,7 @@
     }
 
    DPRINT("QueryProcessDebugInformation end \n");
-   DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+   DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
 }
    return Status;
 

Modified: trunk/reactos/lib/rtl/dos8dot3.c
--- trunk/reactos/lib/rtl/dos8dot3.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/dos8dot3.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -80,7 +80,7 @@
    CHAR c;
 
    StrLength = Name->Length / sizeof(WCHAR);
-   DPRINT("StrLength: %hu\n", StrLength);
+   DPRINT("StrLength: %lu\n", StrLength);
 
    /* Find last dot in Name */
    DotPos = 0;
@@ -96,7 +96,7 @@
    {
       DotPos = i;
    }
-   DPRINT("DotPos: %hu\n", DotPos);
+   DPRINT("DotPos: %lu\n", DotPos);
 
    /* Copy name (6 valid characters max) */
    for (i = 0, NameLength = 0; NameLength < 6 && i < DotPos; i++)
@@ -114,7 +114,7 @@
    }
 
    DPRINT("NameBuffer: '%.08S'\n", NameBuffer);
-   DPRINT("NameLength: %hu\n", NameLength);
+   DPRINT("NameLength: %lu\n", NameLength);
 
    /* Copy extension (4 valid characters max) */
    if (DotPos < StrLength)
@@ -138,7 +138,7 @@
       ExtLength = 0;
    }
    DPRINT("ExtBuffer: '%.04S'\n", ExtBuffer);
-   DPRINT("ExtLength: %hu\n", ExtLength);
+   DPRINT("ExtLength: %lu\n", ExtLength);
 
    /* Determine next index */
    IndexLength = RtlpGetIndexLength(Context->LastIndexValue);
@@ -153,7 +153,7 @@
       Checksum = 0;
    }
 
-   DPRINT("CopyLength: %hu\n", CopyLength);
+   DPRINT("CopyLength: %lu\n", CopyLength);
 
    if ((Context->NameLength == CopyLength) &&
          (wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) &&
@@ -181,7 +181,7 @@
 
    IndexLength = RtlpGetIndexLength(Context->LastIndexValue);
 
-   DPRINT("CurrentIndex: %hu, IndexLength %hu\n", Context->LastIndexValue, IndexLength);
+   DPRINT("CurrentIndex: %lu, IndexLength %lu\n", Context->LastIndexValue, IndexLength);
 
    if (Context->CheckSumInserted)
    {

Modified: trunk/reactos/lib/rtl/exception.c
--- trunk/reactos/lib/rtl/exception.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/exception.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -72,7 +72,7 @@
 {
     EXCEPTION_RECORD ExceptionRecord;
     CONTEXT Context;
-    DPRINT1("RtlRaiseStatus(Status 0x%.08x)\n", Status);
+    DPRINT1("RtlRaiseStatus(Status 0x%.08lx)\n", Status);
 
      /* Capture the context */
     RtlCaptureContext(&Context);

Modified: trunk/reactos/lib/rtl/handle.c
--- trunk/reactos/lib/rtl/handle.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/handle.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -168,12 +168,12 @@
 {
    PRTL_HANDLE_TABLE_ENTRY InternalHandle;
 
-   DPRINT("RtlIsValidIndexHandle(HandleTable %p Index %x Handle %p)\n", HandleTable, Index, Handle);
+   DPRINT("RtlIsValidIndexHandle(HandleTable %p Index 0x%lx Handle %p)\n", HandleTable, Index, Handle);
 
    if (HandleTable == NULL)
      return FALSE;
 
-   DPRINT("Handles %p HandleSize %x\n",
+   DPRINT("Handles %p HandleSize 0x%lx\n",
 	  HandleTable->CommittedHandles, HandleTable->SizeOfHandleTableEntry);
 
    InternalHandle = (PRTL_HANDLE_TABLE_ENTRY)((ULONG_PTR)HandleTable->CommittedHandles +

Modified: trunk/reactos/lib/rtl/heap.c
--- trunk/reactos/lib/rtl/heap.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/heap.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -206,7 +206,7 @@
    HEAP *heapPtr = (HEAP *)heap;
    if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
    {
-      DPRINT("Invalid heap %08x!\n", heap );
+      DPRINT("Invalid heap %p!\n", heap );
       return NULL;
    }
    if (TRACE_ON(heap) && !HEAP_IsRealArena( heap, 0, NULL, NOISY ))
@@ -821,7 +821,7 @@
       if (*((ARENA_FREE **)((char *)(pArena + 1) +
                             (pArena->size & ARENA_SIZE_MASK)) - 1) != pArena)
       {
-         DPRINT("Heap %p: arena %p has wrong back ptr %p\n",
+         DPRINT("Heap %p: arena %p has wrong back ptr %lx\n",
                 subheap->heap, pArena,
                 *((PULONG)((char *)(pArena+1)+ (pArena->size & ARENA_SIZE_MASK)) - 1));
          return FALSE;
@@ -994,7 +994,7 @@
 
    if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
    {
-      DPRINT("Invalid heap %08x!\n", heap );
+      DPRINT("Invalid heap %p!\n", heap );
       return FALSE;
    }
 
@@ -1138,7 +1138,7 @@
    ULONG flags;
    HEAP **pptr;
 
-   DPRINT("%08x\n", heap );
+   DPRINT("%p\n", heap );
    if (!heapPtr)
       return heap;
 
@@ -1216,7 +1216,7 @@
 
    if (!(pArena = HEAP_FindFreeBlock( heapPtr, size, &subheap )))
    {
-      DPRINT("(%08x,%08lx,%08lx): returning NULL\n",
+      DPRINT("(%p,%08lx,%08lx): returning NULL\n",
             heap, flags, size  );
       if (!(flags & HEAP_NO_SERIALIZE))
          RtlLeaveHeapLock( &heapPtr->critSection );
@@ -1250,7 +1250,7 @@
    if (!(flags & HEAP_NO_SERIALIZE))
       RtlLeaveHeapLock( &heapPtr->critSection );
 
-   DPRINT("(%08x,%08lx,%08lx): returning %p\n",
+   DPRINT("(%p,%08lx,%08lx): returning %p\n",
          heap, flags, size, (PVOID)(pInUse + 1) );
    return (PVOID)(pInUse + 1);
 }
@@ -1280,7 +1280,7 @@
       return FALSE;
    if (!ptr)  /* Freeing a NULL ptr is doesn't indicate an error in Win2k */
    {
-      DPRINT("(%08x,%08lx,%p): asked to free NULL\n",
+      DPRINT("(%p,%08lx,%p): asked to free NULL\n",
            heap, flags, ptr );
       return TRUE;
    }
@@ -1293,7 +1293,7 @@
    {
       if (!(flags & HEAP_NO_SERIALIZE))
          RtlLeaveHeapLock( &heapPtr->critSection );
-      DPRINT("(%08x,%08lx,%p): returning FALSE\n",
+      DPRINT("(%p,%08lx,%p): returning FALSE\n",
             heap, flags, ptr );
       return FALSE;
    }
@@ -1307,7 +1307,7 @@
    if (!(flags & HEAP_NO_SERIALIZE))
       RtlLeaveHeapLock( &heapPtr->critSection );
 
-   DPRINT("(%08x,%08lx,%p): returning TRUE\n",
+   DPRINT("(%p,%08lx,%p): returning TRUE\n",
          heap, flags, ptr );
    return TRUE;
 }
@@ -1359,7 +1359,7 @@
    {
       if (!(Flags & HEAP_NO_SERIALIZE))
          RtlLeaveHeapLock( &heapPtr->critSection );
-      DPRINT("(%08x,%08lx,%p,%08lx): returning NULL\n",
+      DPRINT("(%p,%08lx,%p,%08lx): returning NULL\n",
             Heap, Flags, Ptr, Size );
       if (Flags & HEAP_GENERATE_EXCEPTIONS)
          RtlRaiseStatus( STATUS_NO_MEMORY );
@@ -1452,7 +1452,7 @@
    if (!(Flags & HEAP_NO_SERIALIZE))
       RtlLeaveHeapLock( &heapPtr->critSection );
 
-   DPRINT("(%08x,%08lx,%p,%08lx): returning %p\n",
+   DPRINT("(%p,%08lx,%p,%08lx): returning %p\n",
          Heap, Flags, Ptr, Size, (PVOID)(pArena + 1) );
    return (PVOID)(pArena + 1);
 }
@@ -1561,7 +1561,7 @@
    if (!(Flags & HEAP_NO_SERIALIZE))
       RtlLeaveHeapLock( &heapPtr->critSection );
 
-   DPRINT("(%08x,%08lx,%p): returning %08lx\n",
+   DPRINT("(%p,%08lx,%p): returning %08lx\n",
          Heap, Flags, Ptr, ret );
    return ret;
 }

Modified: trunk/reactos/lib/rtl/i386/exception.c
--- trunk/reactos/lib/rtl/i386/exception.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/i386/exception.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -61,7 +61,7 @@
     /* Get the current stack limits and registration frame */
     RtlpGetStackLimits(&StackLow, &StackHigh);
     RegistrationFrame = RtlpGetExceptionList();
-    DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame);
+    DPRINT("RegistrationFrame is 0x%p\n", RegistrationFrame);
 
     /* Now loop every frame */
     while (RegistrationFrame != EXCEPTION_CHAIN_END)
@@ -105,7 +105,7 @@
                                                      Context,
                                                      &DispatcherContext,
                                                      RegistrationFrame->Handler);
-        DPRINT("Handler returned: %lx\n", ReturnValue);
+        DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
 
         /* Check if this is a nested frame */
         if (RegistrationFrame == NestedFrame)
@@ -188,7 +188,7 @@
     ULONG_PTR RegistrationFrameEnd;
     CONTEXT LocalContext;
     PCONTEXT Context;
-    DPRINT("RtlUnwind(). RegistrationFrame 0x%X\n", RegistrationFrame);
+    DPRINT("RtlUnwind(). RegistrationFrame 0x%p\n", RegistrationFrame);
 
     /* Get the current stack limits */
     RtlpGetStackLimits(&StackLow, &StackHigh);
@@ -242,7 +242,7 @@
     /* Now loop every frame */
     while (RegistrationFrame2 != EXCEPTION_CHAIN_END)
     {
-        DPRINT("RegistrationFrame is 0x%X\n", RegistrationFrame2);
+        DPRINT("RegistrationFrame is 0x%p\n", RegistrationFrame2);
 
         /* If this is the target */
         if (RegistrationFrame2 == RegistrationFrame)
@@ -304,7 +304,7 @@
                                                       Context,
                                                       &DispatcherContext,
                                                       RegistrationFrame2->Handler);
-            DPRINT("Handler returned: %lx\n", ReturnValue);
+            DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
 
             /* Handle the dispositions */
             if (ReturnValue == ExceptionContinueSearch)

Modified: trunk/reactos/lib/rtl/image.c
--- trunk/reactos/lib/rtl/image.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/image.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -26,7 +26,7 @@
   if (DosHeader && DosHeader->e_magic != IMAGE_DOS_SIGNATURE)
     {
       DPRINT1("DosHeader->e_magic %x\n", DosHeader->e_magic);
-      DPRINT1("NtHeader 0x%p\n", ((ULONG_PTR)BaseAddress + DosHeader->e_lfanew));
+      DPRINT1("NtHeader 0x%lx\n", ((ULONG_PTR)BaseAddress + DosHeader->e_lfanew));
     }
 
   if (DosHeader && DosHeader->e_magic == IMAGE_DOS_SIGNATURE)

Modified: trunk/reactos/lib/rtl/message.c
--- trunk/reactos/lib/rtl/message.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/message.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -28,7 +28,7 @@
    PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
    PRTL_MESSAGE_RESOURCE_DATA MessageTable;
    NTSTATUS Status;
-   ULONG EntryOffset, IdOffset = 0;
+   ULONG EntryOffset = 0, IdOffset = 0;
    PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry;
    ULONG i;
 
@@ -151,7 +151,7 @@
 {
   DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n",
 	  Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE",
-	  ArgumentIsArray ? "TRUE" : "FALSE", Arguments, Buffer, BufferSize);
+	  ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer, BufferSize);
 
   UNIMPLEMENTED;
   return STATUS_NOT_IMPLEMENTED;

Modified: trunk/reactos/lib/rtl/path.c
--- trunk/reactos/lib/rtl/path.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/path.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -205,7 +205,7 @@
 	    cd->DosPath.Buffer[Length - 2] != L':')
 		Length--;
 
-	DPRINT ("cd->DosPath.Buffer %S Length %d\n",
+	DPRINT ("cd->DosPath.Buffer %S Length %lu\n",
 	        cd->DosPath.Buffer, Length);
 
 	if (MaximumLength / sizeof(WCHAR) > Length)

Modified: trunk/reactos/lib/rtl/process.c
--- trunk/reactos/lib/rtl/process.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/process.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -76,7 +76,7 @@
     ULONG Size;
     PWCHAR Environment = 0;
     
-    DPRINT("RtlpInitEnvironment (hProcess: %lx, Peb: %p Params: %p)\n",
+    DPRINT("RtlpInitEnvironment (hProcess: %p, Peb: %p Params: %p)\n",
             ProcessHandle, Peb, ProcessParameters);
             
     /* Give the caller 1MB if he requested it */
@@ -134,7 +134,7 @@
     }
     
     DPRINT("EnvironmentPointer %p\n", BaseAddress);
-    DPRINT("Ppb->MaximumLength %x\n", ProcessParameters->MaximumLength);
+    DPRINT("Ppb->MaximumLength 0x%lx\n", ProcessParameters->MaximumLength);
 
     /* Now allocate space for the Parameter Block */
     BaseAddress = NULL;
@@ -333,7 +333,7 @@
 
   if(!NT_SUCCESS(Status))
   {
-    DPRINT1("Failed to receive the process cookie! Status: 0x%x\n", Status);
+    DPRINT1("Failed to receive the process cookie! Status: 0x%lx\n", Status);
     return Pointer;
   }
 

Modified: trunk/reactos/lib/rtl/registry.c
--- trunk/reactos/lib/rtl/registry.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/registry.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -893,7 +893,7 @@
 				 &KeyHandle);
   if (!NT_SUCCESS(Status))
   {
-    DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%x\n", Status);
+    DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%lx\n", Status);
     return(Status);
   }
 
@@ -908,7 +908,7 @@
 			 ValueLength);
   if (!NT_SUCCESS(Status))
   {
-    DPRINT1("ZwSetValueKey() failed! Status: 0x%x\n", Status);
+    DPRINT1("ZwSetValueKey() failed! Status: 0x%lx\n", Status);
   }
 
   ZwClose(KeyHandle);

Modified: trunk/reactos/lib/rtl/thread.c
--- trunk/reactos/lib/rtl/thread.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/thread.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -104,7 +104,7 @@
         UseGuard = TRUE;
     }
     
-    DPRINT("AllocatedBase: %p, StackBase: %p, Stack: %p, StackCommit: %lx\n",
+    DPRINT("AllocatedBase: %p, StackBase: %p, Stack: %lx, StackCommit: %lx\n",
             InitialTeb->AllocatedStackBase, InitialTeb->StackBase, Stack,
             StackCommit);
     
@@ -123,7 +123,7 @@
     
     /* Now set the current Stack Limit */
     InitialTeb->StackLimit = (PVOID)Stack;
-    DPRINT("StackLimit: %p\n", Stack);
+    DPRINT("StackLimit: %lx\n", Stack);
     
     /* Create a guard page */
     if (UseGuard)
@@ -146,7 +146,7 @@
         /* Update the Stack Limit keeping in mind the Guard Page */
         InitialTeb->StackLimit = (PVOID)((ULONG_PTR)InitialTeb->StackLimit -
                                          GuardPageSize);
-        DPRINT1("StackLimit: %p\n", Stack);   
+        DPRINT1("StackLimit: %lx\n", Stack);   
     }
     
     /* We are done! */
@@ -192,9 +192,9 @@
     OBJECT_ATTRIBUTES ObjectAttributes;
     CONTEXT Context;
     
-    DPRINT("RtlCreateUserThread: (hProcess: %lx, Suspended: %lx,"
+    DPRINT("RtlCreateUserThread: (hProcess: %p, Suspended: %d,"
             "ZeroBits: %lx, StackReserve: %lx, StackCommit: %lx,"
-            "StartAddress: %p, Parameter: %lx)\n", ProcessHandle,
+            "StartAddress: %p, Parameter: %p)\n", ProcessHandle,
             CreateSuspended, StackZeroBits, StackReserve, StackCommit,
             StartAddress, Parameter);
     
@@ -240,7 +240,7 @@
     }
     else
     {
-        DPRINT("Thread created: %lx\n", Handle);
+        DPRINT("Thread created: %p\n", Handle);
         if (ThreadHandle) *ThreadHandle = Handle;
         if (ClientId) *ClientId = ThreadCid;
     }
@@ -261,7 +261,7 @@
                      IN PTHREAD_START_ROUTINE ThreadStartAddress,
                      IN PINITIAL_TEB InitialTeb)
 {
-    DPRINT("RtlInitializeContext: (hProcess: %lx, ThreadContext: %p, Teb: %p\n",
+    DPRINT("RtlInitializeContext: (hProcess: %p, ThreadContext: %p, Teb: %p\n",
             ProcessHandle, ThreadContext, InitialTeb);
 
     /* 

Modified: trunk/reactos/lib/rtl/unicodeprefix.c
--- trunk/reactos/lib/rtl/unicodeprefix.c	2005-12-08 23:44:05 UTC (rev 19983)
+++ trunk/reactos/lib/rtl/unicodeprefix.c	2005-12-08 23:44:31 UTC (rev 19984)
@@ -175,7 +175,7 @@
     /* Loop every entry which has valid entries */
     while (CurrentEntry->NameLength)
     {
-        DPRINT("CurrentEntry->NameLength %lx\n", CurrentEntry->NameLength);
+        DPRINT("CurrentEntry->NameLength 0x%x\n", CurrentEntry->NameLength);
 
         /* Get the splay links and loop */
         SplayLinks = &CurrentEntry->Links;
@@ -189,7 +189,7 @@
 
             /* Do the comparison */
             Result = CompareUnicodeStrings(Entry->Prefix, FullName, 0);
-            DPRINT("Result %lx\n", Result);
+            DPRINT("Result 0x%x\n", Result);
             if (Result == GenericGreaterThan)
             {
                 /* Prefix is greater, so restart on the left child */