#include <w32k.h>
-#define NDEBUG
-#include <debug.h>
+//#define YDEBUG
+#include <wine/debug.h>
/* WINDOWCLASS ***************************************************************/
RTL_ATOM Atom;
NTSTATUS Status = STATUS_SUCCESS;
+ TRACE("lpwcx=%p ClassName=%wZ MenuName=%wZ wpExtra=%p dwFlags=%08x Desktop=%p pi=%p\n",
+ lpwcx, ClassName, MenuName, wpExtra, dwFlags, Desktop, pi);
+
if (!IntRegisterClassAtom(ClassName,
&Atom))
{
pi = GetW32ProcessInfo();
if (pi == NULL)
{
+ ERR("GetW32ProcessInfo() returned NULL!\n");
goto Cleanup;
}
_SEH_TRY
{
/* probe the paramters */
CapturedClassName = ProbeForReadUnicodeString(ClassName);
+
+ if (IS_ATOM(CapturedClassName.Buffer))
+ TRACE("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi);
+ else
+ TRACE("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi);
+
if (CapturedClassName.Length & 1)
{
goto InvalidParameter;
{
if (!IS_ATOM(CapturedClassName.Buffer))
{
+ ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n");
goto InvalidParameter;
}
}
if (Ret)
{
lpWndClassEx->lpszClassName = CapturedClassName.Buffer;
-
/* FIXME - handle Class->Desktop == NULL!!!!! */
if (Class->MenuName != NULL &&
if (!(Class->Global || Class->System) && hInstance == NULL)
{
+ WARN("Tried to get information of a non-existing class\n");
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
Ret = FALSE;
}
}
else
{
+ WARN("Tried to get information of a non-existing class\n");
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
}
}
#include <w32k.h>
-#define NDEBUG
-#include <debug.h>
+//#define YDEBUG
+#include <wine/debug.h>
static
VOID
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink = &PsGetCurrentProcessWin32Process()->HeapMappings.Next;
NTSTATUS Status = STATUS_SUCCESS;
+ TRACE("DO %p\n");
+
/* unmap if we're the last thread using the desktop */
HeapMapping = *PrevLink;
while (HeapMapping != NULL)
}
/* we're the first, map the heap */
+ DPRINT("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->hDesktopHeap);
Offset.QuadPart = 0;
Status = MmMapViewOfSection(DesktopObject->DesktopHeapSection,
PsGetCurrentProcess(),
PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
if (!NT_SUCCESS(Status))
{
- DbgPrint("Failed to map desktop\n");
+ DPRINT1("Failed to map desktop\n");
return Status;
}
{
MmUnmapViewOfSection(PsGetCurrentProcess(),
UserBase);
+ DPRINT1("UserHeapAlloc() failed!\n");
return STATUS_NO_MEMORY;
}
HeapMapping->KernelMapping = (PVOID)DesktopObject->hDesktopHeap;
HeapMapping->UserMapping = UserBase;
HeapMapping->Count = 1;
+ *PrevLink = HeapMapping;
ObReferenceObject(DesktopObject);
NTSTATUS Status;
BOOL MapHeap;
+ DPRINT("IntSetThreadDesktop() DO=%p, FOF=%d\n", DesktopObject, FreeOnFailure);
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
W32Thread = PsGetCurrentThreadWin32Thread();