Use correct format for arguments in debug messages
Modified: trunk/reactos/lib/ntdll/csr/connect.c
Modified: trunk/reactos/lib/ntdll/ldr/startup.c
Modified: trunk/reactos/lib/ntdll/ldr/utils.c

Modified: trunk/reactos/lib/ntdll/csr/connect.c
--- trunk/reactos/lib/ntdll/csr/connect.c	2005-12-08 23:55:40 UTC (rev 19989)
+++ trunk/reactos/lib/ntdll/csr/connect.c	2005-12-09 00:18:28 UTC (rev 19990)
@@ -67,7 +67,7 @@
     //ApiMessage->Opcode = ApiNumber; <- Activate with new CSR
     ApiMessage->CsrCaptureData = NULL;
 
-    DPRINT("API: %x, u1.s1.DataLength: %x, u1.s1.TotalLength: %x\n", 
+    DPRINT("API: %lx, u1.s1.DataLength: %x, u1.s1.TotalLength: %x\n", 
            ApiNumber,
            ApiMessage->Header.u1.s1.DataLength,
            ApiMessage->Header.u1.s1.TotalLength);
@@ -94,15 +94,15 @@
             while (PointerCount--)
             {
                 /* Get this pointer and check if it's valid */
-                DPRINT("Array Address: %p. This pointer: %p. Data: %p\n",
+                DPRINT("Array Address: %p. This pointer: %p. Data: %lx\n",
                         &Pointers, Pointers, *Pointers);
                 if ((CurrentPointer = *Pointers++))
                 {
                     /* Update it */
-                    DPRINT("CurrentPointer: %p.\n", *(PULONG_PTR)CurrentPointer);
+                    DPRINT("CurrentPointer: %lx.\n", *(PULONG_PTR)CurrentPointer);
                     *(PULONG_PTR)CurrentPointer += CsrPortMemoryDelta;
                     Pointers[-1] = CurrentPointer - (ULONG_PTR)ApiMessage;
-                    DPRINT("CurrentPointer: %p.\n", *(PULONG_PTR)CurrentPointer);
+                    DPRINT("CurrentPointer: %lx.\n", *(PULONG_PTR)CurrentPointer);
                 }
             }
         }
@@ -164,7 +164,7 @@
     }
 
     /* Return the CSR Result */
-    DPRINT("Got back: %x\n", ApiMessage->Status);
+    DPRINT("Got back: 0x%lx\n", ApiMessage->Status);
     return ApiMessage->Status;
 }
 
@@ -433,7 +433,7 @@
     }
 
     /* Let the caller know if this was server to server */
-    DPRINT("Status was: %lx. Are we in server: %lx\n", Status, InsideCsrProcess);
+    DPRINT("Status was: 0x%lx. Are we in server: 0x%x\n", Status, InsideCsrProcess);
     if (ServerToServerCall) *ServerToServerCall = InsideCsrProcess;
     return Status;
 }

Modified: trunk/reactos/lib/ntdll/ldr/startup.c
--- trunk/reactos/lib/ntdll/ldr/startup.c	2005-12-08 23:55:40 UTC (rev 19989)
+++ trunk/reactos/lib/ntdll/ldr/startup.c	2005-12-09 00:18:28 UTC (rev 19990)
@@ -110,7 +110,7 @@
             if (NT_SUCCESS(Status))
               {
                 Peb->NtGlobalFlag |= Value;
-	        DPRINT("GlobalFlag: Key='%S', Value=%08x\n", ValueBuffer, Value);
+	        DPRINT("GlobalFlag: Key='%S', Value=0x%lx\n", ValueBuffer, Value);
               }
 	  }
         /*
@@ -260,9 +260,9 @@
    if (NtCurrentPeb()->Ldr == NULL || NtCurrentPeb()->Ldr->Initialized == FALSE)
      {
        Peb = NtCurrentPeb();
-       DPRINT("Peb %x\n", Peb);
+       DPRINT("Peb %p\n", Peb);
        ImageBase = Peb->ImageBaseAddress;
-       DPRINT("ImageBase %x\n", ImageBase);
+       DPRINT("ImageBase %p\n", ImageBase);
        if (ImageBase <= (PVOID)0x1000)
          {
            DPRINT("ImageBase is null\n");
@@ -271,7 +271,7 @@
 
        /*  If MZ header exists  */
        PEDosHeader = (PIMAGE_DOS_HEADER) ImageBase;
