Use correct format for arguments in debug messages
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 8 Dec 2005 23:44:31 +0000 (23:44 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Thu, 8 Dec 2005 23:44:31 +0000 (23:44 +0000)
svn path=/trunk/; revision=19984

14 files changed:
reactos/lib/rtl/critical.c
reactos/lib/rtl/dbgbuffer.c
reactos/lib/rtl/dos8dot3.c
reactos/lib/rtl/exception.c
reactos/lib/rtl/handle.c
reactos/lib/rtl/heap.c
reactos/lib/rtl/i386/exception.c
reactos/lib/rtl/image.c
reactos/lib/rtl/message.c
reactos/lib/rtl/path.c
reactos/lib/rtl/process.c
reactos/lib/rtl/registry.c
reactos/lib/rtl/thread.c
reactos/lib/rtl/unicodeprefix.c

index 43494f3..5e920b6 100644 (file)
@@ -63,14 +63,14 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection)
                 RtlRaiseStatus(Status);\r
                 return;\r
         }\r
-        DPRINT("Created Event: %x \n", hNewEvent);\r
+        DPRINT("Created Event: %p \n", hNewEvent);\r
 \r
         if ((hEvent = InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,\r
                                                          (PVOID)hNewEvent,\r
                                                          0))) {\r
 \r
             /* Some just created an event */\r
-            DPRINT("Closing already created event: %x\n", hNewEvent);\r
+            DPRINT("Closing already created event: %p\n", hNewEvent);\r
             NtClose(hNewEvent);\r
         }\r
     }\r
@@ -114,7 +114,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
     }\r
 \r
     /* Increase the Debug Entry count */\r
