PLIST_ENTRY Current;
PWINDOW_OBJECT Wnd;
USER_REFERENCE_ENTRY Ref;
- WThread = Thread->Tcb.Win32Thread;
+ WThread = (PW32THREAD)Thread->Tcb.Win32Thread;
while (!IsListEmpty(&WThread->WindowListHead))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return 0;
}
- if(!(W32Thread = Thread->Tcb.Win32Thread))
+ if(!(W32Thread = (PW32THREAD)Thread->Tcb.Win32Thread))
{
ObDereferenceObject(Thread);
DPRINT("Thread is not a GUI Thread!\n");
Window->IDMenu = 0;
Window->Instance = hInstance;
Window->hSelf = hWnd;
+
+ if (!hMenu)
+ hMenu = Class->hMenu;
+
if (0 != (dwStyle & WS_CHILD))
{
Window->IDMenu = (UINT) hMenu;
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
BOOL CalculatedDefPosSize = FALSE;
- IntGetDesktopWorkArea(Window->OwnerThread->Tcb.Win32Thread->Desktop, &WorkArea);
+ IntGetDesktopWorkArea(((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)->Desktop, &WorkArea);
rc = WorkArea;
ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
PWINDOW_OBJECT WndShell;
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
+ NTSTATUS Status;
DPRINT("Enter NtUserSetShellWindowEx\n");
UserEnterExclusive();
RETURN(FALSE);
}
- NTSTATUS Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
+ Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
KernelMode,
0,
&WinStaObject);
/*
* Remove extended window style bit WS_EX_TOPMOST for shell windows.
*/
- WindowStation = Window->OwnerThread->Tcb.Win32Thread->Desktop->WindowStation;
+ WindowStation = ((PW32THREAD)Window->OwnerThread->Tcb.Win32Thread)->Desktop->WindowStation;
if(WindowStation)
{
if (hWnd == WindowStation->ShellWindow || hWnd == WindowStation->ShellListView)
NtUserDereferenceWndProcHandle(WNDPROC wpHandle, WndProcHandle *Data)
{
DECLARE_RETURN(DWORD);
+ WndProcHandle Entry;
DPRINT("Enter NtUserDereferenceWndProcHandle\n");
UserEnterShared();
- WndProcHandle Entry;
if (((DWORD)wpHandle & 0xFFFF0000) == 0xFFFF0000)
{
Entry = WndProcHandlesArray[(DWORD)wpHandle & 0x0000FFFF];