-       DPRINT("PEDosHeader %x\n", PEDosHeader);
+       DPRINT("PEDosHeader %p\n", PEDosHeader);
 
        if (PEDosHeader->e_magic != IMAGE_DOS_SIGNATURE ||
            PEDosHeader->e_lfanew == 0L ||

Modified: trunk/reactos/lib/ntdll/ldr/utils.c
--- trunk/reactos/lib/ntdll/ldr/utils.c	2005-12-08 23:55:40 UTC (rev 19989)
+++ trunk/reactos/lib/ntdll/ldr/utils.c	2005-12-09 00:18:28 UTC (rev 19990)
@@ -534,7 +534,7 @@
                          &ObjectAttributes);
   if (!NT_SUCCESS(Status))
     {
-      DPRINT("NtOpenSection() failed for '%wZ' (Status %lx)\n", DllName, Status);
+      DPRINT("NtOpenSection() failed for '%wZ' (Status 0x%08lx)\n", DllName, Status);
       return Status;
     }
 
@@ -639,7 +639,7 @@
                       FILE_SYNCHRONOUS_IO_NONALERT);
   if (!NT_SUCCESS(Status))
     {
-      DPRINT1("Dll open of %wZ failed: Status = 0x%08x\n",
+      DPRINT1("Dll open of %wZ failed: Status = 0x%08lx\n",
                &FullNtFileName, Status);
       RtlFreeUnicodeString (&FullNtFileName);
       return Status;
@@ -657,7 +657,7 @@
                       NULL);
   if (!NT_SUCCESS(Status))
     {
-      DPRINT("Dll header read failed: Status = 0x%08x\n", Status);
+      DPRINT("Dll header read failed: Status = 0x%08lx\n", Status);
       NtClose(FileHandle);
       return Status;
     }
@@ -694,7 +694,7 @@
 
   if (!NT_SUCCESS(Status))
     {
-      DPRINT("NTDLL create section failed: Status = 0x%08x\n", Status);
+      DPRINT("NTDLL create section failed: Status = 0x%08lx\n", Status);
       return Status;
     }
 
@@ -1031,7 +1031,7 @@
                         ExportDir->AddressOfFunctions
                         );
         DPRINT(
-                "LdrGetExportByOrdinal(Ordinal %d) = %p\n",
+                "LdrGetExportByOrdinal(Ordinal %lu) = %p\n",
                 Ordinal,
                 RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] )
                 );
@@ -1083,7 +1083,7 @@
    LONG minn, maxn;
    ULONG ExportDirSize;
 