-    DPRINT("Waiting on Critical Section Event: %x %x\n",\r
+    DPRINT("Waiting on Critical Section Event: %p %p\n",\r
             CriticalSection,\r
             CriticalSection->LockSemaphore);\r
     CriticalSection->DebugInfo->EntryCount++;\r
@@ -135,7 +135,7 @@ RtlpWaitForCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
             /* Is this the 2nd time we've timed out? */\r
             if (LastChance) {\r
 \r
-                DPRINT1("Deadlock: %x\n", CriticalSection);\r
+                DPRINT1("Deadlock: %p\n", CriticalSection);\r
 \r
                 /* Yes it is, we are raising an exception */\r
                 ExceptionRecord.ExceptionCode    = STATUS_POSSIBLE_DEADLOCK;\r
@@ -186,7 +186,7 @@ RtlpUnWaitCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
     }\r
 \r
     /* Signal the Event */\r
-    DPRINT("Signaling Critical Section Event: %x, %x\n",\r
+    DPRINT("Signaling Critical Section Event: %p, %p\n",\r
             CriticalSection,\r
             CriticalSection->LockSemaphore);\r
     Status = NtSetEvent(CriticalSection->LockSemaphore, NULL);\r
@@ -194,7 +194,7 @@ RtlpUnWaitCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
     if (!NT_SUCCESS(Status)) {\r
 \r
         /* We've failed */\r
-        DPRINT1("Signaling Failed for: %x, %x, %x\n",\r
+        DPRINT1("Signaling Failed for: %p, %p, 0x%08lx\n",\r
                 CriticalSection,\r
                 CriticalSection->LockSemaphore,\r
                Status);\r
@@ -261,7 +261,7 @@ RtlpAllocateDebugInfo(VOID)
         if (!RtlpDebugInfoFreeList[i]) {\r
 \r
             /* Mark entry in use */\r
-            DPRINT("Using entry: %d. Buffer: %x\n", i, &RtlpStaticDebugInfo[i]);\r
+            DPRINT("Using entry: %lu. Buffer: %p\n", i, &RtlpStaticDebugInfo[i]);\r
             RtlpDebugInfoFreeList[i] = TRUE;\r
 \r
             /* Use free entry found */\r
@@ -307,7 +307,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
 \r
         /* Mark as free */\r
         EntryId = (DebugInfo - RtlpStaticDebugInfo);\r
-        DPRINT("Freeing from Buffer: %x. Entry: %d inside Process: %x\n",\r
+        DPRINT("Freeing from Buffer: %p. Entry: %lu inside Process: %p\n",\r
                DebugInfo,\r
                EntryId,\r
                NtCurrentTeb()->Cid.UniqueProcess);\r
@@ -316,7 +316,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
     } else {\r
 \r
         /* It's a dynamic one, so free from the heap */\r
-        DPRINT("Freeing from Heap: %x inside Process: %x\n",\r
+        DPRINT("Freeing from Heap: %p inside Process: %p\n",\r
                DebugInfo,\r
                NtCurrentTeb()->Cid.UniqueProcess);\r
         RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo);\r
@@ -346,7 +346,7 @@ RtlDeleteCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
 {\r
     NTSTATUS Status = STATUS_SUCCESS;\r
 \r
-    DPRINT("Deleting Critical Section: %x\n", CriticalSection);\r
+    DPRINT("Deleting Critical Section: %p\n", CriticalSection);\r
     /* Close the Event Object Handle if it exists */\r
     if (CriticalSection->LockSemaphore) {\r
 \r
@@ -511,7 +511,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
     PRTL_CRITICAL_SECTION_DEBUG CritcalSectionDebugData;\r
 \r
     /* First things first, set up the Object */\r
-    DPRINT("Initializing Critical Section: %x\n", CriticalSection);\r
+    DPRINT("Initializing Critical Section: %p\n", CriticalSection);\r
     CriticalSection->LockCount = -1;\r
     CriticalSection->RecursionCount = 0;\r
     CriticalSection->OwningThread = 0;\r
@@ -520,14 +520,14 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
 \r
     /* Allocate the Debug Data */\r
     CritcalSectionDebugData = RtlpAllocateDebugInfo();\r
-    DPRINT("Allocated Debug Data: %x inside Process: %x\n",\r
+    DPRINT("Allocated Debug Data: %p inside Process: %p\n",\r
            CritcalSectionDebugData,\r
            NtCurrentTeb()->Cid.UniqueProcess);\r
 \r
     if (!CritcalSectionDebugData) {\r
 \r
         /* This is bad! */\r
-        DPRINT1("Couldn't allocate Debug Data for: %x\n", CriticalSection);\r
+        DPRINT1("Couldn't allocate Debug Data for: %p\n", CriticalSection);\r
         return STATUS_NO_MEMORY;\r
     }\r
 \r
@@ -545,7 +545,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
     */\r
     if ((CriticalSection != &RtlCriticalSectionLock) && (RtlpCritSectInitialized)) {\r
 \r
-        DPRINT("Securely Inserting into ProcessLocks: %x, %x, %x\n",\r
+        DPRINT("Securely Inserting into ProcessLocks: %p, %p, %p\n",\r
                &CritcalSectionDebugData->ProcessLocksList,\r
                CriticalSection,\r
                &RtlCriticalSectionList);\r
@@ -561,7 +561,7 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
 \r
     } else {\r
 \r
-        DPRINT("Inserting into ProcessLocks: %x, %x, %x\n",\r
+        DPRINT("Inserting into ProcessLocks: %p, %p, %p\n",\r
                &CritcalSectionDebugData->ProcessLocksList,\r
                CriticalSection,\r
                &RtlCriticalSectionList);\r
index e8ee5c8..5fef2cb 100644 (file)
@@ -38,7 +38,7 @@ RtlCreateQueryDebugBuffer(IN ULONG Size,
    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 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
   if (!NT_SUCCESS(Status))
     {
        /* failure */
-       DPRINT("NtQueryInformationProcess 1 &x \n", Status);
+       DPRINT("NtQueryInformationProcess 1 0x%lx \n", Status);
        return Status;
     }
 
@@ -124,7 +124,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
   if (!NT_SUCCESS(Status))
     {
        /* failure */
-       DPRINT("NtReadVirtualMemory 1 %x \n", Status);
+       DPRINT("NtReadVirtualMemory 1 0x%lx \n", Status);
        return Status;
     }
 
@@ -142,7 +142,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
    if (!NT_SUCCESS(Status))
      {
         /* failure */
-        DPRINT("NtReadVirtualMemory 2 %x \n", Status);
+        DPRINT("NtReadVirtualMemory 2 0x%lx \n", Status);
         return Status;
      }
 
@@ -173,7 +173,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
    if (!NT_SUCCESS(Status))
      {
         /* failure */
-        DPRINT( "NtReadVirtualMemory 3 %x \n", Status);
+        DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
         return Status;
      }
 
@@ -307,7 +307,7 @@ if (Pid == ProcessId)
     }
 
    DPRINT("QueryProcessDebugInformation end \n");
-   DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+   DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
 }
 else
 {
@@ -391,7 +391,7 @@ else
     }
 
    DPRINT("QueryProcessDebugInformation end \n");
-   DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+   DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
 }
    return Status;
 
index ee83b97..1194487 100644 (file)
@@ -80,7 +80,7 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
    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 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
    {
       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 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
    }
 
    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 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
       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 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
       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 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
 
    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)
    {
index e350cbf..7940dda 100644 (file)
@@ -72,7 +72,7 @@ RtlRaiseStatus(NTSTATUS Status)
 {
     EXCEPTION_RECORD ExceptionRecord;
     CONTEXT Context;
-    DPRINT1("RtlRaiseStatus(Status 0x%.08x)\n", Status);
+    DPRINT1("RtlRaiseStatus(Status 0x%.08lx)\n", Status);
 
      /* Capture the context */
     RtlCaptureContext(&Context);
index 187d75e..1e67cbc 100644 (file)
@@ -168,12 +168,12 @@ RtlIsValidIndexHandle(IN PRTL_HANDLE_TABLE HandleTable,
 {
    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 +
index f1c5bc5..c239c63 100644 (file)
@@ -206,7 +206,7 @@ HEAP_GetPtr(HANDLE heap) /* [in] Handle to the heap */
    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 @@ static BOOLEAN HEAP_ValidateFreeArena( SUBHEAP *subheap, ARENA_FREE *pArena )
       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 @@ static BOOLEAN HEAP_IsRealArena(
 
    if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
    {
-      DPRINT("Invalid heap %08x!\n", heap );
+      DPRINT("Invalid heap %p!\n", heap );
       return FALSE;
    }
 
@@ -1138,7 +1138,7 @@ RtlDestroyHeap(HANDLE heap) /* [in] Handle of heap */
    ULONG flags;
    HEAP **pptr;
 
-   DPRINT("%08x\n", heap );
+   DPRINT("%p\n", heap );
    if (!heapPtr)
       return heap;
 
@@ -1216,7 +1216,7 @@ RtlAllocateHeap(HANDLE heap,   /* [in] Handle of private heap block */
 
    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 @@ RtlAllocateHeap(HANDLE heap,   /* [in] Handle of private heap block */
    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 @@ BOOLEAN NTAPI RtlFreeHeap(
       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 @@ BOOLEAN NTAPI RtlFreeHeap(
    {
       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 @@ BOOLEAN NTAPI RtlFreeHeap(
    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 @@ PVOID NTAPI RtlReAllocateHeap(
    {
       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 @@ PVOID NTAPI RtlReAllocateHeap(
    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 @@ RtlSizeHeap(
    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;
 }
index 7317b28..fa9bb5b 100644 (file)
@@ -61,7 +61,7 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
     /* 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 @@ RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
                                                      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 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
     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 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
     /* 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 @@ RtlUnwind(PVOID RegistrationFrame OPTIONAL,
                                                       Context,
                                                       &DispatcherContext,
                                                       RegistrationFrame2->Handler);
-            DPRINT("Handler returned: %lx\n", ReturnValue);
+            DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
 
             /* Handle the dispositions */
             if (ReturnValue == ExceptionContinueSearch)
index aa782c6..0cdc54e 100644 (file)
@@ -26,7 +26,7 @@ RtlImageNtHeader (IN PVOID BaseAddress)
   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)
index c753029..8b74d3b 100644 (file)
@@ -28,7 +28,7 @@ RtlFindMessage(PVOID BaseAddress,
    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 @@ RtlFormatMessage(PWSTR Message,
 {
   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;
index 2132746..ce8c6e4 100644 (file)
@@ -205,7 +205,7 @@ RtlGetCurrentDirectory_U(ULONG MaximumLength,
            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)
index 72d3509..075d616 100644 (file)
@@ -76,7 +76,7 @@ RtlpInitEnvironment(HANDLE ProcessHandle,
     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 @@ RtlpInitEnvironment(HANDLE ProcessHandle,
     }
     
     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 @@ RtlEncodePointer(IN PVOID Pointer)
 
   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;
   }
 
index 4ded6dc..08bf006 100644 (file)
@@ -893,7 +893,7 @@ RtlWriteRegistryValue(IN ULONG RelativeTo,
                                 &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 @@ RtlWriteRegistryValue(IN ULONG RelativeTo,
                         ValueLength);
   if (!NT_SUCCESS(Status))
   {
-    DPRINT1("ZwSetValueKey() failed! Status: 0x%x\n", Status);
+    DPRINT1("ZwSetValueKey() failed! Status: 0x%lx\n", Status);
   }
 
   ZwClose(KeyHandle);
index 0ba9fc2..6c699aa 100644 (file)
@@ -104,7 +104,7 @@ RtlpCreateUserStack(HANDLE hProcess,
         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 @@ RtlpCreateUserStack(HANDLE hProcess,
     
     /* 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 @@ RtlpCreateUserStack(HANDLE hProcess,
         /* 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 @@ RtlCreateUserThread(HANDLE ProcessHandle,
     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 @@ RtlCreateUserThread(HANDLE ProcessHandle,
     }
     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 @@ RtlInitializeContext(IN HANDLE ProcessHandle,
                      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);
 
     /* 
index 7939b0c..24048a0 100644 (file)
@@ -175,7 +175,7 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
     /* 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 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
 
             /* 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 */