ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2005
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
563 discussions
Start a n
N
ew thread
[gdalsnes] 16799: explorer starts but crash due to missing/lost winsta (ref/deref problem?)
by gdalsnes@svn.reactos.com
explorer starts but crash due to missing/lost winsta (ref/deref problem?) Modified: branches/hardons1stbranch/win32k/include/keyboard.h Added: branches/hardons1stbranch/win32k/include/userfuncs.h Modified: branches/hardons1stbranch/win32k/include/win32k.h Modified: branches/hardons1stbranch/win32k/main/dllmain.c Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c Modified: branches/hardons1stbranch/win32k/ntuser/caret.c Modified: branches/hardons1stbranch/win32k/ntuser/class.c Modified: branches/hardons1stbranch/win32k/ntuser/cursoricon.c Modified: branches/hardons1stbranch/win32k/ntuser/desktop.c Modified: branches/hardons1stbranch/win32k/ntuser/handle.c Modified: branches/hardons1stbranch/win32k/ntuser/hook.c Modified: branches/hardons1stbranch/win32k/ntuser/hotkey.c Modified: branches/hardons1stbranch/win32k/ntuser/keyboard.c Modified: branches/hardons1stbranch/win32k/ntuser/message.c Modified: branches/hardons1stbranch/win32k/ntuser/msgqueue.c Modified: branches/hardons1stbranch/win32k/ntuser/useratom.c Modified: branches/hardons1stbranch/win32k/ntuser/window.c Modified: branches/hardons1stbranch/win32k/ntuser/winsta.c _____ Modified: branches/hardons1stbranch/win32k/include/keyboard.h --- branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27 13:18:11 UTC (rev 16799) @@ -1,231 +0,0 @@ -#ifndef _WIN32K_KEYBOARD_H -#define _WIN32K_KEYBOARD_H - -DWORD FASTCALL -UserGetKeyState(DWORD key); - -/* handle.h */ - -VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes); -HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type ); -PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ); -PVOID UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle ); -PVOID UserGetNextHandle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type ); - - -/************* DESKTOP.C *****************/ - -inline PDESKTOP_OBJECT FASTCALL UserGetCurrentDesktop(); - - - - -/************************* ACCELERATOR.C ***********************/ - -inline PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hCursor); - -PACCELERATOR_TABLE UserGetAcceleratorTable(HACCEL hAccel); -PACCELERATOR_TABLE UserAllocAcceleratorTable(HACCEL* h); - -PACCELERATOR_TABLE UserCreateAcceleratorTableObject(HACCEL* h); - - -/* metric.c */ -ULONG FASTCALL -UserGetSystemMetrics(ULONG Index); - -/* input.h */ -NTSTATUS FASTCALL -UserAcquireOrReleaseInputOwnership(BOOLEAN Release); - -/* focus.c */ -PWINDOW_OBJECT FASTCALL -UserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL); - - -/* painting.c */ -DWORD FASTCALL -UserInvalidateRect(PWINDOW_OBJECT Wnd, CONST RECT *Rect, BOOL Erase); - -DWORD FASTCALL -UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll, - const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate); - -INT FASTCALL -UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase); - -/* message.c */ -BOOL FASTCALL -UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); - -/************************ WINDOW.C *****************************/ - -inline VOID FASTCALL UserFreeWindowObject(PWINDOW_OBJECT Wnd); - -PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd); - -PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes); - -PWINDOW_OBJECT FASTCALL -UserGetWindow(PWINDOW_OBJECT Wnd, UINT Relationship); - -LONG FASTCALL -UserGetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, BOOL Ansi); - -LONG FASTCALL -UserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL Ansi); - -BOOLEAN FASTCALL -UserDestroyWindow(PWINDOW_OBJECT Wnd); - -HWND FASTCALL -GetHwnd(PWINDOW_OBJECT Wnd); - -/************************* WINSTA.C ****************************/ - -inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta(); - -/************************* MENU.C ****************************/ - -inline PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu); - -HMENU FASTCALL -UserCreateMenu(BOOL PopupMenu); - -PMENU_OBJECT FASTCALL -UserCreateMenuObject(HANDLE* h); - - -/* caret.c */ -BOOL FASTCALL -UserShowCaret(PWINDOW_OBJECT Wnd); - -BOOL FASTCALL -UserSetCaretPos(int X, int Y); - -BOOL FASTCALL -UserHideCaret(PWINDOW_OBJECT Wnd); - -/* winpos.c */ - -BOOL FASTCALL -UserGetClientOrigin(PWINDOW_OBJECT hWnd, LPPOINT Point); - -/* scrollbar.c */ -DWORD FASTCALL -UserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow); - -/* timer.c */ - -inline VOID FASTCALL -UserFreeTimer(PTIMER_ENTRY Timer); - -VOID FASTCALL -UserRemoveTimersWindow(PWINDOW_OBJECT Wnd); - -VOID FASTCALL -UserInsertTimer(PTIMER_ENTRY NewTimer); - -VOID FASTCALL -UserSetNextPendingTimer(); - -VOID FASTCALL -UserRemoveTimersQueue(PUSER_MESSAGE_QUEUE Queue); - -/* hook.c*/ -PHOOK FASTCALL -HookCreate(HHOOK* hHook); - -PHOOK FASTCALL HookGet(HHOOK hHook); - -/* class.c */ - -VOID FASTCALL -ClassReferenceClass(PWNDCLASS_OBJECT Class); - -VOID FASTCALL -ClassDereferenceClass(PWNDCLASS_OBJECT Class); - -PWNDCLASS_OBJECT FASTCALL -ClassCreateClass(DWORD bytes); - - -/********************* CURSORI(ICON).C *****************/ - -inline PCURICON_OBJECT FASTCALL -UserGetCursorObject(HCURSOR hCursor); - -VOID FASTCALL -CurIconReferenceCurIcon(PCURICON_OBJECT CurIcon); - -PCURICON_OBJECT UserAllocCursorIcon(HCURSOR* h); -PCURICON_OBJECT UserGetCursorIcon(HCURSOR hCursor); - -VOID FASTCALL -UserDereferenceCurIcon(PCURICON_OBJECT CurIcon); - -VOID FASTCALL -CursorDereference(PCURICON_OBJECT Cursor); - -PCURICON_OBJECT FASTCALL -UserCreateCursorObject(HCURSOR* hCursor, ULONG extraBytes); - -PCURICON_OBJECT FASTCALL -CursorGet(HCURSOR hCursor); - -inline PCURICON_OBJECT FASTCALL -UserGetCursorIconObject(HCURSOR hCursor); - -/* monitor.c */ - -PMONITOR_OBJECT FASTCALL UserCreateMonitorObject(HANDLE* h); - -PMONITOR_OBJECT UserGetMonitorObject(HANDLE hCursor); - - -/* msgqueue.c */ - -VOID FASTCALL -MsqRemoveWindowMessagesFromQueue(PWINDOW_OBJECT pWindow); - -inline BOOL FASTCALL -UserMessageFilter(UINT Message, UINT FilterMin, UINT FilterMax); - -VOID FASTCALL -MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT Wnd); - -VOID FASTCALL -MsqInsertExpiredTimer(PTIMER_ENTRY Timer); - -PTIMER_ENTRY FASTCALL -UserFindExpiredTimer( - PUSER_MESSAGE_QUEUE Queue, - PWINDOW_OBJECT Wnd OPTIONAL, - UINT MsgFilterMin, - UINT MsgFilterMax, - BOOL Remove - ); - -PTIMER_ENTRY FASTCALL -MsqRemoveTimer( - PWINDOW_OBJECT Wnd, - UINT_PTR IDEvent, - UINT Message - ); - -/* windc.c */ - -HDC FASTCALL -UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags); - -INT FASTCALL -UserReleaseDC(PWINDOW_OBJECT Wnd, HDC hDc); - -DWORD FASTCALL -UserGetWindowDC(PWINDOW_OBJECT Wnd); - -/* div */ -#define UserGetCurrentQueue() \ -((PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue) - -#endif /* _WIN32K_KEYBOARD_H */ _____ Added: branches/hardons1stbranch/win32k/include/userfuncs.h --- branches/hardons1stbranch/win32k/include/userfuncs.h 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/include/userfuncs.h 2005-07-27 13:18:11 UTC (rev 16799) @@ -0,0 +1,231 @@ +#ifndef _WIN32K_USERFUNCS_H +#define _WIN32K_USERFUNCS_H + +/*************** KEYBOARD.C ******************/ + +DWORD FASTCALL +UserGetKeyState(DWORD key); + +/******************** HANDLE.C ***************/ + +VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes); +HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type ); +PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ); +PVOID UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle ); +PVOID UserGetNextHandle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type ); + + +/************* DESKTOP.C *****************/ + +inline PDESKTOP_OBJECT FASTCALL UserGetCurrentDesktop(); + + + + +/************************* ACCELERATOR.C ***********************/ + +inline PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hCursor); + +PACCELERATOR_TABLE FASTCALL UserCreateAccelObject(HACCEL* h); + + + +/* metric.c */ +ULONG FASTCALL +UserGetSystemMetrics(ULONG Index); + +/* input.h */ +NTSTATUS FASTCALL +UserAcquireOrReleaseInputOwnership(BOOLEAN Release); + +/* focus.c */ +PWINDOW_OBJECT FASTCALL +UserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL); + + +/* painting.c */ +DWORD FASTCALL +UserInvalidateRect(PWINDOW_OBJECT Wnd, CONST RECT *Rect, BOOL Erase); + +DWORD FASTCALL +UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll, + const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate); + +INT FASTCALL +UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase); + +/* message.c */ +BOOL FASTCALL +UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); + +/************************ WINDOW.C *****************************/ + +inline VOID FASTCALL UserFreeWindowObject(PWINDOW_OBJECT Wnd); + +PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd); + +PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes); + +PWINDOW_OBJECT FASTCALL +UserGetWindow(PWINDOW_OBJECT Wnd, UINT Relationship); + +LONG FASTCALL +UserGetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, BOOL Ansi); + +LONG FASTCALL +UserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL Ansi); + +BOOLEAN FASTCALL +UserDestroyWindow(PWINDOW_OBJECT Wnd); + +HWND FASTCALL +GetHwnd(PWINDOW_OBJECT Wnd); + +/************************* WINSTA.C ****************************/ + +inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta(); + +/************************* MENU.C ****************************/ + +inline PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu); + +HMENU FASTCALL +UserCreateMenu(BOOL PopupMenu); + +PMENU_OBJECT FASTCALL +UserCreateMenuObject(HANDLE* h); + + +/* caret.c */ +BOOL FASTCALL +UserShowCaret(PWINDOW_OBJECT Wnd); + +BOOL FASTCALL +UserSetCaretPos(int X, int Y); + +BOOL FASTCALL +UserHideCaret(PWINDOW_OBJECT Wnd); + +/* winpos.c */ + +BOOL FASTCALL +UserGetClientOrigin(PWINDOW_OBJECT hWnd, LPPOINT Point); + +/* scrollbar.c */ +DWORD FASTCALL +UserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow); + +/* timer.c */ + +inline VOID FASTCALL +UserFreeTimer(PTIMER_ENTRY Timer); + +VOID FASTCALL +UserRemoveTimersWindow(PWINDOW_OBJECT Wnd); + +VOID FASTCALL +UserInsertTimer(PTIMER_ENTRY NewTimer); + +VOID FASTCALL +UserSetNextPendingTimer(); + +VOID FASTCALL +UserRemoveTimersQueue(PUSER_MESSAGE_QUEUE Queue); + +/* hook.c*/ +PHOOK FASTCALL +HookCreate(HHOOK* hHook); + +PHOOK FASTCALL HookGet(HHOOK hHook); + +/* class.c */ + +VOID FASTCALL +ClassReferenceClass(PWNDCLASS_OBJECT Class); + +VOID FASTCALL +ClassDereferenceClass(PWNDCLASS_OBJECT Class); + +PWNDCLASS_OBJECT FASTCALL +ClassCreateClass(DWORD bytes); + + +/********************* CURSORIICON.C *****************/ + +inline PCURICON_OBJECT FASTCALL +UserGetCursorObject(HCURSOR hCursor); + +VOID FASTCALL +CurIconReferenceCurIcon(PCURICON_OBJECT CurIcon); + +PCURICON_OBJECT UserAllocCursorIcon(HCURSOR* h); +PCURICON_OBJECT UserGetCursorIcon(HCURSOR hCursor); + +VOID FASTCALL +UserDereferenceCurIcon(PCURICON_OBJECT CurIcon); + +VOID FASTCALL +CursorDereference(PCURICON_OBJECT Cursor); + +PCURICON_OBJECT FASTCALL +UserCreateCursorObject(HCURSOR* hCursor, ULONG extraBytes); + +PCURICON_OBJECT FASTCALL +CursorGet(HCURSOR hCursor); + + +/* monitor.c */ + +PMONITOR_OBJECT FASTCALL UserCreateMonitorObject(HANDLE* h); + +PMONITOR_OBJECT UserGetMonitorObject(HANDLE hCursor); + + +/* msgqueue.c */ + +VOID FASTCALL +MsqRemoveWindowMessagesFromQueue(PWINDOW_OBJECT pWindow); + +inline BOOL FASTCALL +UserMessageFilter(UINT Message, UINT FilterMin, UINT FilterMax); + +VOID FASTCALL +MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT Wnd); + +VOID FASTCALL +MsqInsertExpiredTimer(PTIMER_ENTRY Timer); + +PTIMER_ENTRY FASTCALL +UserFindExpiredTimer( + PUSER_MESSAGE_QUEUE Queue, + PWINDOW_OBJECT Wnd OPTIONAL, + UINT MsgFilterMin, + UINT MsgFilterMax, + BOOL Remove + ); + +PTIMER_ENTRY FASTCALL +MsqRemoveTimer( + PWINDOW_OBJECT Wnd, + UINT_PTR IDEvent, + UINT Message + ); + +/* windc.c */ + +HDC FASTCALL +UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags); + +INT FASTCALL +UserReleaseDC(PWINDOW_OBJECT Wnd, HDC hDc); + +DWORD FASTCALL +UserGetWindowDC(PWINDOW_OBJECT Wnd); + +/* div */ +#define UserGetCurrentQueue() \ +((PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue) + + + +#endif /* _WIN32K_USERFUNCS_H */ _____ Modified: branches/hardons1stbranch/win32k/include/win32k.h --- branches/hardons1stbranch/win32k/include/win32k.h 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/include/win32k.h 2005-07-27 13:18:11 UTC (rev 16799) @@ -59,5 +59,6 @@ #include <eng/misc.h> #include <dib/dib.h> #include <include/ntuser.h> +#include <include/userfuncs.h> /* EOF */ _____ Modified: branches/hardons1stbranch/win32k/main/dllmain.c --- branches/hardons1stbranch/win32k/main/dllmain.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/main/dllmain.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -144,6 +144,8 @@ /* Get the Win32 Thread */ Win32Thread = PsGetThreadWin32Thread(Thread); + //FIXME: imo, its an error if it already exist. Gunnar + /* Allocate one if needed */ if (!Win32Thread) { @@ -178,6 +180,9 @@ DesktopPath, &hWinSta, &hDesk); + +/*---- this code i dont get ------*/ +/* imo, a thread REQUIRE a desktop!!! */ if(NT_SUCCESS(Status)) { if(hWinSta != NULL) @@ -213,6 +218,8 @@ } } } +/*---- this code i dont get ------*/ + Win32Thread->IsExiting = FALSE; UserDestroyCaret(Win32Thread); Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread); _____ Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c --- branches/hardons1stbranch/win32k/ntuser/accelerator.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/accelerator.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -115,17 +115,11 @@ } -PACCELERATOR_TABLE UserCreateAcceleratorTableObject(HACCEL* h) +PACCELERATOR_TABLE FASTCALL UserCreateAccelObject(HACCEL* h) { PVOID mem; - PWINSTATION_OBJECT WinSta; + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); - /* - Get process winsta? Or thread->desk->winsta? - can a process threads be assigned to different winstas (via desktops?) - */ - WinSta = IntGetWinStaObj(); - mem = ExAllocatePool(PagedPool, sizeof(ACCELERATOR_TABLE)); if (!mem) return NULL; RtlZeroMemory(mem, sizeof(ACCELERATOR_TABLE)); @@ -161,7 +155,7 @@ RETURN(FALSE); } - AcceleratorTable = UserCreateAcceleratorTableObject(&Handle); + AcceleratorTable = UserCreateAccelObject(&Handle); if (AcceleratorTable == NULL) { @@ -227,7 +221,6 @@ if (!AcceleratorTable) { SetLastWin32Error(ERROR_INVALID_ACCEL_HANDLE); -// ObDereferenceObject(WindowStation); DPRINT1("E2\n"); RETURN(FALSE); } @@ -437,8 +430,8 @@ inline PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hCursor) { - PWINSTATION_OBJECT WinSta; - WinSta = PsGetWin32Thread()->Desktop->WindowStation; + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); + return (PACCELERATOR_TABLE)UserGetObject(&WinSta->HandleTable, hCursor, USER_CURSOR_ICON ); } _____ Modified: branches/hardons1stbranch/win32k/ntuser/caret.c --- branches/hardons1stbranch/win32k/ntuser/caret.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/caret.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -55,7 +55,7 @@ UserSetCaretBlinkTime(UINT uMSeconds) { /* Don't save the new value to the registry! */ - PWINSTATION_OBJECT WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + PWINSTATION_OBJECT WinStaObject = UserGetCurrentWinSta(); /* windows doesn't do this check */ if((uMSeconds < MIN_CARETBLINKRATE) || (uMSeconds > MAX_CARETBLINKRATE)) @@ -141,7 +141,7 @@ PWINSTATION_OBJECT WinStaObject; UINT Ret; - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Ret = WinStaObject->CaretBlinkRate; if(!Ret) _____ Modified: branches/hardons1stbranch/win32k/ntuser/class.c --- branches/hardons1stbranch/win32k/ntuser/class.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/class.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -116,7 +116,7 @@ if (!ClassName || !PsGetWin32Thread()->Desktop) return FALSE; - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Status = RtlLookupAtomInAtomTable( WinStaObject->AtomTable, @@ -225,7 +225,7 @@ return 0; } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Length = 0; Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable, @@ -457,7 +457,7 @@ RETURN((RTL_ATOM)0); } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); if (ClassName->Length > 0) { @@ -729,7 +729,7 @@ RETURN(FALSE); } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); if (!ClassReferenceClassByNameOrAtom(&Class, ClassNameOrAtom, hInstance)) { _____ Modified: branches/hardons1stbranch/win32k/ntuser/cursoricon.c --- branches/hardons1stbranch/win32k/ntuser/cursoricon.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/cursoricon.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -90,7 +90,7 @@ XLATEOBJ *XlateObj = NULL; HDC Screen; - CurInfo = UserGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); + CurInfo = UserGetSysCursorInfo(UserGetCurrentWinSta()); OldCursor = CurInfo->CurrentCursorObject; if (OldCursor) @@ -401,39 +401,8 @@ //FIXME } -PCURICON_OBJECT FASTCALL -UserCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject) -{ - PCURICON_OBJECT Cursor; - HCURSOR hCursor; - Cursor = UserCreateCursorObject(&hCursor, 0); - if(!Cursor) - { - SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - Cursor->Self = hCursor; - - InitializeListHead(&Cursor->ProcessList); - - if (! UserReferenceCurIconByProcess(Cursor)) - { - DPRINT1("Failed to add process\n"); -// ObmCloseHandle(WinStaObject->HandleTable, Handle); - //ObmDereferenceObject(Object); - UserReferenceCurIcon(Cursor); - return NULL; - } - - InsertHeadList(&CurIconList, &Cursor->ListEntry); - - CursorDereference(Cursor); - - return Cursor; -} - BOOLEAN FASTCALL UserDestroyCurIconObject(PCURICON_OBJECT Cursor, BOOL ProcessCleanup) { @@ -488,7 +457,7 @@ RemoveEntryList(&Cursor->ListEntry); } - CurInfo = UserGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); + CurInfo = UserGetSysCursorInfo(UserGetCurrentWinSta()); if (CurInfo->CurrentCursorObject == Cursor) { @@ -555,6 +524,8 @@ } + + PCURICON_OBJECT FASTCALL UserCreateCursorObject(HCURSOR* hCursor, ULONG extraBytes) { PVOID mem; @@ -562,10 +533,10 @@ mem = ExAllocatePool(PagedPool, sizeof(CURICON_OBJECT)+extraBytes); if (!mem) return NULL; + RtlZeroMemory(mem, sizeof(CURICON_OBJECT)+extraBytes); - /* FIX: kan desk->winsta vµre forskjellig fra proc->winsta? */ - WinSta = PsGetWin32Thread()->Desktop->WindowStation; + WinSta = UserGetCurrentWinSta(); *hCursor = UserAllocHandle(&WinSta->HandleTable, mem, USER_CURSOR_ICON); if (!*hCursor){ @@ -596,7 +567,20 @@ RETURN(NULL); Cursor->Self = hCursor; + InitializeListHead(&Cursor->ProcessList); + if (! UserReferenceCurIconByProcess(Cursor)) + { + DPRINT1("Failed to add process\n"); +// ObmCloseHandle(WinStaObject->HandleTable, Handle); + UserReferenceCurIcon(Cursor); + RETURN( NULL); + } + + InsertHeadList(&CurIconList, &Cursor->ListEntry); + + + if(IconInfo) { Status = MmCopyFromCaller(&Cursor->IconInfo, IconInfo, sizeof(ICONINFO)); @@ -643,11 +627,11 @@ inline PCURICON_OBJECT FASTCALL UserGetCursorObject(HCURSOR hCursor) { - PWINSTATION_OBJECT WinSta; - WinSta = PsGetWin32Thread()->Desktop->WindowStation; + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); return (PCURICON_OBJECT)UserGetObject(&WinSta->HandleTable, hCursor, USER_CURSOR_ICON ); } + /* * @implemented */ @@ -819,13 +803,13 @@ RETURN( FALSE); } - CurInfo = UserGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); + CurInfo = UserGetSysCursorInfo(UserGetCurrentWinSta()); CursorObject = (PCURICON_OBJECT)CurInfo->CurrentCursorObject; SafeCi.flags = ((CurInfo->ShowingCursor && CursorObject) ? CURSOR_SHOWING : 0); SafeCi.hCursor = (CursorObject ? (HCURSOR)CursorObject->Self : (HCURSOR)0); - UserGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation, &SafeCi.ptScreenPos); + UserGetCursorLocation(UserGetCurrentWinSta(), &SafeCi.ptScreenPos); Status = MmCopyToCaller(pci, &SafeCi, sizeof(CURSORINFO)); if(!NT_SUCCESS(Status)) @@ -867,8 +851,8 @@ RETURN( FALSE); } - CurInfo = UserGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); - UserGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation, &MousePos); + CurInfo = UserGetSysCursorInfo(UserGetCurrentWinSta()); + UserGetCursorLocation(UserGetCurrentWinSta(), &MousePos); // if(WinStaObject->ActiveDesktop) // DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow); @@ -911,11 +895,6 @@ } -inline PCURICON_OBJECT FASTCALL UserGetCursorIconObject(HCURSOR hCursor) -{ - PWINSTATION_OBJECT WinSta = PsGetWin32Thread()->Desktop->WindowStation; - return (PCURICON_OBJECT)UserGetObject(&WinSta->HandleTable, hCursor, USER_CURSOR_ICON); -} /* @@ -937,7 +916,7 @@ DPRINT("Enter NtUserDestroyCursorIcon\n"); UserEnterExclusive(); - Cursor = UserGetCursorIconObject(hCursor); + Cursor = UserGetCursorObject(hCursor); if(!Cursor) { RETURN(FALSE); @@ -1027,7 +1006,7 @@ if(!lpRect) RETURN( FALSE); - CurInfo = UserGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); + CurInfo = UserGetSysCursorInfo(UserGetCurrentWinSta()); if(CurInfo->CursorClipInfo.IsClipped) { Rect.left = CurInfo->CursorClipInfo.Left; _____ Modified: branches/hardons1stbranch/win32k/ntuser/desktop.c --- branches/hardons1stbranch/win32k/ntuser/desktop.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/desktop.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -1188,7 +1188,7 @@ BOOL doPatBlt = TRUE; int len; - PWINSTATION_OBJECT WinSta = PsGetWin32Thread()->Desktop->WindowStation; + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); IntGdiGetClipBox(hDC, &Rect); _____ Modified: branches/hardons1stbranch/win32k/ntuser/handle.c --- branches/hardons1stbranch/win32k/ntuser/handle.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/handle.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -118,6 +118,8 @@ { PUSER_HANDLE_ENTRY entry; + ASSERT(ht); + if (!(entry = handle_to_entry(ht, handle )) || entry->type != type) return NULL; return entry->ptr; } _____ Modified: branches/hardons1stbranch/win32k/ntuser/hook.c --- branches/hardons1stbranch/win32k/ntuser/hook.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/hook.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -406,7 +406,7 @@ mem = ExAllocatePool(PagedPool, sizeof(HOOK)); if (!mem) return NULL; - WinSta = PsGetWin32Thread()->Desktop->WindowStation; + WinSta = UserGetCurrentWinSta(); *hHook = UserAllocHandle(&WinSta->HandleTable, mem, USER_HOOK_PROC); if (!*hHook){ ExFreePool(mem); @@ -419,7 +419,7 @@ PHOOK FASTCALL HookGet(HHOOK hHook) { PWINSTATION_OBJECT WinSta; - WinSta = PsGetWin32Thread()->Desktop->WindowStation; + WinSta = UserGetCurrentWinSta(); return (PHOOK)UserGetObject(&WinSta->HandleTable, hHook, USER_HOOK_PROC ); } _____ Modified: branches/hardons1stbranch/win32k/ntuser/hotkey.c --- branches/hardons1stbranch/win32k/ntuser/hotkey.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/hotkey.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -113,8 +113,11 @@ PHOT_KEY_ITEM HotKeyItem; PWINSTATION_OBJECT WinStaObject = NULL; - if(Window->OwnerThread && Window->OwnerThread->ThreadsProcess) + if(Window->OwnerThread && Window->OwnerThread->ThreadsProcess){ + + //FIXME: hmm...this winsta path look fishy WinStaObject = Window->OwnerThread->Tcb.Win32Thread->Desktop->WindowStation; + } if(!WinStaObject) return; _____ Modified: branches/hardons1stbranch/win32k/ntuser/keyboard.c --- branches/hardons1stbranch/win32k/ntuser/keyboard.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/keyboard.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -665,8 +665,7 @@ IntLockQueueState; /* All messages have to contain the cursor point. */ - UserGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation, - &NewMsg.pt); + UserGetCursorLocation(UserGetCurrentWinSta(), &NewMsg.pt); UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff, QueueKeyStateTable, wp, 2, 0, _____ Modified: branches/hardons1stbranch/win32k/ntuser/message.c --- branches/hardons1stbranch/win32k/ntuser/message.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/message.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -1272,8 +1272,7 @@ SetLastWin32Error(ERROR_INVALID_PARAMETER); return(FALSE); } - UserGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation, - &KernelModeMsg.pt); + UserGetCursorLocation(UserGetCurrentWinSta(), &KernelModeMsg.pt); KeQueryTickCount(&LargeTickCount); KernelModeMsg.time = LargeTickCount.u.LowPart; MsqPostMessage(Window->MessageQueue, &KernelModeMsg, _____ Modified: branches/hardons1stbranch/win32k/ntuser/msgqueue.c --- branches/hardons1stbranch/win32k/ntuser/msgqueue.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/msgqueue.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -234,9 +234,9 @@ { return FALSE; } - //FIXME: UserGetCurrentWinSta() - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); + CurInfo = UserGetSysCursorInfo(WinStaObject); Res = (Msg->hwnd == (HWND)CurInfo->LastClkWnd) && ((Msg->time - CurInfo->LastBtnDown) < CurInfo->DblClickSpeed); _____ Modified: branches/hardons1stbranch/win32k/ntuser/useratom.c --- branches/hardons1stbranch/win32k/ntuser/useratom.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/useratom.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -41,7 +41,7 @@ SetLastNtError(Status); return (RTL_ATOM)0; } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Status = RtlAddAtomToAtomTable(WinStaObject->AtomTable, AtomName, &Atom); if (!NT_SUCCESS(Status)) @@ -64,7 +64,7 @@ SetLastNtError(Status); return 0; } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Status = RtlQueryAtomInAtomTable(WinStaObject->AtomTable, nAtom, NULL, NULL, lpBuffer, &Size); if (Size < nSize) _____ Modified: branches/hardons1stbranch/win32k/ntuser/window.c --- branches/hardons1stbranch/win32k/ntuser/window.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/window.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -107,6 +107,7 @@ { PWINSTATION_OBJECT WinSta; WinSta = UserGetCurrentWinSta(); + ASSERT(WinSta); return (PWINDOW_OBJECT)UserGetObject(&WinSta->HandleTable, hWnd, USER_WINDOW ); } @@ -1497,7 +1498,7 @@ DPRINT("Thread is not attached to a desktop! Cannot create window!\n"); return (HWND)0; } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); ObReferenceObjectByPointer(WinStaObject, KernelMode, ExWindowStationObjectType, 0); /* Create the window object. */ @@ -2461,7 +2462,7 @@ goto Cleanup; } - WinStaObject = PsGetWin32Thread()->Desktop->WindowStation; + WinStaObject = UserGetCurrentWinSta(); Status = RtlLookupAtomInAtomTable( WinStaObject->AtomTable, _____ Modified: branches/hardons1stbranch/win32k/ntuser/winsta.c --- branches/hardons1stbranch/win32k/ntuser/winsta.c 2005-07-27 12:01:05 UTC (rev 16798) +++ branches/hardons1stbranch/win32k/ntuser/winsta.c 2005-07-27 13:18:11 UTC (rev 16799) @@ -976,21 +976,38 @@ inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta() { + //ASSERT(PsGetWin32Thread()); + //ASSERT(PsGetWin32Thread()->Desktop); + //ASSERT(PsGetWin32Thread()->Desktop->WindowStation); + +#if 0 + if (!PsGetWin32Thread()->Desktop) + { + DPRINT1("FIXME: PsGetWin32Thread()->Desktop is NULL!!!\n"); + return NULL; + } + return PsGetWin32Thread()->Desktop->WindowStation; +#endif + + return IntGetWinStaObj(); } + PWINSTATION_OBJECT FASTCALL IntGetWinStaObj(VOID) { PWINSTATION_OBJECT WinStaObj; /* - * just a temporary hack, this will be gone soon + * just a temporary hack, this will be gone soon. I HOPE SO! [truncated at 1000 lines; 25 more skipped]
19 years, 6 months
1
0
0
0
[gdalsnes] 16798: fix compile
by gdalsnes@svn.reactos.com
fix compile Modified: branches/hardons1stbranch/win32k/include/keyboard.h Modified: branches/hardons1stbranch/win32k/include/menu.h Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c Modified: branches/hardons1stbranch/win32k/ntuser/handle.c Modified: branches/hardons1stbranch/win32k/ntuser/menu.c Modified: branches/hardons1stbranch/win32k/ntuser/misc.c Modified: branches/hardons1stbranch/win32k/ntuser/monitor.c Modified: branches/hardons1stbranch/win32k/ntuser/window.c _____ Modified: branches/hardons1stbranch/win32k/include/keyboard.h --- branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27 12:01:05 UTC (rev 16798) @@ -20,8 +20,10 @@ -/* accelerator.c */ +/************************* ACCELERATOR.C ***********************/ +inline PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hCursor); + PACCELERATOR_TABLE UserGetAcceleratorTable(HACCEL hAccel); PACCELERATOR_TABLE UserAllocAcceleratorTable(HACCEL* h); @@ -56,7 +58,10 @@ BOOL FASTCALL UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -/* window.c */ +/************************ WINDOW.C *****************************/ + +inline VOID FASTCALL UserFreeWindowObject(PWINDOW_OBJECT Wnd); + PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd); PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes); _____ Modified: branches/hardons1stbranch/win32k/include/menu.h --- branches/hardons1stbranch/win32k/include/menu.h 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/include/menu.h 2005-07-27 12:01:05 UTC (rev 16798) @@ -38,8 +38,6 @@ BOOL RtoL; } MENU_OBJECT, *PMENU_OBJECT; -PMENU_OBJECT FASTCALL -IntGetMenuObject(HMENU hMenu); BOOL FASTCALL IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, _____ Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c --- branches/hardons1stbranch/win32k/ntuser/accelerator.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/accelerator.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -82,9 +82,8 @@ DPRINT("Enter NtUserCopyAcceleratorTable\n"); UserEnterExclusive(); - - AcceleratorTable = UserGetAcceleratorTable(Table); + AcceleratorTable = UserGetAccelObject(Table); if (!AcceleratorTable) { @@ -98,8 +97,6 @@ Status = MmCopyToCaller(Entries, AcceleratorTable->Table, Ret * sizeof(ACCEL)); if (!NT_SUCCESS(Status)) { -// ObmDereferenceObject(AcceleratorTable); -// ObDereferenceObject(WindowStation); SetLastNtError(Status); RETURN(0); } @@ -109,9 +106,6 @@ Ret = AcceleratorTable->Count; } -// ObmDereferenceObject(AcceleratorTable); -// ObDereferenceObject(WindowStation); - RETURN(Ret); CLEANUP: @@ -170,7 +164,7 @@ AcceleratorTable = UserCreateAcceleratorTableObject(&Handle); if (AcceleratorTable == NULL) { -// ObDereferenceObject(WindowStation); + SetLastNtError(STATUS_NO_MEMORY); DPRINT1("E2\n"); RETURN( (HACCEL) 0); @@ -184,7 +178,6 @@ if (AcceleratorTable->Table == NULL) { // ObmCloseHandle(WindowStation->HandleTable, Handle); -// ObDereferenceObject(WindowStation); SetLastNtError(Status); DPRINT1("E3\n"); RETURN( (HACCEL) 0); @@ -195,14 +188,12 @@ { ExFreePool(AcceleratorTable->Table); // ObmCloseHandle(WindowStation->HandleTable, Handle); -// ObDereferenceObject(WindowStation); SetLastNtError(Status); DPRINT1("E4\n"); RETURN((HACCEL) 0); } } -// ObDereferenceObject(WindowStation); /* FIXME: Save HandleTable in a list somewhere so we can clean it up again */ RETURN( (HACCEL) Handle); @@ -231,7 +222,7 @@ UserEnterExclusive(); //FIXME - AcceleratorTable = UserGetAcceleratorTable/*Object*/(Table); + AcceleratorTable = UserGetAccelObject(Table); if (!AcceleratorTable) { @@ -444,6 +435,14 @@ return TRUE; } +inline PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hCursor) +{ + PWINSTATION_OBJECT WinSta; + WinSta = PsGetWin32Thread()->Desktop->WindowStation; + return (PACCELERATOR_TABLE)UserGetObject(&WinSta->HandleTable, hCursor, USER_CURSOR_ICON ); +} + + int STDCALL NtUserTranslateAccelerator( @@ -483,11 +482,10 @@ RETURN(0); } - AcceleratorTable = UserGetAcceleratorTable(Table); + AcceleratorTable = UserGetAccelObject(Table); if (!AcceleratorTable) { SetLastWin32Error(ERROR_INVALID_ACCEL_HANDLE); -// ObDereferenceObject(WindowStation); RETURN(0); } @@ -510,8 +508,6 @@ } } - ObDereferenceObject(WindowStation); - RETURN(0); CLEANUP: _____ Modified: branches/hardons1stbranch/win32k/ntuser/handle.c --- branches/hardons1stbranch/win32k/ntuser/handle.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/handle.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -155,10 +155,6 @@ return NULL; } -// if (entry->ptr){ -// ExFreePool(entry->ptr); -// } - return free_user_entry(ht, entry ); } _____ Modified: branches/hardons1stbranch/win32k/ntuser/menu.c --- branches/hardons1stbranch/win32k/ntuser/menu.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/menu.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -150,7 +150,7 @@ if(bRecurse && MenuItem->hSubMenu) { PMENU_OBJECT SubMenuObject; - SubMenuObject = IntGetMenuObject(MenuItem->hSubMenu ); + SubMenuObject = UserGetMenuObject(MenuItem->hSubMenu ); if(SubMenuObject) { IntDestroyMenuObject(SubMenuObject, bRecurse, TRUE); @@ -465,7 +465,7 @@ { PMENU_OBJECT Menu; - if((Menu = IntGetMenuObject(hMenu))) + if((Menu = UserGetMenuObject(hMenu))) { // IntReleaseMenuObject(Menu); return TRUE; @@ -550,7 +550,7 @@ } else if (0 != (CurItem->fType & MF_POPUP)) { - MenuObject = IntGetMenuObject(CurItem->hSubMenu); + MenuObject = UserGetMenuObject(CurItem->hSubMenu); if (NULL != MenuObject) { ret = UserGetMenuItemByFlag(MenuObject, uSearchBy, fFlag, @@ -756,7 +756,7 @@ /* Make sure the submenu is marked as a popup menu */ if (MenuItem->hSubMenu) { - SubMenuObject = IntGetMenuObject(MenuItem->hSubMenu); + SubMenuObject = UserGetMenuObject(MenuItem->hSubMenu); if (SubMenuObject != NULL) { SubMenuObject->MenuInfo.Flags |= MF_POPUP; @@ -1159,7 +1159,7 @@ MenuItem->hSubMenu) { - SubMenuObject = IntGetMenuObject(MenuItem->hSubMenu); + SubMenuObject = UserGetMenuObject(MenuItem->hSubMenu); if(!SubMenuObject || (SubMenuObject == MenuObject)) break; @@ -1301,7 +1301,7 @@ DPRINT("Enter NtUserBuildMenuItemList\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1342,7 +1342,7 @@ DPRINT("Enter NtUserCheckMenuItem\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hmenu); + MenuObject = UserGetMenuObject(hmenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1422,7 +1422,7 @@ DPRINT("Enter NtUserDeleteMenu\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1451,7 +1451,7 @@ DPRINT("Enter NtUserDestroyMenu\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1487,7 +1487,7 @@ DPRINT("Enter NtUserEnableMenuItem\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1521,7 +1521,7 @@ DPRINT("Enter NtUserInsertMenuItem\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1577,7 +1577,7 @@ DPRINT("Enter NtUserGetMenuDefaultItem\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1648,7 +1648,7 @@ DPRINT("Enter NtUserGetMenuItemRect\n"); UserEnterExclusive(); - Menu = IntGetMenuObject(hMenu); + Menu = UserGetMenuObject(hMenu); if(!Menu) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1722,7 +1722,7 @@ SetLastWin32Error(ERROR_INVALID_HANDLE); RETURN(FALSE); } - MenuObject = IntGetMenuObject(hmenu); + MenuObject = UserGetMenuObject(hmenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1779,7 +1779,7 @@ RETURN(FALSE); } - MenuObject = IntGetMenuObject(Menu); + MenuObject = UserGetMenuObject(Menu); if (NULL == MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1834,7 +1834,7 @@ DPRINT("Enter NtUserMenuItemFromPoint\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(Menu); + MenuObject = UserGetMenuObject(Menu); if (NULL == MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1892,7 +1892,7 @@ DPRINT("Enter NtUserMenuItemInfo\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(Menu); + MenuObject = UserGetMenuObject(Menu); if (NULL == MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -1996,7 +1996,7 @@ DPRINT("Enter NtUserRemoveMenu\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -2026,7 +2026,7 @@ DPRINT("Enter NtUserSetMenuContextHelpId\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hmenu); + MenuObject = UserGetMenuObject(hmenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -2057,7 +2057,7 @@ DPRINT("Enter NtUserSetMenuDefaultItem\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -2086,7 +2086,7 @@ DPRINT("Enter NtUserSetMenuFlagRtoL\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); @@ -2159,7 +2159,7 @@ DPRINT("Enter NtUserTrackPopupMenuEx\n"); UserEnterExclusive(); - MenuObject = IntGetMenuObject(hmenu); + MenuObject = UserGetMenuObject(hmenu); if(!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE); _____ Modified: branches/hardons1stbranch/win32k/ntuser/misc.c --- branches/hardons1stbranch/win32k/ntuser/misc.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/misc.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -427,7 +427,7 @@ case TWOPARAM_ROUTINE_SETMENUBARHEIGHT: { DWORD Ret; - PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1); + PMENU_OBJECT MenuObject = UserGetMenuObject((HMENU)Param1); if(!MenuObject) RETURN( 0); @@ -445,7 +445,7 @@ { BOOL Ret; SETMENUITEMRECT smir; - PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1); + PMENU_OBJECT MenuObject = UserGetMenuObject((HMENU)Param1); if(!MenuObject) RETURN( 0); @@ -722,7 +722,7 @@ DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n"); Ret = FALSE; if (!((Window->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD)) break; - MenuObject = IntGetMenuObject((HMENU) Window->IDMenu); + MenuObject = UserGetMenuObject((HMENU) Window->IDMenu); if(MenuObject == NULL) break; MenuObject->MenuInfo.WndOwner = hWnd; MenuObject->MenuInfo.Height = 0; _____ Modified: branches/hardons1stbranch/win32k/ntuser/monitor.c --- branches/hardons1stbranch/win32k/ntuser/monitor.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/monitor.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -81,11 +81,13 @@ PMONITOR_OBJECT FASTCALL UserCreateMonitorObject(HANDLE* h) { PVOID mem; + PWINSTATION_OBJECT WinSta; mem = ExAllocatePool(PagedPool, sizeof(MONITOR_OBJECT)); if (!mem) return NULL; - - *h = UserAllocHandle(mem, USER_MONITOR); + WinSta = UserGetCurrentWinSta(); + + *h = UserAllocHandle(&WinSta->HandleTable, mem, USER_MONITOR); if (!*h){ ExFreePool(mem); return NULL; @@ -143,7 +145,10 @@ PMONITOR_OBJECT UserGetMonitorObject(HANDLE hCursor) { - return (PMONITOR_OBJECT)UserGetObject(hCursor, USER_MONITOR ); + PWINSTATION_OBJECT WinSta; + WinSta = UserGetCurrentWinSta(); + + return (PMONITOR_OBJECT)UserGetObject(&WinSta->HandleTable, hCursor, USER_MONITOR ); } _____ Modified: branches/hardons1stbranch/win32k/ntuser/window.c --- branches/hardons1stbranch/win32k/ntuser/window.c 2005-07-27 11:48:46 UTC (rev 16797) +++ branches/hardons1stbranch/win32k/ntuser/window.c 2005-07-27 12:01:05 UTC (rev 16798) @@ -105,7 +105,9 @@ PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd) { - return (PWINDOW_OBJECT)UserGetObject(hWnd, USER_WINDOW ); + PWINSTATION_OBJECT WinSta; + WinSta = UserGetCurrentWinSta(); + return (PWINDOW_OBJECT)UserGetObject(&WinSta->HandleTable, hWnd, USER_WINDOW ); } @@ -398,14 +400,14 @@ #endif if (!(Window->Style & WS_CHILD) && Window->IDMenu - && (Menu = IntGetMenuObject((HMENU)Window->IDMenu))) + && (Menu = UserGetMenuObject((HMENU)Window->IDMenu))) { IntDestroyMenuObject(Menu, TRUE, TRUE); Window->IDMenu = 0; } if(Window->SystemMenu - && (Menu = IntGetMenuObject(Window->SystemMenu))) + && (Menu = UserGetMenuObject(Window->SystemMenu))) { IntDestroyMenuObject(Menu, TRUE, TRUE); Window->SystemMenu = (HMENU)0; @@ -419,9 +421,6 @@ IntUnlinkWindow(Window); - //'FIXME IntReferenceWindowObject(Window); - - IntDestroyScrollBars(Window); /* remove the window from the class object */ @@ -445,16 +444,19 @@ MsqRemoveWindowMessagesFromQueue(Window); - //ObmCloseHandle(ThreadData->Desktop->WindowStation->HandleTable, Window->Self); - UserFreeHandle(Window->Self); + UserFreeWindowObject(Window); -// memset(Window, 0x -//memset( void *dest, int c, size_t count ); - RtlZeroMemory(Window, sizeof(WINDOW_OBJECT)); - return 0; } +inline VOID FASTCALL UserFreeWindowObject(PWINDOW_OBJECT Wnd) +{ + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); + UserFreeHandle(&WinSta->HandleTable, Wnd->Self); + RtlZeroMemory(Wnd, sizeof(WINDOW_OBJECT) + Wnd->ExtraDataSize); + ExFreePool(Wnd); +} + VOID FASTCALL IntGetWindowBorderMeasures(PWINDOW_OBJECT WindowObject, UINT *cx, UINT *cy) { @@ -515,7 +517,7 @@ if (0 != WindowObject->IDMenu) { - OldMenuObject = IntGetMenuObject((HMENU) WindowObject->IDMenu); + OldMenuObject = UserGetMenuObject((HMENU) WindowObject->IDMenu); ASSERT(NULL == OldMenuObject || OldMenuObject->MenuInfo.Wnd == WindowObject->Self); } else @@ -525,7 +527,7 @@ if (NULL != Menu) { - NewMenuObject = IntGetMenuObject(Menu); + NewMenuObject = UserGetMenuObject(Menu); if (NULL == NewMenuObject) { // if (NULL != OldMenuObject) @@ -670,7 +672,7 @@ if(WindowObject->SystemMenu) { - MenuObject = IntGetMenuObject(WindowObject->SystemMenu); + MenuObject = UserGetMenuObject(WindowObject->SystemMenu); if(MenuObject) { IntDestroyMenuObject(MenuObject, FALSE, TRUE); @@ -681,7 +683,7 @@ if(W32Thread->Desktop->WindowStation->SystemMenuTemplate) { /* clone system menu */ - MenuObject = IntGetMenuObject(W32Thread->Desktop->WindowStation->SystemMenuTemplate); + MenuObject = UserGetMenuObject(W32Thread->Desktop->WindowStation->SystemMenuTemplate) ; if(!MenuObject) return NULL; @@ -702,7 +704,7 @@ { return NULL; } - SysMenuObject = IntGetMenuObject(SysMenu); + SysMenuObject = UserGetMenuObject(SysMenu); if (NULL == SysMenuObject) { NtUserDestroyMenu(SysMenu); @@ -716,7 +718,7 @@ NtUserDestroyMenu(SysMenu); return NULL; } - MenuObject = IntGetMenuObject(NewMenu); + MenuObject = UserGetMenuObject(NewMenu); if(!MenuObject) { NtUserDestroyMenu(SysMenu); @@ -752,7 +754,7 @@ else { if(WindowObject->SystemMenu) - return IntGetMenuObject((HMENU)WindowObject->SystemMenu); + return UserGetMenuObject((HMENU)WindowObject->SystemMenu); else return NULL; } @@ -1015,7 +1017,7 @@ PMENU_OBJECT OldMenuObject; if(WindowObject->SystemMenu) { - OldMenuObject = IntGetMenuObject(WindowObject->SystemMenu); + OldMenuObject = UserGetMenuObject(WindowObject->SystemMenu); if(OldMenuObject) { OldMenuObject->MenuInfo.Flags &= ~ MF_SYSMENU; @@ -1383,11 +1385,11 @@ PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes) { PVOID mem; - + PWINSTATION_OBJECT WinSta = UserGetCurrentWinSta(); mem = ExAllocatePool(PagedPool, bytes); if (!mem) return NULL; RtlZeroMemory(mem, bytes); - *h = UserAllocHandle(mem, USER_WINDOW); + *h = UserAllocHandle(&WinSta->HandleTable, mem, USER_WINDOW); if (!*h){ ExFreePool(mem); return NULL; @@ -3098,7 +3100,7 @@ /* * Assign new menu handle. */ - MenuObject = IntGetMenuObject(hMenu); + MenuObject = UserGetMenuObject(hMenu); if (!MenuObject) { SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
19 years, 6 months
1
0
0
0
[weiden] 16797: delete obsolete branch
by weiden@svn.reactos.com
delete obsolete branch Deleted: branches/win32k_user_rewrite/
19 years, 6 months
1
0
0
0
[weiden] 16796: delete obsolete branch
by weiden@svn.reactos.com
delete obsolete branch Deleted: branches/win32k_user_reconstruction/
19 years, 6 months
1
0
0
0
[gdalsnes] 16795: move stuff
by gdalsnes@svn.reactos.com
move stuff Added: branches/hardons1stbranch/inc_w32k/ Added: branches/hardons1stbranch/inc_w32k/bitmaps.h Added: branches/hardons1stbranch/inc_w32k/brush.h Added: branches/hardons1stbranch/inc_w32k/callback.h Added: branches/hardons1stbranch/inc_w32k/caret.h Added: branches/hardons1stbranch/inc_w32k/cliprgn.h Added: branches/hardons1stbranch/inc_w32k/color.h Added: branches/hardons1stbranch/inc_w32k/coord.h Added: branches/hardons1stbranch/inc_w32k/cursoricon.h Added: branches/hardons1stbranch/inc_w32k/dc.h Added: branches/hardons1stbranch/inc_w32k/driver.h Added: branches/hardons1stbranch/inc_w32k/fillshap.h Added: branches/hardons1stbranch/inc_w32k/float.h Added: branches/hardons1stbranch/inc_w32k/font.h Added: branches/hardons1stbranch/inc_w32k/gdiobj.h Added: branches/hardons1stbranch/inc_w32k/icm.h Added: branches/hardons1stbranch/inc_w32k/kapi.h Added: branches/hardons1stbranch/inc_w32k/line.h Added: branches/hardons1stbranch/inc_w32k/math.h Added: branches/hardons1stbranch/inc_w32k/menu.h Added: branches/hardons1stbranch/inc_w32k/metafile.h Added: branches/hardons1stbranch/inc_w32k/misc.h Added: branches/hardons1stbranch/inc_w32k/ntddraw.h Added: branches/hardons1stbranch/inc_w32k/ntuser.h Added: branches/hardons1stbranch/inc_w32k/paint.h Added: branches/hardons1stbranch/inc_w32k/path.h Added: branches/hardons1stbranch/inc_w32k/pen.h Added: branches/hardons1stbranch/inc_w32k/print.h Added: branches/hardons1stbranch/inc_w32k/region.h Added: branches/hardons1stbranch/inc_w32k/text.h Added: branches/hardons1stbranch/inc_w32k/win32.h Added: branches/hardons1stbranch/inc_w32k/win32k.h Added: branches/hardons1stbranch/inc_w32k/wingl.h _____ Copied: branches/hardons1stbranch/inc_w32k/bitmaps.h (from rev 16794, branches/hardons1stbranch/bitmaps.h) _____ Copied: branches/hardons1stbranch/inc_w32k/brush.h (from rev 16794, branches/hardons1stbranch/brush.h) _____ Copied: branches/hardons1stbranch/inc_w32k/callback.h (from rev 16794, branches/hardons1stbranch/callback.h) _____ Copied: branches/hardons1stbranch/inc_w32k/caret.h (from rev 16794, branches/hardons1stbranch/caret.h) _____ Copied: branches/hardons1stbranch/inc_w32k/cliprgn.h (from rev 16794, branches/hardons1stbranch/cliprgn.h) _____ Copied: branches/hardons1stbranch/inc_w32k/color.h (from rev 16794, branches/hardons1stbranch/color.h) _____ Copied: branches/hardons1stbranch/inc_w32k/coord.h (from rev 16794, branches/hardons1stbranch/coord.h) _____ Copied: branches/hardons1stbranch/inc_w32k/cursoricon.h (from rev 16794, branches/hardons1stbranch/cursoricon.h) _____ Copied: branches/hardons1stbranch/inc_w32k/dc.h (from rev 16794, branches/hardons1stbranch/dc.h) _____ Copied: branches/hardons1stbranch/inc_w32k/driver.h (from rev 16794, branches/hardons1stbranch/driver.h) _____ Copied: branches/hardons1stbranch/inc_w32k/fillshap.h (from rev 16794, branches/hardons1stbranch/fillshap.h) _____ Copied: branches/hardons1stbranch/inc_w32k/float.h (from rev 16794, branches/hardons1stbranch/float.h) _____ Copied: branches/hardons1stbranch/inc_w32k/font.h (from rev 16794, branches/hardons1stbranch/font.h) _____ Copied: branches/hardons1stbranch/inc_w32k/gdiobj.h (from rev 16794, branches/hardons1stbranch/gdiobj.h) _____ Copied: branches/hardons1stbranch/inc_w32k/icm.h (from rev 16794, branches/hardons1stbranch/icm.h) _____ Copied: branches/hardons1stbranch/inc_w32k/kapi.h (from rev 16794, branches/hardons1stbranch/kapi.h) _____ Copied: branches/hardons1stbranch/inc_w32k/line.h (from rev 16794, branches/hardons1stbranch/line.h) _____ Copied: branches/hardons1stbranch/inc_w32k/math.h (from rev 16794, branches/hardons1stbranch/math.h) _____ Copied: branches/hardons1stbranch/inc_w32k/menu.h (from rev 16794, branches/hardons1stbranch/menu.h) _____ Copied: branches/hardons1stbranch/inc_w32k/metafile.h (from rev 16794, branches/hardons1stbranch/metafile.h) _____ Copied: branches/hardons1stbranch/inc_w32k/misc.h (from rev 16794, branches/hardons1stbranch/misc.h) _____ Copied: branches/hardons1stbranch/inc_w32k/ntddraw.h (from rev 16794, branches/hardons1stbranch/ntddraw.h) _____ Copied: branches/hardons1stbranch/inc_w32k/ntuser.h (from rev 16794, branches/hardons1stbranch/ntuser.h) _____ Copied: branches/hardons1stbranch/inc_w32k/paint.h (from rev 16794, branches/hardons1stbranch/paint.h) _____ Copied: branches/hardons1stbranch/inc_w32k/path.h (from rev 16794, branches/hardons1stbranch/path.h) _____ Copied: branches/hardons1stbranch/inc_w32k/pen.h (from rev 16794, branches/hardons1stbranch/pen.h) _____ Copied: branches/hardons1stbranch/inc_w32k/print.h (from rev 16794, branches/hardons1stbranch/print.h) _____ Copied: branches/hardons1stbranch/inc_w32k/region.h (from rev 16794, branches/hardons1stbranch/region.h) _____ Copied: branches/hardons1stbranch/inc_w32k/text.h (from rev 16794, branches/hardons1stbranch/text.h) _____ Copied: branches/hardons1stbranch/inc_w32k/win32.h (from rev 16794, branches/hardons1stbranch/win32.h) _____ Copied: branches/hardons1stbranch/inc_w32k/win32k.h (from rev 16794, branches/hardons1stbranch/win32k.h) _____ Copied: branches/hardons1stbranch/inc_w32k/wingl.h (from rev 16794, branches/hardons1stbranch/wingl.h)
19 years, 6 months
1
0
0
0
[gdalsnes] 16794: my 1st
by gdalsnes@svn.reactos.com
my 1st Added: branches/hardons1stbranch/win32k/ Modified: branches/hardons1stbranch/win32k/eng/window.c Modified: branches/hardons1stbranch/win32k/include/caret.h Modified: branches/hardons1stbranch/win32k/include/class.h Modified: branches/hardons1stbranch/win32k/include/cursoricon.h Modified: branches/hardons1stbranch/win32k/include/dce.h Modified: branches/hardons1stbranch/win32k/include/desktop.h Modified: branches/hardons1stbranch/win32k/include/focus.h Modified: branches/hardons1stbranch/win32k/include/guicheck.h Modified: branches/hardons1stbranch/win32k/include/hook.h Modified: branches/hardons1stbranch/win32k/include/intgdi.h Added: branches/hardons1stbranch/win32k/include/keyboard.h Modified: branches/hardons1stbranch/win32k/include/menu.h Modified: branches/hardons1stbranch/win32k/include/msgqueue.h Added: branches/hardons1stbranch/win32k/include/ntuser.h Modified: branches/hardons1stbranch/win32k/include/object.h Modified: branches/hardons1stbranch/win32k/include/painting.h Modified: branches/hardons1stbranch/win32k/include/timer.h Modified: branches/hardons1stbranch/win32k/include/win32k.h Modified: branches/hardons1stbranch/win32k/include/window.h Modified: branches/hardons1stbranch/win32k/include/winpos.h Modified: branches/hardons1stbranch/win32k/include/winsta.h Modified: branches/hardons1stbranch/win32k/main/dllmain.c Deleted: branches/hardons1stbranch/win32k/misc/object.c Modified: branches/hardons1stbranch/win32k/ntuser/accelerator.c Modified: branches/hardons1stbranch/win32k/ntuser/callback.c Modified: branches/hardons1stbranch/win32k/ntuser/caret.c Modified: branches/hardons1stbranch/win32k/ntuser/class.c Modified: branches/hardons1stbranch/win32k/ntuser/clipboard.c Modified: branches/hardons1stbranch/win32k/ntuser/csr.c Modified: branches/hardons1stbranch/win32k/ntuser/cursoricon.c Modified: branches/hardons1stbranch/win32k/ntuser/desktop.c Modified: branches/hardons1stbranch/win32k/ntuser/focus.c Modified: branches/hardons1stbranch/win32k/ntuser/guicheck.c Added: branches/hardons1stbranch/win32k/ntuser/handle.c Modified: branches/hardons1stbranch/win32k/ntuser/hook.c Modified: branches/hardons1stbranch/win32k/ntuser/hotkey.c Modified: branches/hardons1stbranch/win32k/ntuser/input.c Modified: branches/hardons1stbranch/win32k/ntuser/keyboard.c Modified: branches/hardons1stbranch/win32k/ntuser/menu.c Modified: branches/hardons1stbranch/win32k/ntuser/message.c Modified: branches/hardons1stbranch/win32k/ntuser/metric.c Modified: branches/hardons1stbranch/win32k/ntuser/misc.c Modified: branches/hardons1stbranch/win32k/ntuser/monitor.c Modified: branches/hardons1stbranch/win32k/ntuser/msgqueue.c Added: branches/hardons1stbranch/win32k/ntuser/ntuser.c Modified: branches/hardons1stbranch/win32k/ntuser/painting.c Modified: branches/hardons1stbranch/win32k/ntuser/prop.c Modified: branches/hardons1stbranch/win32k/ntuser/scrollbar.c Modified: branches/hardons1stbranch/win32k/ntuser/timer.c Modified: branches/hardons1stbranch/win32k/ntuser/vis.c Modified: branches/hardons1stbranch/win32k/ntuser/windc.c Modified: branches/hardons1stbranch/win32k/ntuser/window.c Modified: branches/hardons1stbranch/win32k/ntuser/winpos.c Modified: branches/hardons1stbranch/win32k/ntuser/winsta.c Modified: branches/hardons1stbranch/win32k/objects/color.c Modified: branches/hardons1stbranch/win32k/objects/dc.c Modified: branches/hardons1stbranch/win32k/win32k.xml _____ Copied: branches/hardons1stbranch/win32k (from rev 16681, trunk/reactos/subsys/win32k) _____ Modified: branches/hardons1stbranch/win32k/eng/window.c --- trunk/reactos/subsys/win32k/eng/window.c 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/eng/window.c 2005-07-27 11:08:35 UTC (rev 16794) @@ -155,7 +155,6 @@ ASSERT_IRQL(PASSIVE_LEVEL); - ExAcquireFastMutex(&Window->WndObjListLock); CurrentEntry = Window->WndObjListHead.Flink; while (CurrentEntry != &Window->WndObjListHead) { @@ -189,7 +188,6 @@ } } - ExReleaseFastMutex(&Window->WndObjListLock); } /* @@ -222,7 +220,6 @@ WndObjInt = EngAllocMem(0, sizeof (WNDGDI), TAG_WNDOBJ); if (WndObjInt == NULL) { - IntReleaseWindowObject(Window); DPRINT1("Failed to allocate memory for a WND structure!\n"); return NULL; } @@ -231,7 +228,6 @@ WndObjInt->ClientClipObj = NULL; if (!IntEngWndUpdateClipObj(WndObjInt, Window)) { - IntReleaseWindowObject(Window); EngFreeMem(WndObjInt); return NULL; } @@ -248,13 +244,8 @@ WndObjInt->PixelFormat = iPixelFormat; /* associate object with window */ - ExAcquireFastMutex(&Window->WndObjListLock); InsertTailList(&Window->WndObjListHead, &WndObjInt->ListEntry); - ExReleaseFastMutex(&Window->WndObjListLock); - /* release resources */ - IntReleaseWindowObject(Window); - DPRINT("EngCreateWnd: SUCCESS!\n"); return WndObjUser; @@ -284,10 +275,7 @@ else { /* Remove object from window */ - ExAcquireFastMutex(&Window->WndObjListLock); RemoveEntryList(&WndObjInt->ListEntry); - ExReleaseFastMutex(&Window->WndObjListLock); - IntReleaseWindowObject(Window); } /* Free resources */ _____ Modified: branches/hardons1stbranch/win32k/include/caret.h --- trunk/reactos/subsys/win32k/include/caret.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/caret.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -4,19 +4,16 @@ #define IDCARETTIMER (0xffff) BOOL FASTCALL -IntDestroyCaret(PW32THREAD Win32Thread); +UserDestroyCaret(PW32THREAD Win32Thread); BOOL FASTCALL -IntSetCaretBlinkTime(UINT uMSeconds); +UserSetCaretBlinkTime(UINT uMSeconds); BOOL FASTCALL -IntSetCaretPos(int X, int Y); +UserSwitchCaretShowing(PVOID Info); -BOOL FASTCALL -IntSwitchCaretShowing(PVOID Info); - VOID FASTCALL -IntDrawCaret(HWND hWnd); +UserDrawCaret(HWND hWnd); #endif /* _WIN32K_CARET_H */ _____ Modified: branches/hardons1stbranch/win32k/include/class.h --- trunk/reactos/subsys/win32k/include/class.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/class.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -24,7 +24,6 @@ LIST_ENTRY ListEntry; PCHAR ExtraData; /* list of windows */ - FAST_MUTEX ClassWindowsListLock; LIST_ENTRY ClassWindowsListHead; } WNDCLASS_OBJECT, *PWNDCLASS_OBJECT; @@ -34,18 +33,6 @@ NTSTATUS FASTCALL CleanupClassImpl(VOID); -#define IntLockProcessClasses(W32Process) \ - ExAcquireFastMutex(&(W32Process)->ClassListLock) - -#define IntUnLockProcessClasses(W32Process) \ - ExReleaseFastMutex(&(W32Process)->ClassListLock) - -#define IntLockClassWindows(ClassObj) \ - ExAcquireFastMutex(&(ClassObj)->ClassWindowsListLock) - -#define IntUnLockClassWindows(ClassObj) \ - ExReleaseFastMutex(&(ClassObj)->ClassWindowsListLock) - #define ClassDereferenceObject(ClassObj) \ ObmDereferenceObject(ClassObj) @@ -67,9 +54,9 @@ LPCWSTR ClassNameOrAtom, HINSTANCE hInstance); -struct _WINDOW_OBJECT; +//PWINDOW_OBJECT; ULONG FASTCALL -IntGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset, BOOL Ansi); +UserGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, BOOL Ansi); #endif /* _WIN32K_CLASS_H */ _____ Modified: branches/hardons1stbranch/win32k/include/cursoricon.h --- trunk/reactos/subsys/win32k/include/cursoricon.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/cursoricon.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -13,7 +13,6 @@ { LIST_ENTRY ListEntry; HANDLE Self; - FAST_MUTEX Lock; LIST_ENTRY ProcessList; HMODULE hModule; HRSRC hRsrc; @@ -37,7 +36,6 @@ BOOL Enabled; BOOL SwapButtons; UINT ButtonsDown; - FAST_MUTEX CursorMutex; CURSORCLIP_INFO CursorClipInfo; PCURICON_OBJECT CurrentCursorObject; BYTE ShowingCursor; @@ -50,26 +48,17 @@ HANDLE LastClkWnd; } SYSTEM_CURSORINFO, *PSYSTEM_CURSORINFO; -HCURSOR FASTCALL IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, BOOL ForceChange); -BOOL FASTCALL IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject); -PCURICON_OBJECT FASTCALL IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle); -PCURICON_OBJECT FASTCALL IntCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject); -VOID FASTCALL IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process); +HCURSOR FASTCALL UserSetCursor(PCURICON_OBJECT NewCursor, BOOL ForceChange); +BOOL FASTCALL UserSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject); +PCURICON_OBJECT FASTCALL UserCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject); +VOID FASTCALL UserCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process); -BOOL FASTCALL IntGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc); +BOOL FASTCALL +UserGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc); -#define IntGetSysCursorInfo(WinStaObj) \ +#define UserGetSysCursorInfo(WinStaObj) \ (PSYSTEM_CURSORINFO)((WinStaObj)->SystemCursor) -#define IntReleaseCurIconObject(CurIconObj) \ - ObmDereferenceObject(CurIconObj) - -#define IntLockProcessCursorIcons(W32Process) \ - ExAcquireFastMutex(&W32Process->CursorIconListLock) - -#define IntUnLockProcessCursorIcons(W32Process) \ - ExReleaseFastMutex(&W32Process->CursorIconListLock) - #endif /* _WIN32K_CURSORICON_H */ /* EOF */ _____ Modified: branches/hardons1stbranch/win32k/include/dce.h --- trunk/reactos/subsys/win32k/include/dce.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/dce.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -50,7 +50,7 @@ #define DCEOBJ_UnlockDCE(pDCE) GDIOBJ_UnlockObjByPtr(pDCE) BOOL INTERNAL_CALL DCE_Cleanup(PVOID ObjectBody); -PDCE FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type); +PDCE FASTCALL UserDceAllocDCE(HWND hWnd, DCE_TYPE Type); PDCE FASTCALL DCE_FreeDCE(PDCE dce); VOID FASTCALL DCE_FreeWindowDCE(HWND); HRGN STDCALL DceGetVisRgn(HWND hWnd, ULONG Flags, HWND hWndChild, ULONG CFlags); _____ Modified: branches/hardons1stbranch/win32k/include/desktop.h --- trunk/reactos/subsys/win32k/include/desktop.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/desktop.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -64,23 +64,23 @@ HDC FASTCALL IntGetScreenDC(VOID); -HWND FASTCALL -IntGetDesktopWindow (VOID); +PWINDOW_OBJECT FASTCALL +UserGetDesktopWindow (VOID); HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID); PUSER_MESSAGE_QUEUE FASTCALL -IntGetFocusMessageQueue(VOID); +UserGetFocusMessageQueue(VOID); VOID FASTCALL IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue); PDESKTOP_OBJECT FASTCALL -IntGetActiveDesktop(VOID); +UserGetActiveDesktop(VOID); NTSTATUS FASTCALL -IntShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height); +UserShowDesktop(PDESKTOP_OBJECT Desktop, ULONG Width, ULONG Height); NTSTATUS FASTCALL IntHideDesktop(PDESKTOP_OBJECT Desktop); _____ Modified: branches/hardons1stbranch/win32k/include/focus.h --- trunk/reactos/subsys/win32k/include/focus.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/focus.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -4,22 +4,25 @@ /* * These functions take the window handles from current message queue. */ -HWND FASTCALL -IntGetCaptureWindow(); -HWND FASTCALL -IntGetFocusWindow(); +PWINDOW_OBJECT FASTCALL +UserGetCaptureWindow(); +PWINDOW_OBJECT FASTCALL +UserGetFocusWindow(); +PWINDOW_OBJECT FASTCALL +IntGetForegroundWindow(VOID); + /* * These functions take the window handles from current thread queue. */ -HWND FASTCALL -IntGetThreadFocusWindow(); +PWINDOW_OBJECT FASTCALL +UserGetThreadFocusWindow(); BOOL FASTCALL IntMouseActivateWindow(PWINDOW_OBJECT Window); BOOL FASTCALL IntSetForegroundWindow(PWINDOW_OBJECT Window); -HWND FASTCALL +PWINDOW_OBJECT FASTCALL IntSetActiveWindow(PWINDOW_OBJECT Window); #endif /* _WIN32K_FOCUS_H */ _____ Modified: branches/hardons1stbranch/win32k/include/guicheck.h --- trunk/reactos/subsys/win32k/include/guicheck.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/guicheck.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -1,12 +1,14 @@ #ifndef _WIN32K_GUICHECK_H #define _WIN32K_GUICHECK_H -BOOL FASTCALL IntGraphicsCheck(BOOL Create); BOOL FASTCALL IntCreatePrimarySurface(); VOID FASTCALL IntDestroyPrimarySurface(); NTSTATUS FASTCALL InitGuiCheckImpl (VOID); +BOOL FASTCALL +UserGraphicsCheck(BOOL Create); + #endif /* _WIN32K_GUICHECK_H */ /* EOF */ _____ Modified: branches/hardons1stbranch/win32k/include/hook.h --- trunk/reactos/subsys/win32k/include/hook.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/hook.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -19,7 +19,6 @@ typedef struct tagHOOKTABLE { - FAST_MUTEX Lock; LIST_ENTRY Hooks[NB_HOOKS]; /* array of hook chains */ UINT Counts[NB_HOOKS]; /* use counts for each hook chain */ } HOOKTABLE, *PHOOKTABLE; @@ -27,12 +26,6 @@ LRESULT FASTCALL HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam); VOID FASTCALL HOOK_DestroyThreadHooks(PETHREAD Thread); -#define IntLockHookTable(HookTable) \ - ExAcquireFastMutex(&HookTable->Lock) - -#define IntUnLockHookTable(HookTable) \ - ExReleaseFastMutex(&HookTable->Lock) - #endif /* _WIN32K_HOOK_H */ /* EOF */ _____ Modified: branches/hardons1stbranch/win32k/include/intgdi.h --- trunk/reactos/subsys/win32k/include/intgdi.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/intgdi.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -144,7 +144,8 @@ PUNICODE_STRING Device, PUNICODE_STRING Output, CONST PDEVMODEW InitData, - BOOL CreateAsIC); + BOOL CreateAsIC, + BOOL CalledFromUser); COLORREF FASTCALL IntGetDCColor(HDC hDC, ULONG Object); @@ -206,17 +207,19 @@ LPCSTR InData, LPVOID OutData); +//FIXME: move to user hdrs BOOL FASTCALL -IntEnumDisplaySettings( +UserEnumDisplaySettings( IN PUNICODE_STRING pDeviceName OPTIONAL, IN DWORD iModeNum, IN OUT LPDEVMODEW pDevMode, IN DWORD dwFlags); +//FIXME: move to user hdrs LONG FASTCALL -IntChangeDisplaySettings( +UserChangeDisplaySettings( IN PUNICODE_STRING pDeviceName OPTIONAL, IN LPDEVMODEW pDevMode, IN DWORD dwflags, _____ Added: branches/hardons1stbranch/win32k/include/keyboard.h --- trunk/reactos/subsys/win32k/include/keyboard.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/keyboard.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -0,0 +1,226 @@ +#ifndef _WIN32K_KEYBOARD_H +#define _WIN32K_KEYBOARD_H + +DWORD FASTCALL +UserGetKeyState(DWORD key); + +/* handle.h */ + +VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes); +HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type ); +PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type ); +PVOID UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle ); +PVOID UserGetNextHandle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type ); + + +/************* DESKTOP.C *****************/ + +inline PDESKTOP_OBJECT FASTCALL UserGetCurrentDesktop(); + + + + +/* accelerator.c */ + +PACCELERATOR_TABLE UserGetAcceleratorTable(HACCEL hAccel); +PACCELERATOR_TABLE UserAllocAcceleratorTable(HACCEL* h); + +PACCELERATOR_TABLE UserCreateAcceleratorTableObject(HACCEL* h); + + +/* metric.c */ +ULONG FASTCALL +UserGetSystemMetrics(ULONG Index); + +/* input.h */ +NTSTATUS FASTCALL +UserAcquireOrReleaseInputOwnership(BOOLEAN Release); + +/* focus.c */ +PWINDOW_OBJECT FASTCALL +UserSetFocus(PWINDOW_OBJECT Wnd OPTIONAL); + + +/* painting.c */ +DWORD FASTCALL +UserInvalidateRect(PWINDOW_OBJECT Wnd, CONST RECT *Rect, BOOL Erase); + +DWORD FASTCALL +UserScrollDC(HDC hDC, INT dx, INT dy, const RECT *lprcScroll, + const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate); + +INT FASTCALL +UserGetUpdateRgn(PWINDOW_OBJECT Window, HRGN hRgn, BOOL bErase); + +/* message.c */ +BOOL FASTCALL +UserPostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); + +/* window.c */ +PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd); + +PWINDOW_OBJECT FASTCALL UserCreateWindowObject(HWND* h, ULONG bytes); + +PWINDOW_OBJECT FASTCALL +UserGetWindow(PWINDOW_OBJECT Wnd, UINT Relationship); + +LONG FASTCALL +UserGetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, BOOL Ansi); + +LONG FASTCALL +UserSetWindowLong(PWINDOW_OBJECT Wnd, DWORD Index, LONG NewValue, BOOL Ansi); + +BOOLEAN FASTCALL +UserDestroyWindow(PWINDOW_OBJECT Wnd); + +HWND FASTCALL +GetHwnd(PWINDOW_OBJECT Wnd); + +/************************* WINSTA.C ****************************/ + +inline PWINSTATION_OBJECT FASTCALL UserGetCurrentWinSta(); + +/************************* MENU.C ****************************/ + +inline PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu); + +HMENU FASTCALL +UserCreateMenu(BOOL PopupMenu); + +PMENU_OBJECT FASTCALL +UserCreateMenuObject(HANDLE* h); + + +/* caret.c */ +BOOL FASTCALL +UserShowCaret(PWINDOW_OBJECT Wnd); + +BOOL FASTCALL +UserSetCaretPos(int X, int Y); + +BOOL FASTCALL +UserHideCaret(PWINDOW_OBJECT Wnd); + +/* winpos.c */ + +BOOL FASTCALL +UserGetClientOrigin(PWINDOW_OBJECT hWnd, LPPOINT Point); + +/* scrollbar.c */ +DWORD FASTCALL +UserShowScrollBar(PWINDOW_OBJECT Wnd, int wBar, DWORD bShow); + +/* timer.c */ + +inline VOID FASTCALL +UserFreeTimer(PTIMER_ENTRY Timer); + +VOID FASTCALL +UserRemoveTimersWindow(PWINDOW_OBJECT Wnd); + +VOID FASTCALL +UserInsertTimer(PTIMER_ENTRY NewTimer); + +VOID FASTCALL +UserSetNextPendingTimer(); + +VOID FASTCALL +UserRemoveTimersQueue(PUSER_MESSAGE_QUEUE Queue); + +/* hook.c*/ +PHOOK FASTCALL +HookCreate(HHOOK* hHook); + +PHOOK FASTCALL HookGet(HHOOK hHook); + +/* class.c */ + +VOID FASTCALL +ClassReferenceClass(PWNDCLASS_OBJECT Class); + +VOID FASTCALL +ClassDereferenceClass(PWNDCLASS_OBJECT Class); + +PWNDCLASS_OBJECT FASTCALL +ClassCreateClass(DWORD bytes); + + +/********************* CURSORI(ICON).C *****************/ + +inline PCURICON_OBJECT FASTCALL +UserGetCursorObject(HCURSOR hCursor); + +VOID FASTCALL +CurIconReferenceCurIcon(PCURICON_OBJECT CurIcon); + +PCURICON_OBJECT UserAllocCursorIcon(HCURSOR* h); +PCURICON_OBJECT UserGetCursorIcon(HCURSOR hCursor); + +VOID FASTCALL +UserDereferenceCurIcon(PCURICON_OBJECT CurIcon); + +VOID FASTCALL +CursorDereference(PCURICON_OBJECT Cursor); + +PCURICON_OBJECT FASTCALL +UserCreateCursorObject(HCURSOR* hCursor, ULONG extraBytes); + +PCURICON_OBJECT FASTCALL +CursorGet(HCURSOR hCursor); + +inline PCURICON_OBJECT FASTCALL +UserGetCursorIconObject(HCURSOR hCursor); + +/* monitor.c */ + +PMONITOR_OBJECT FASTCALL UserCreateMonitorObject(HANDLE* h); + +PMONITOR_OBJECT UserGetMonitorObject(HANDLE hCursor); + + +/* msgqueue.c */ + +VOID FASTCALL +MsqRemoveWindowMessagesFromQueue(PWINDOW_OBJECT pWindow); + +inline BOOL FASTCALL +UserMessageFilter(UINT Message, UINT FilterMin, UINT FilterMax); + +VOID FASTCALL +MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT Wnd); + +VOID FASTCALL +MsqInsertExpiredTimer(PTIMER_ENTRY Timer); + +PTIMER_ENTRY FASTCALL +UserFindExpiredTimer( + PUSER_MESSAGE_QUEUE Queue, + PWINDOW_OBJECT Wnd OPTIONAL, + UINT MsgFilterMin, + UINT MsgFilterMax, + BOOL Remove + ); + +PTIMER_ENTRY FASTCALL +MsqRemoveTimer( + PWINDOW_OBJECT Wnd, + UINT_PTR IDEvent, + UINT Message + ); + +/* windc.c */ + +HDC FASTCALL +UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags); + +INT FASTCALL +UserReleaseDC(PWINDOW_OBJECT Wnd, HDC hDc); + +DWORD FASTCALL +UserGetWindowDC(PWINDOW_OBJECT Wnd); + +/* div */ +#define UserGetCurrentQueue() \ +((PUSER_MESSAGE_QUEUE)PsGetWin32Thread()->MessageQueue) + +#endif /* _WIN32K_KEYBOARD_H */ _____ Modified: branches/hardons1stbranch/win32k/include/menu.h --- trunk/reactos/subsys/win32k/include/menu.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/menu.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -33,7 +33,6 @@ { PEPROCESS Process; LIST_ENTRY ListEntry; - FAST_MUTEX MenuItemsLock; PMENU_ITEM MenuItemList; ROSMENUINFO MenuInfo; BOOL RtoL; @@ -42,21 +41,6 @@ PMENU_OBJECT FASTCALL IntGetMenuObject(HMENU hMenu); -#define IntLockMenuItems(MenuObj) \ - ExAcquireFastMutex(&(MenuObj)->MenuItemsLock) - -#define IntUnLockMenuItems(MenuObj) \ - ExReleaseFastMutex(&(MenuObj)->MenuItemsLock) - -#define IntLockProcessMenus(W32Process) \ - ExAcquireFastMutex(&(W32Process)->MenuListLock) - -#define IntUnLockProcessMenus(W32Process) \ - ExReleaseFastMutex(&(W32Process)->MenuListLock) - -#define IntReleaseMenuObject(MenuObj) \ - ObmDereferenceObject(MenuObj) - BOOL FASTCALL IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, BOOL RemoveFromList, BOOL bRecurse); @@ -78,22 +62,31 @@ IntCloneMenu(PMENU_OBJECT Source); BOOL FASTCALL -IntSetMenuFlagRtoL(PMENU_OBJECT MenuObject); +UserSetMenuFlagRtoL(PMENU_OBJECT MenuObject); BOOL FASTCALL IntSetMenuContextHelpId(PMENU_OBJECT MenuObject, DWORD dwContextHelpId); BOOL FASTCALL -IntGetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); +UserGetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); BOOL FASTCALL IntIsMenu(HMENU hMenu); BOOL FASTCALL -IntSetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); +UserSetMenuInfo(PMENU_OBJECT MenuObject, PROSMENUINFO lpmi); +BOOL FASTCALL +UserMenuItemInfo( + PMENU_OBJECT Menu, + UINT Item, + BOOL ByPosition, + PROSMENUITEMINFO ItemInfo, + BOOL Set + ); + int FASTCALL -IntGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT fFlag, +UserGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT fFlag, PMENU_ITEM *MenuItem, PMENU_ITEM *PrevMenuItem); UINT FASTCALL _____ Modified: branches/hardons1stbranch/win32k/include/msgqueue.h --- trunk/reactos/subsys/win32k/include/msgqueue.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/msgqueue.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -39,16 +39,8 @@ LIST_ENTRY ListEntry; } USER_SENT_MESSAGE_NOTIFY, *PUSER_SENT_MESSAGE_NOTIFY; -typedef struct _TIMER_ENTRY{ - LIST_ENTRY ListEntry; - LARGE_INTEGER ExpiryTime; - HWND Wnd; - UINT_PTR IDEvent; - UINT Period; - TIMERPROC TimerFunc; - UINT Msg; -} TIMER_ENTRY, *PTIMER_ENTRY; + typedef struct _USER_MESSAGE_QUEUE { /* Reference counter, only access this variable with interlocked functions! */ @@ -64,12 +56,11 @@ LIST_ENTRY NotifyMessagesListHead; /* Queue for hardware messages for the queue. */ LIST_ENTRY HardwareMessagesListHead; - /* List of timers, sorted on expiry time (earliest first) */ - LIST_ENTRY TimerListHead; + /* List of expired timers */ + //LIST_ENTRY ExpiredTimersList; + ULONG TimerCount; /* Lock for the hardware message list. */ KMUTEX HardwareLock; - /* Lock for the queue. */ - FAST_MUTEX Lock; /* Pointer to the current WM_MOUSEMOVE message */ PUSER_MESSAGE MouseMoveMsg; /* True if a WM_QUIT message is pending. */ @@ -87,7 +78,7 @@ /* True if a window needs painting. */ BOOLEAN PaintPosted; /* Count of paints pending. */ - ULONG PaintCount; + LONG PaintCount; /* Current active window for this queue. */ HWND ActiveWindow; /* Current capture window for this queue. */ @@ -106,8 +97,10 @@ /* queue state tracking */ WORD WakeMask; - WORD QueueBits; + WORD WakeBits; +// WORD QueueBits; WORD ChangedBits; + WORD ChangedMask; /* extra message information */ LPARAM ExtraInfo; @@ -169,6 +162,11 @@ MsqIncPaintCountQueue(PUSER_MESSAGE_QUEUE Queue); VOID FASTCALL MsqDecPaintCountQueue(PUSER_MESSAGE_QUEUE Queue); + +void cp(char* f, int l); +//#define IntSendMessage(a,b,c,d) (cp(__FILE__,__LINE__), IIntSendMessage(a,b,c,d)) + + LRESULT FASTCALL IntSendMessage(HWND hWnd, UINT Msg, @@ -215,14 +213,7 @@ LPARAM FASTCALL MsqSetMessageExtraInfo(LPARAM lParam); LPARAM FASTCALL MsqGetMessageExtraInfo(VOID); -VOID STDCALL MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$ headers, will be gone in the rewrite! */ -#define IntLockMessageQueue(MsgQueue) \ - ExAcquireFastMutex(&(MsgQueue)->Lock) - -#define IntUnLockMessageQueue(MsgQueue) \ - ExReleaseFastMutex(&(MsgQueue)->Lock) - #define IntLockHardwareMessageQueue(MsgQueue) \ KeWaitForMutexObject(&(MsgQueue)->HardwareLock, UserRequest, KernelMode, FALSE, NULL) @@ -232,19 +223,10 @@ #define IntReferenceMessageQueue(MsgQueue) \ InterlockedIncrement(&(MsgQueue)->References) -#define IntDereferenceMessageQueue(MsgQueue) \ - do { \ - if(InterlockedDecrement(&(MsgQueue)->References) == 0) \ - { \ - DPRINT("Free message queue 0x%x\n", (MsgQueue)); \ - if ((MsgQueue)->NewMessages != NULL) \ - ObDereferenceObject((MsgQueue)->NewMessages); \ - if ((MsgQueue)->NewMessagesHandle != NULL) \ - ZwClose((MsgQueue)->NewMessagesHandle); \ - ExFreePool((MsgQueue)); \ - } \ - } while(0) +VOID FASTCALL +IntDereferenceMessageQueue(PUSER_MESSAGE_QUEUE MsgQueue); + #define IS_BTN_MESSAGE(message,code) \ ((message) == WM_LBUTTON##code || \ (message) == WM_MBUTTON##code || \ @@ -276,8 +258,6 @@ MsqGetFirstTimerExpiry(PUSER_MESSAGE_QUEUE MessageQueue, HWND WndFilter, UINT MsgFilterMin, UINT MsgFilterMax, PLARGE_INTEGER FirstTimerExpiry); -VOID FASTCALL -MsqRemoveTimersWindow(PUSER_MESSAGE_QUEUE MessageQueue, HWND Wnd); #endif /* _WIN32K_MSGQUEUE_H */ _____ Added: branches/hardons1stbranch/win32k/include/ntuser.h --- trunk/reactos/subsys/win32k/include/ntuser.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/ntuser.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -0,0 +1,147 @@ +#ifndef _WIN32K_NTUSER_H +#define _WIN32K_NTUSER_H + +extern char* _file; +extern DWORD _line; +extern DWORD _locked; + +extern FAST_MUTEX UserLock; + +#define DECLARE_RETURN(type) type _ret_ +#define RETURN(value) { _ret_ = value; goto _cleanup_; } +#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_ +#define END_CLEANUP return _ret_; + +#if 0 + +#define UserEnterShared() { \ + UUserEnterShared(); ASSERT(InterlockedIncrement(&_locked) > 0); \ + } + #define UserEnterExclusive() {\ + UUserEnterExclusive(); ASSERT(InterlockedIncrement(&_locked) > 0); \ + } + +#define UserLeave() { ASSERT(InterlockedDecrement(&_locked) >= 0); \ + UUserLeave(); } + +#endif + + +VOID FASTCALL UserStackTrace(); + +#define UserEnterShared() \ +{ \ + DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \ + ASSERT(UserLock.Owner != KeGetCurrentThread()); \ + UUserEnterShared(); \ + ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \ + DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked); \ +} + +#define UserEnterExclusive() \ +{ \ + /* DPRINT1("try lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ + ASSERT(UserLock.Owner != KeGetCurrentThread()); \ + UUserEnterExclusive(); \ + ASSERT(InterlockedIncrement(&_locked) == 1 /*> 0*/); \ + /* DPRINT("got lock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ +} + +#define UserLeave() \ +{ \ + ASSERT(InterlockedDecrement(&_locked) == 0/*>= 0*/); \ + /*DPRINT("unlock, %s, %i (%i)\n",__FILE__,__LINE__, _locked);*/ \ + ASSERT(UserLock.Owner == KeGetCurrentThread()); \ + UUserLeave(); \ +} + + + + + +#define GetWnd(hwnd) IntGetWindowObject(hwnd) + + + + +#if 0 +#define IntLockUserShared() {if(_locked){ DPRINT1("last %s, %i\n",_file,_line);} \ + IIntLockUserShared(); \ + _locked++; _file = __FILE__; _line = __LINE__; \ + } + + #define IntUserEnterExclusive() {if(_locked){ DPRINT1("last %s, %i\n",_file,_line);} \ + IIntUserEnterExclusive(); \ + _locked++; _file = __FILE__; _line = __LINE__; \ + } + + +#define IntUserLeave() { if(!_locked){ DPRINT1("not locked %s, %i\n",__FILE__,__LINE__);} \ + _locked--; IIntUserLeave(); } +#endif + +NTSTATUS FASTCALL InitUserImpl(VOID); +VOID FASTCALL UninitUser(VOID); +VOID FASTCALL UUserEnterShared(VOID); +VOID FASTCALL UUserEnterExclusive(VOID); +VOID FASTCALL UUserLeave(VOID); +BOOL FASTCALL UserIsEntered(); + + + + +#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */ +#define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ + + +typedef struct _USER_HANDLE_ENTRY +{ + void *ptr; /* pointer to object */ + unsigned short type; /* object type (0 if free) */ + unsigned short generation; /* generation counter */ +} USER_HANDLE_ENTRY, * PUSER_HANDLE_ENTRY; + + + +typedef struct _USER_HANDLE_TABLE +{ + PUSER_HANDLE_ENTRY handles; + PUSER_HANDLE_ENTRY freelist; + int nb_handles; + int allocated_handles; +} USER_HANDLE_TABLE, * PUSER_HANDLE_TABLE; + +/* +typedef enum { + otUnknown = 0, + otClass, + otWindow, + otMenu, + otAcceleratorTable, + otCursorIcon, + otHookProc, + otMonitor +} USER_OBJECT_TYPE; +*/ + +typedef enum _USER_OBJECT_TYPE +{ + /* 0 = free */ + USER_CLASS = 1, + USER_WINDOW, + USER_MENU, + USER_ACCELERATOR_TABLE, + USER_CURSOR_ICON, + USER_HOOK_PROC, + USER_MONITOR +} USER_OBJECT_TYPE; + + + + + + + +#endif /* _WIN32K_NTUSER_H */ + +/* EOF */ _____ Modified: branches/hardons1stbranch/win32k/include/object.h --- trunk/reactos/subsys/win32k/include/object.h 2005-07-21 16:28:20 UTC (rev 16681) +++ branches/hardons1stbranch/win32k/include/object.h 2005-07-27 11:08:35 UTC (rev 16794) @@ -5,120 +5,16 @@ #include <win32k/bitmaps.h> #include <win32k/pen.h> -typedef enum { - otUnknown = 0, - otClass, - otWindow, - otMenu, - otAcceleratorTable, - otCursorIcon, - otHookProc, - otMonitor -} USER_OBJECT_TYPE; -typedef struct _USER_OBJECT_HEADER -/* - * Header for user object - */ -{ - USER_OBJECT_TYPE Type; - LONG HandleCount; - LONG RefCount; - CSHORT Size; -} USER_OBJECT_HEADER, *PUSER_OBJECT_HEADER; -typedef struct _USER_HANDLE -{ - PVOID ObjectBody; -} USER_HANDLE, *PUSER_HANDLE; - -#define HANDLE_BLOCK_ENTRIES ((PAGE_SIZE-sizeof(LIST_ENTRY))/sizeof(USER_HANDLE)) - -typedef struct _USER_HANDLE_BLOCK -{ - LIST_ENTRY ListEntry; - USER_HANDLE Handles[HANDLE_BLOCK_ENTRIES]; -} USER_HANDLE_BLOCK, *PUSER_HANDLE_BLOCK; - -typedef struct _USER_HANDLE_TABLE -{ - LIST_ENTRY ListHead; - FAST_MUTEX ListLock; -} USER_HANDLE_TABLE, *PUSER_HANDLE_TABLE; - - -#define ObmpLockHandleTable(HandleTable) \ - ExAcquireFastMutex(&HandleTable->ListLock) - -#define ObmpUnlockHandleTable(HandleTable) \ - ExReleaseFastMutex(&HandleTable->ListLock) - -ULONG FASTCALL -ObmGetReferenceCount( - PVOID ObjectBody); - -ULONG FASTCALL -ObmGetHandleCount( - PVOID ObjectBody); - -VOID FASTCALL -ObmReferenceObject( - PVOID ObjectBody); - -VOID FASTCALL -ObmDereferenceObject( - PVOID ObjectBody); - -NTSTATUS FASTCALL -ObmReferenceObjectByPointer( - PVOID ObjectBody, - USER_OBJECT_TYPE ObjectType); - -PVOID FASTCALL [truncated at 1000 lines; 28242 more skipped]
19 years, 6 months
1
0
0
0
[gdalsnes] 16793: my 1st
by gdalsnes@svn.reactos.com
my 1st Added: branches/hardons1stbranch/ Deleted: branches/hardons1stbranch/debug.h Deleted: branches/hardons1stbranch/debug1.h Modified: branches/hardons1stbranch/kapi.h Modified: branches/hardons1stbranch/ntuser.h _____ Copied: branches/hardons1stbranch (from rev 16677, trunk/reactos/include/win32k) _____ Deleted: branches/hardons1stbranch/debug.h --- trunk/reactos/include/win32k/debug.h 2005-07-21 10:31:29 UTC (rev 16677) +++ branches/hardons1stbranch/debug.h 2005-07-27 11:06:08 UTC (rev 16793) @@ -1,12 +0,0 @@ - -#ifndef H_WIN32K_DEBUG -#define H_WIN32K_DEBUG - -#ifdef CHECKED_BUILD -#define FIXME(S) DbgPrint ("win32k: FIXME at: File:%s line:%d reason:%s", __FILE__, __LINE__, S) -#else -#define FIXME(S) -#endif - -#endif - _____ Deleted: branches/hardons1stbranch/debug1.h --- trunk/reactos/include/win32k/debug1.h 2005-07-21 10:31:29 UTC (rev 16677) +++ branches/hardons1stbranch/debug1.h 2005-07-27 11:06:08 UTC (rev 16793) @@ -1,72 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: include/internal/debug.h - * PURPOSE: Useful debugging macros - * PROGRAMMER: David Welch (welch(a)mcmail.com) - * UPDATE HISTORY: - * 28/05/98: Created - */ - -/* - * NOTE: Define NDEBUG before including this header to disable debugging - * macros - */ - -#ifndef __INTERNAL_DEBUG -#define __INTERNAL_DEBUG - -#define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0); - -/* FIXME: should probably remove this later */ -#if !defined(CHECKED) && !defined(NDEBUG) -#define CHECKED -#endif - -#ifndef NASSERT -#ifndef assert -#define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); } -#endif -#ifndef ASSERT -#define ASSERT(x) assert(x) -#endif -#else -#ifndef assert -#define assert(x) -#endif -#ifndef ASSERT -#define ASSERT(x) -#endif -#endif - -#ifdef DBG -#define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint -#define CHECKPOINT1 DbgPrint("%s:%d\n",__FILE__,__LINE__); -#else -#define DPRINT1(args...) -#define CHECKPOINT1(args...) -#endif - -#ifdef __NTOSKRNL__ -#define DPRINT_CHECKS -#else -#define DPRINT_CHECKS -#endif - -#ifndef NDEBUG -#define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint -#define CHECKPOINT DbgPrint("%s:%d\n",__FILE__,__LINE__); -#else -#define DPRINT(args...) -#define CHECKPOINT -#endif /* NDEBUG */ - -/* - * FUNCTION: Assert a maximum value for the current irql - * ARGUMENTS: - * x = Maximum irql - */ -#define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x)) -#define assert_irql(x) assert(KeGetCurrentIrql()<=(x)) - -#endif /* __INTERNAL_DEBUG */ _____ Modified: branches/hardons1stbranch/kapi.h --- trunk/reactos/include/win32k/kapi.h 2005-07-21 10:31:29 UTC (rev 16677) +++ branches/hardons1stbranch/kapi.h 2005-07-27 11:06:08 UTC (rev 16793) @@ -16,7 +16,7 @@ #include <win32k/dc.h> #include <win32k/coord.h> #include <win32k/bitmaps.h> -#include <win32k/debug.h> +//#include <win32k/debug.h> #include <win32k/fillshap.h> #include <win32k/font.h> #include <win32k/icm.h> _____ Modified: branches/hardons1stbranch/ntuser.h --- trunk/reactos/include/win32k/ntuser.h 2005-07-21 10:31:29 UTC (rev 16677) +++ branches/hardons1stbranch/ntuser.h 2005-07-27 11:06:08 UTC (rev 16793) @@ -1,7 +1,7 @@ #ifndef __WIN32K_NTUSER_H #define __WIN32K_NTUSER_H -#define WM_SYSTIMER 280 +//#define WM_SYSTIMER 280 ULONG STDCALL NtUserGetSystemMetrics(ULONG Index); @@ -301,7 +301,7 @@ int nWidth, int nHeight); -HANDLE +HCURSOR STDCALL NtUserCreateCursorIconHandle( PICONINFO IconInfo, @@ -395,7 +395,7 @@ BOOL STDCALL NtUserDestroyCursorIcon( - HANDLE Handle, + HCURSOR Handle, DWORD Unknown); BOOLEAN STDCALL @@ -718,13 +718,13 @@ BOOL STDCALL NtUserGetCursorIconInfo( - HANDLE Handle, + HCURSOR Handle, PICONINFO IconInfo); BOOL STDCALL NtUserGetCursorIconSize( - HANDLE Handle, + HCURSOR Handle, BOOL *fIcon, SIZE *Size); @@ -1339,7 +1339,7 @@ BOOL STDCALL NtUserSetCursorIconContents( - HANDLE Handle, + HCURSOR Handle, PICONINFO IconInfo); BOOL
19 years, 6 months
1
0
0
0
[ion] 16792: - Some more PSDK compatibility fixes
by ion@svn.reactos.com
- Some more PSDK compatibility fixes - Misc cleanup... Modified: trunk/reactos/include/libs/pseh/framebased/internal.h Modified: trunk/reactos/include/ndk/umtypes.h Modified: trunk/reactos/include/ndk/zwfuncs.h Modified: trunk/reactos/include/reactos/helper.h Modified: trunk/reactos/lib/kernel32/k32.h Modified: trunk/reactos/lib/kernel32/misc/comm.c Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/pseh/framebased.c Modified: trunk/reactos/w32api/include/winbase.h Modified: trunk/reactos/w32api/include/winnt.h _____ Modified: trunk/reactos/include/libs/pseh/framebased/internal.h --- trunk/reactos/include/libs/pseh/framebased/internal.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/libs/pseh/framebased/internal.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -51,7 +51,7 @@ struct __SEHPortableFrame * ); -typedef __declspec(noreturn) void (__stdcall * _SEHHandler_t) +typedef void (__stdcall * _SEHHandler_t) ( struct __SEHPortableTryLevel * ); _____ Modified: trunk/reactos/include/ndk/umtypes.h --- trunk/reactos/include/ndk/umtypes.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/ndk/umtypes.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -59,6 +59,9 @@ #define SYMBOLIC_LINK_QUERY 0x0001 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1) +/* Duplication Flags */ +#define DUPLICATE_SAME_ATTRIBUTES 0x00000004 + /* I/O Control Codes for communicating with Mailslots */ #define FSCTL_MAILSLOT_PEEK \ CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA) _____ Modified: trunk/reactos/include/ndk/zwfuncs.h --- trunk/reactos/include/ndk/zwfuncs.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/ndk/zwfuncs.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -13,6 +13,7 @@ #include "lpctypes.h" #include "zwtypes.h" #include "kdtypes.h" +#define _WMIKM_ #include <evntrace.h> /* FUNCTION TYPES ************************************************************/ _____ Modified: trunk/reactos/include/reactos/helper.h --- trunk/reactos/include/reactos/helper.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/reactos/helper.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -1,118 +1,118 @@ -#ifndef _HELPER_H -#define _HELPER_H - -#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b)) -#define ROUNDDOWN(a,b) (((a)/(b))*(b)) -#define ROUND_UP ROUNDUP -#define ROUND_DOWN ROUNDDOWN -#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1))) -#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) ) -#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) -#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) -#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) -#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) -#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a) -#define EXPORTED __declspec(dllexport) -#define IMPORTED __declspec(dllimport) -#define LIST_FOR_EACH(entry, head) \ - for(entry = (head)->Flink; entry != (head); entry = entry->Flink) -#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \ - for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \ - ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \ - ((tmp_entry) = (tmp_entry)->Flink); ) -#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \ - ((PIMAGE_DOS_HEADER)a)->e_lfanew + \ - sizeof (IMAGE_NT_SIGNATURE) + \ - sizeof (IMAGE_FILE_HEADER))) -#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) -#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) -#define NTSTAT_SEVERITY_SHIFT 30 -#define NTSTAT_SEVERITY_MASK 0x00000003 -#define NTSTAT_FACILITY_SHIFT 16 -#define NTSTAT_FACILITY_MASK 0x00000FFF -#define NTSTAT_CUSTOMER_MASK 0x20000000 -#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK) -#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK) -#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK) -#define RELATIVE_TIME(wait) (-(wait)) -#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100) -#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000)) -#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000)) -#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000)) -#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60)) -#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60)) +#ifndef _HELPER_H +#define _HELPER_H + +#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b)) +#define ROUNDDOWN(a,b) (((a)/(b))*(b)) +#define ROUND_UP ROUNDUP +#define ROUND_DOWN ROUNDDOWN +#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1))) +#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) ) +#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) +#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) +#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) +#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) +#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a) +#define EXPORTED __declspec(dllexport) +#define IMPORTED __declspec(dllimport) +#define LIST_FOR_EACH(entry, head) \ + for(entry = (head)->Flink; entry != (head); entry = entry->Flink) +#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \ + for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \ + ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \ + ((tmp_entry) = (tmp_entry)->Flink); ) +#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \ + ((PIMAGE_DOS_HEADER)a)->e_lfanew + \ + sizeof (IMAGE_NT_SIGNATURE) + \ + sizeof (IMAGE_FILE_HEADER))) +#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) +#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) +#define NTSTAT_SEVERITY_SHIFT 30 +#define NTSTAT_SEVERITY_MASK 0x00000003 +#define NTSTAT_FACILITY_SHIFT 16 +#define NTSTAT_FACILITY_MASK 0x00000FFF +#define NTSTAT_CUSTOMER_MASK 0x20000000 +#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK) +#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK) +#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK) +#define RELATIVE_TIME(wait) (-(wait)) +#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100) +#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000)) +#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000)) +#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000)) +#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60)) +#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60)) #define UNICODIZE1(x) L##x -#define UNICODIZE(x) UNICODIZE1(x) -#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#endif +#define UNICODIZE(x) UNICODIZE1(x) +#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#endif _____ Modified: trunk/reactos/lib/kernel32/k32.h --- trunk/reactos/lib/kernel32/k32.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/k32.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -11,7 +11,6 @@ /* PSDK/NDK Headers */ #define NTOS_MODE_USER #define _KERNEL32_ -#define _WMIKM_ #include <windows.h> #include <ndk/ntndk.h> _____ Modified: trunk/reactos/lib/kernel32/misc/comm.c --- trunk/reactos/lib/kernel32/misc/comm.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/misc/comm.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -574,7 +574,7 @@ /* FUNCTIONS */ #define COMMDCB_PARAM(__P__) \ { \ - RTL_CONSTANT_STRING(L""#__P__ ), \ + RTL_CONSTANT_STRING(L""UNICODIZE(#__P__ )), \ (ULONG_PTR)&COMMDCB_ ## __P__ ## Param \ } _____ Modified: trunk/reactos/lib/kernel32/process/create.c --- trunk/reactos/lib/kernel32/process/create.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/process/create.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -12,7 +12,7 @@ #include <k32.h> #define NDEBUG -#include <debug.h> +#include "../include/debug.h" #define CMD_STRING L"cmd /c " @@ -648,9 +648,7 @@ lpStartupInfo, lpProcessInformation); /* Copy Startup Info */ - DPRINT("Foo\n"); RtlMoveMemory(&StartupInfo, lpStartupInfo, sizeof(*lpStartupInfo)); - DPRINT("Foo\n"); /* Initialize all strings to nothing */ LiveCommandLine.Buffer = NULL; @@ -664,26 +662,22 @@ /* Convert the Command line */ if (lpCommandLine) { - DPRINT("Foo\n"); /* If it's too long, then we'll have a problem */ if ((strlen(lpCommandLine) + 1) * sizeof(WCHAR) < NtCurrentTeb()->StaticUnicodeString.MaximumLength) { /* Cache it in the TEB */ - DPRINT("Foo\n"); CommandLine = Basep8BitStringToCachedUnicodeString(lpCommandLine); } else { /* Use a dynamic version */ - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&LiveCommandLine, lpCommandLine); } } else { - DPRINT("Foo\n"); /* The logic below will use CommandLine, so we must make it valid */ CommandLine = &DummyString; } @@ -691,13 +685,11 @@ /* Convert the Name and Directory */ if (lpApplicationName) { - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&ApplicationName, lpApplicationName); } if (lpCurrentDirectory) { - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&CurrentDirectory, lpCurrentDirectory); } @@ -705,19 +697,16 @@ /* Now convert Startup Strings */ if (lpStartupInfo->lpReserved) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpReserved, &StartupInfo.lpReserved); } if (lpStartupInfo->lpDesktop) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpDesktop, &StartupInfo.lpDesktop); } if (lpStartupInfo->lpTitle) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpTitle, &StartupInfo.lpTitle); } @@ -778,6 +767,11 @@ PROCESS_BASIC_INFORMATION ProcessBasicInfo; STARTUPINFOW StartupInfo; ULONG Dummy; + LPWSTR BatchCommandLine; + ULONG CmdLineLength; + UNICODE_STRING CommandLineString; + LPWSTR TempBuffer; + PWCHAR Extension; LPWSTR QuotedCmdLine = NULL; LPWSTR ScanString; LPWSTR NullBuffer; @@ -811,7 +805,7 @@ } /* Fail on this flag, it's only valid with the WithLogonW function */ - if (dwCreationFlags & CREATE_WITH_USERPROFILE) + if (dwCreationFlags & CREATE_PRESERVE_CODE_AUTHZ_LEVEL) { DPRINT1("Invalid flag used\n"); SetLastError(ERROR_INVALID_PARAMETER); @@ -835,13 +829,13 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - DPRINT("Foo\n"); + /* * We're going to modify and mask out flags and stuff in lpStartupInfo, * so we'll use our own local copy for that. */ StartupInfo = *lpStartupInfo; - DPRINT("Foo\n"); + /* FIXME: Use default Separate/Shared VDM Flag */ /* If we are inside a Job, use Separate VDM so it won't escape the Job */ @@ -854,7 +848,7 @@ CREATE_SEPARATE_WOW_VDM; } } - DPRINT("Foo\n"); + /* * According to some sites, ShellExecuteEx uses an undocumented flag to * send private handle data (such as HMONITOR or HICON). See: @@ -866,21 +860,21 @@ { StartupInfo.dwFlags &= ~STARTF_USESTDHANDLES; } - DPRINT("Foo\n"); + /* Start by zeroing out the fields */ RtlZeroMemory(lpProcessInformation, sizeof(PROCESS_INFORMATION)); - DPRINT("Foo\n"); + /* Easy stuff first, convert the process priority class */ PriorityClass.Foreground = FALSE; PriorityClass.PriorityClass = BasepConvertPriorityClass(dwCreationFlags); - DPRINT("Foo\n"); + /* Convert the environment */ if(lpEnvironment && !(dwCreationFlags & CREATE_UNICODE_ENVIRONMENT)) { lpEnvironment = BasepConvertUnicodeEnvironment(lpEnvironment); if (!lpEnvironment) return FALSE; } -DPRINT("Foo\n"); + /* Get the application name and do all the proper formating necessary */ GetAppName: /* See if we have an application name (oh please let us have one!) */ @@ -907,7 +901,7 @@ /* Advance past quote */ ScanString++; lpApplicationName = ScanString; - DPRINT("Foo\n"); + /* Find the closing quote */ while (*ScanString) { @@ -918,7 +912,7 @@ FoundQuotes = TRUE; break; } - DPRINT("Foo\n"); + /* Keep looking */ ScanString++; NullBuffer = ScanString; @@ -930,7 +924,7 @@ WhiteScan: /* Reset the pointer */ lpApplicationName = lpCommandLine; - DPRINT("Foo\n"); + /* Find whitespace of Tab */ while (*ScanString) { @@ -940,7 +934,7 @@ NullBuffer = ScanString; break; } - DPRINT("Foo\n"); + /* Keep looking */ ScanString++; NullBuffer = ScanString; @@ -1078,8 +1072,8 @@ case STATUS_INVALID_IMAGE_PROTECT: case STATUS_INVALID_IMAGE_NOT_MZ: - /* If it's a DOS app, use VDM */ - //if ((BasepCheckDosApp(&ApplicationName))) + /* If it's a DOS app, use VDM + if ((BasepCheckDosApp(&ApplicationName))) */ { DPRINT1("Launching VDM...\n"); RtlFreeHeap(GetProcessHeap(), 0, NameBuffer); @@ -1097,12 +1091,8 @@ } /* It's a batch file */ - LPWSTR BatchCommandLine; - ULONG CmdLineLength; - UNICODE_STRING CommandLineString; - LPWSTR TempBuffer; - PWCHAR Extension = - &ApplicationName.Buffer[ApplicationName.Length / sizeof(WCHAR) - 4]; + Extension = &ApplicationName.Buffer[ApplicationName.Length / + sizeof(WCHAR) - 4]; /* Make sure the extensions are correct */ if (_wcsnicmp(Extension, L".bat", 4) && _wcsnicmp(Extension, L".cmd", 4)) _____ Modified: trunk/reactos/lib/pseh/framebased.c --- trunk/reactos/lib/pseh/framebased.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/pseh/framebased.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -68,7 +68,7 @@ } } -__declspec(noreturn) void __cdecl _SEHCallHandler +void __cdecl _SEHCallHandler ( _SEHPortableFrame_t * frame, _SEHPortableTryLevel_t * trylevel _____ Modified: trunk/reactos/w32api/include/winbase.h --- trunk/reactos/w32api/include/winbase.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/w32api/include/winbase.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -172,7 +172,7 @@ #define BELOW_NORMAL_PRIORITY_CLASS 0x00004000 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000 -#define CREATE_WITH_USERPROFILE 0x02000000 +#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000 #define CREATE_DEFAULT_ERROR_MODE 0x04000000 #define CREATE_NO_WINDOW 0x08000000 #define PROFILE_USER 0x10000000 _____ Modified: trunk/reactos/w32api/include/winnt.h --- trunk/reactos/w32api/include/winnt.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/w32api/include/winnt.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -355,7 +355,6 @@ /* also in ddk/winddk.h */ #define DUPLICATE_CLOSE_SOURCE 0x00000001 #define DUPLICATE_SAME_ACCESS 0x00000002 -#define DUPLICATE_SAME_ATTRIBUTES 0x00000004 /* end winddk.k */ #define MAILSLOT_NO_MESSAGE ((DWORD)-1)
19 years, 6 months
1
0
0
0
[mf] 16791: fix last patch: LPWSTR -> LPTSTR
by mf@svn.reactos.com
fix last patch: LPWSTR -> LPTSTR Modified: trunk/reactos/subsys/system/winefile/winefile.c _____ Modified: trunk/reactos/subsys/system/winefile/winefile.c --- trunk/reactos/subsys/system/winefile/winefile.c 2005-07-27 05:09:05 UTC (rev 16790) +++ trunk/reactos/subsys/system/winefile/winefile.c 2005-07-27 05:42:33 UTC (rev 16791) @@ -1821,12 +1821,12 @@ static TCHAR sTranslation[] = {'\\','V','a','r','F','i','l','e','I','n','f','o','\\','T','r','a','n',' s','l','a','t','i','o','n','\0'}; static TCHAR sStringFileInfo[] = {'\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o','\\', '%','0','4','x','%','0','4','x','\\','%','s','\0'}; - DWORD dwVersionDataLen = GetFileVersionInfoSize((LPWSTR)strFilename, NULL); + DWORD dwVersionDataLen = GetFileVersionInfoSize((LPTSTR)strFilename, NULL); if (dwVersionDataLen) { dlg->pVersionData = malloc(dwVersionDataLen); - if (GetFileVersionInfo((LPWSTR)strFilename, 0, dwVersionDataLen, dlg->pVersionData)) { + if (GetFileVersionInfo((LPTSTR)strFilename, 0, dwVersionDataLen, dlg->pVersionData)) { LPVOID pVal; UINT nValLen;
19 years, 6 months
1
0
0
0
[ion] 16790: - Fix all ACPI warnings and add default case for unhandled ACPI cases.
by ion@svn.reactos.com
- Fix all ACPI warnings and add default case for unhandled ACPI cases. Modified: trunk/reactos/drivers/bus/acpi/include/acpi.h Modified: trunk/reactos/drivers/bus/acpi/include/platform/types.h Modified: trunk/reactos/drivers/bus/acpi/ospm/busmgr/bmutils.c Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c _____ Modified: trunk/reactos/drivers/bus/acpi/include/acpi.h --- trunk/reactos/drivers/bus/acpi/include/acpi.h 2005-07-27 05:08:32 UTC (rev 16789) +++ trunk/reactos/drivers/bus/acpi/include/acpi.h 2005-07-27 05:09:05 UTC (rev 16790) @@ -50,6 +50,7 @@ #include "acglobal.h" /* All global variables */ #include "achware.h" /* Hardware defines and interfaces */ #include "accommon.h" /* Common interfaces */ +#include "acresrc.h" /* Resource Manager function prototypes */ #endif /* __ACPI_H__ */ _____ Modified: trunk/reactos/drivers/bus/acpi/include/platform/types.h --- trunk/reactos/drivers/bus/acpi/include/platform/types.h 2005-07-27 05:08:32 UTC (rev 16789) +++ trunk/reactos/drivers/bus/acpi/include/platform/types.h 2005-07-27 05:09:05 UTC (rev 16790) @@ -14,6 +14,7 @@ #define __INCLUDE_ACPI_TYPES_H #include <ddk/ntddk.h> +#include <stdio.h> typedef UCHAR UINT8; typedef USHORT UINT16; _____ Modified: trunk/reactos/drivers/bus/acpi/ospm/busmgr/bmutils.c --- trunk/reactos/drivers/bus/acpi/ospm/busmgr/bmutils.c 2005-07-27 05:08:32 UTC (rev 16789) +++ trunk/reactos/drivers/bus/acpi/ospm/busmgr/bmutils.c 2005-07-27 05:09:05 UTC (rev 16790) @@ -279,7 +279,7 @@ } head = buffer->pointer; - tail = buffer->pointer + tail_offset; + tail = head + tail_offset; /* * Extract package data: _____ Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c --- trunk/reactos/drivers/bus/acpi/ospm/fdo.c 2005-07-27 05:08:32 UTC (rev 16789) +++ trunk/reactos/drivers/bus/acpi/ospm/fdo.c 2005-07-27 05:09:05 UTC (rev 16790) @@ -162,6 +162,10 @@ Done = TRUE; break; } + default: + { + break; + } } resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length); } @@ -301,6 +305,10 @@ Done = TRUE; break; } + default: + { + break; + } } resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length); } @@ -471,7 +479,7 @@ return Status; } - +#ifndef NDEBUG static VOID ACPIPrintInfo( PFDO_DEVICE_EXTENSION DeviceExtension) @@ -491,8 +499,8 @@ (DeviceExtension->SystemStates[5]?'+':'-')); DbgPrint("+------------------------------------------------------------\ n"); } +#endif - static NTSTATUS ACPIInitializeInternalDriver( PFDO_DEVICE_EXTENSION DeviceExtension,
19 years, 6 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
57
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200