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
}\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
/* 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
}\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
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
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
\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
} 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
{\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
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
\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
*/\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
\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
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;
}
if (!NT_SUCCESS(Status))
{
/* failure */
- DPRINT("NtQueryInformationProcess 1 &x \n", Status);
+ DPRINT("NtQueryInformationProcess 1 0x%lx \n", Status);
return Status;
}
if (!NT_SUCCESS(Status))
{
/* failure */
- DPRINT("NtReadVirtualMemory 1 %x \n", Status);
+ DPRINT("NtReadVirtualMemory 1 0x%lx \n", Status);
return Status;
}
if (!NT_SUCCESS(Status))
{
/* failure */
- DPRINT("NtReadVirtualMemory 2 %x \n", Status);
+ DPRINT("NtReadVirtualMemory 2 0x%lx \n", Status);
return Status;
}
if (!NT_SUCCESS(Status))
{
/* failure */
- DPRINT( "NtReadVirtualMemory 3 %x \n", Status);
+ DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
return Status;
}
}
DPRINT("QueryProcessDebugInformation end \n");
- DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+ DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
}
else
{
}
DPRINT("QueryProcessDebugInformation end \n");
- DPRINT("QueryDebugInfo : %d\n", Buf->SizeOfInfo);
+ DPRINT("QueryDebugInfo : 0x%lx\n", Buf->SizeOfInfo);
}
return Status;
CHAR c;
StrLength = Name->Length / sizeof(WCHAR);
- DPRINT("StrLength: %hu\n", StrLength);
+ DPRINT("StrLength: %lu\n", StrLength);
/* Find last dot in Name */
DotPos = 0;
{
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++)
}
DPRINT("NameBuffer: '%.08S'\n", NameBuffer);
- DPRINT("NameLength: %hu\n", NameLength);
+ DPRINT("NameLength: %lu\n", NameLength);
/* Copy extension (4 valid characters max) */
if (DotPos < StrLength)
ExtLength = 0;
}
DPRINT("ExtBuffer: '%.04S'\n", ExtBuffer);
- DPRINT("ExtLength: %hu\n", ExtLength);
+ DPRINT("ExtLength: %lu\n", ExtLength);
/* Determine next index */
IndexLength = RtlpGetIndexLength(Context->LastIndexValue);
Checksum = 0;
}
- DPRINT("CopyLength: %hu\n", CopyLength);
+ DPRINT("CopyLength: %lu\n", CopyLength);
if ((Context->NameLength == CopyLength) &&
(wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) &&
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)
{
{
EXCEPTION_RECORD ExceptionRecord;
CONTEXT Context;
- DPRINT1("RtlRaiseStatus(Status 0x%.08x)\n", Status);
+ DPRINT1("RtlRaiseStatus(Status 0x%.08lx)\n", Status);
/* Capture the context */
RtlCaptureContext(&Context);
{
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 +
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 ))
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;
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
{
- DPRINT("Invalid heap %08x!\n", heap );
+ DPRINT("Invalid heap %p!\n", heap );
return FALSE;
}
ULONG flags;
HEAP **pptr;
- DPRINT("%08x\n", heap );
+ DPRINT("%p\n", heap );
if (!heapPtr)
return heap;
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 );
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);
}
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;
}
{
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;
}
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;
}
{
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 );
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);
}
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;
}
/* 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)
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)
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);
/* 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)
Context,
&DispatcherContext,
RegistrationFrame2->Handler);
- DPRINT("Handler returned: %lx\n", ReturnValue);
+ DPRINT("Handler returned: %p\n", (PVOID)ReturnValue);
/* Handle the dispositions */
if (ReturnValue == ExceptionContinueSearch)
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)
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;
{
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;
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)
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 */
}
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;
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;
}
&KeyHandle);
if (!NT_SUCCESS(Status))
{
- DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%x\n", Status);
+ DPRINT("RtlpGetRegistryHandle() failed! Status: 0x%lx\n", Status);
return(Status);
}
ValueLength);
if (!NT_SUCCESS(Status))
{
- DPRINT1("ZwSetValueKey() failed! Status: 0x%x\n", Status);
+ DPRINT1("ZwSetValueKey() failed! Status: 0x%lx\n", Status);
}
ZwClose(KeyHandle);
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);
/* 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)
/* 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! */
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);
}
else
{
- DPRINT("Thread created: %lx\n", Handle);
+ DPRINT("Thread created: %p\n", Handle);
if (ThreadHandle) *ThreadHandle = Handle;
if (ClientId) *ClientId = ThreadCid;
}
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);
/*
/* 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;
/* 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 */