if (Class != NULL)
{
/* simply clone the class */
- RtlCopyMemory(Class,
- BaseClass,
- ClassSize);
+ RtlCopyMemory( Class, BaseClass, ClassSize);
+
DPRINT("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
+ /* restore module address if default user class Ref: Bug 4778 */
+ if ( Class->hModule != hModClient &&
+ Class->fnid <= FNID_GHOST &&
+ Class->fnid >= FNID_BUTTON )
+ {
+ Class->hModule = hModClient;
+ DPRINT("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule);
+ }
+
/* update some pointers and link the class */
Class->rpdeskParent = Desktop;
Class->cWndReferenceCount = 0;
if (Class != NULL && !Class->Global)
{
// local class already exists
- DPRINT1("Local Class 0x%p does already exist!\n", ClassAtom);
+ DPRINT("Local Class 0x%p does already exist!\n", ClassAtom);
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
return (RTL_ATOM)0;
}
if (Class != NULL && Class->Global)
{
- DPRINT1("Global Class 0x%p does already exist!\n", ClassAtom);
+ DPRINT("Global Class 0x%p does already exist!\n", ClassAtom);
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
return (RTL_ATOM)0;
}
&Link);
if (ClassAtom == (RTL_ATOM)0)
{
- DPRINT1("UserUnregisterClass: No Class found.\n");
+ DPRINT("UserUnregisterClass: No Class found.\n");
return FALSE;
}
SetLastNtError(_SEH2_GetExceptionCode());
}
_SEH2_END;
-
+/*
if (!Ret)
{
DPRINT1("NtUserRegisterClassExWOW Null Return!\n");
}
-
+ */
UserLeave();
return Ret;