-   DPRINT("LdrGetExportByName %x %s %hu\n", BaseAddress, SymbolName, Hint);
+   DPRINT("LdrGetExportByName %p %s %hu\n", BaseAddress, SymbolName, Hint);
 
    ExportDir = (PIMAGE_EXPORT_DIRECTORY)
      RtlImageDirectoryEntryToData(BaseAddress,
@@ -1453,7 +1453,7 @@
    PCHAR Name;
    ULONG Size;
 
-   DPRINT("LdrpProcessImportDirectory(%x '%wZ', '%s')\n",
+   DPRINT("LdrpProcessImportDirectory(%p '%wZ', '%s')\n",
           Module, &Module->BaseDllName, ImportedName);
 
 
@@ -1507,7 +1507,7 @@
    PCHAR Name;
    ULONG Size;
 
-   DPRINT("LdrpAdjustImportDirectory(Module %x '%wZ', %x '%wZ', %x '%s')\n",
+   DPRINT("LdrpAdjustImportDirectory(Module %p '%wZ', %p '%wZ', '%s')\n",
           Module, &Module->BaseDllName, ImportedModule, &ImportedModule->BaseDllName, ImportedName);
 
    ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR)
@@ -1626,7 +1626,7 @@
    PCHAR ImportedName;
    ULONG Size;
 
-   DPRINT("LdrFixupImports(SearchPath %x, Module %x)\n", SearchPath, Module);
+   DPRINT("LdrFixupImports(SearchPath %S, Module %p)\n", SearchPath, Module);
 
    /* Check for tls data */
    TlsDirectory = (PIMAGE_TLS_DIRECTORY)
@@ -1669,7 +1669,7 @@
      }
    if (BoundImportDescriptor)
      {
-       DPRINT("BoundImportDescriptor %x\n", BoundImportDescriptor);
+       DPRINT("BoundImportDescriptor %p\n", BoundImportDescriptor);
 
        BoundImportDescriptorCurrent = BoundImportDescriptor;
        while (BoundImportDescriptorCurrent->OffsetModuleName)
@@ -1794,7 +1794,7 @@
      }
    else if (ImportModuleDirectory)
      {
-       DPRINT("ImportModuleDirectory %x\n", ImportModuleDirectory);
+       DPRINT("ImportModuleDirectory %p\n", ImportModuleDirectory);
 
        ImportModuleDirectoryCurrent = ImportModuleDirectory;
        while (ImportModuleDirectoryCurrent->Name)
@@ -1873,8 +1873,8 @@
    PIMAGE_NT_HEADERS    NTHeaders;
    PLDR_DATA_TABLE_ENTRY tmpModule;
 
-   DPRINT("LdrPEStartup(ImageBase %x SectionHandle %x)\n",
-           ImageBase, (ULONG)SectionHandle);
+   DPRINT("LdrPEStartup(ImageBase %p SectionHandle %p)\n",
+           ImageBase, SectionHandle);
 
    /*
     * Overlay DOS and WNT headers structures
@@ -1952,14 +1952,14 @@
    /*
     * Compute the DLL's entry point's address.
     */
-   DPRINT("ImageBase = %x\n",(ULONG)ImageBase);
-   DPRINT("AddressOfEntryPoint = %x\n",(ULONG)NTHeaders->OptionalHeader.AddressOfEntryPoint);
+   DPRINT("ImageBase = %p\n", ImageBase);
+   DPRINT("AddressOfEntryPoint = 0x%lx\n",(ULONG)NTHeaders->OptionalHeader.AddressOfEntryPoint);
    if (NTHeaders->OptionalHeader.AddressOfEntryPoint != 0)
      {
         EntryPoint = (PEPFUNC) ((ULONG_PTR)ImageBase
                            + NTHeaders->OptionalHeader.AddressOfEntryPoint);
      }
-   DPRINT("LdrPEStartup() = %x\n",EntryPoint);
+   DPRINT("LdrPEStartup() = %p\n",EntryPoint);
    return EntryPoint;
 }
 
@@ -2032,7 +2032,7 @@
                                     PAGE_READONLY);
         if (!NT_SUCCESS(Status))
           {
-            DPRINT1("map view of section failed (Status %x)\n", Status);
+            DPRINT1("map view of section failed (Status 0x%08lx)\n", Status);
             RtlFreeUnicodeString(&FullDosName);
             NtClose(SectionHandle);
             return(Status);
@@ -2069,7 +2069,7 @@
          * relocation. */
         if (ImageBase != (PVOID) NtHeaders->OptionalHeader.ImageBase)
           {
-            DPRINT1("Relocating (%x -> %x) %wZ\n",
+            DPRINT1("Relocating (%lx -> %p) %wZ\n",
               NtHeaders->OptionalHeader.ImageBase, ImageBase, &FullDosName);
             Status = LdrPerformRelocations(NtHeaders, ImageBase);
             if (!NT_SUCCESS(Status))
@@ -2254,7 +2254,7 @@
     PLDR_DATA_TABLE_ENTRY Module;
     NTSTATUS Status;
 
-    DPRINT("LdrDisableThreadCalloutsForDll (BaseAddress %x)\n", BaseAddress);
+    DPRINT("LdrDisableThreadCalloutsForDll (BaseAddress %p)\n", BaseAddress);
 
     Status = STATUS_DLL_NOT_FOUND;
     RtlEnterCriticalSection (NtCurrentPeb()->LoaderLock);
@@ -2264,7 +2264,7 @@
       {
         Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList);
 
-        DPRINT("BaseDllName %wZ BaseAddress %x\n", &Module->BaseDllName, Module->DllBase);
+        DPRINT("BaseDllName %wZ BaseAddress %p\n", &Module->BaseDllName, Module->DllBase);
 
         if (Module->DllBase == BaseAddress)
           {
@@ -2300,7 +2300,7 @@
     if (DllName == NULL)
       {
         *DllHandle = ExeModule->DllBase;
-        DPRINT("BaseAddress %x\n", *DllHandle);
+        DPRINT("BaseAddress 0x%lx\n", *DllHandle);
         return STATUS_SUCCESS;
       }
 
@@ -2335,7 +2335,7 @@
        TRACE_LDR("LdrGetProcedureAddress by ORDINAL - %d\n", Ordinal);
      }
 
-   DPRINT("LdrGetProcedureAddress (BaseAddress %x Name %Z Ordinal %lu ProcedureAddress %x)\n",
+   DPRINT("LdrGetProcedureAddress (BaseAddress %p Name %Z Ordinal %lu ProcedureAddress %p)\n",
           BaseAddress, Name, Ordinal, ProcedureAddress);
 
    if (Name && Name->Length)
@@ -2357,7 +2357,7 @@
          {
            return STATUS_SUCCESS;
          }
-       DPRINT("LdrGetProcedureAddress: Can't resolve symbol @%d\n", Ordinal);
+       DPRINT("LdrGetProcedureAddress: Can't resolve symbol @%lu\n", Ordinal);
      }
    return STATUS_PROCEDURE_NOT_FOUND;
 }