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
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
November 2014
----- 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
18 participants
373 discussions
Start a n
N
ew thread
[gedmurphy] 65495: [DEVICE_MANAGER] - On refresh, recurse the tree and delete all the Device Ids attached to each node - Fix SAL and a few missing comments
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Nov 26 19:46:26 2014 New Revision: 65495 URL:
http://svn.reactos.org/svn/reactos?rev=65495&view=rev
Log: [DEVICE_MANAGER] - On refresh, recurse the tree and delete all the Device Ids attached to each node - Fix SAL and a few missing comments Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp [iso-8859-1] Wed Nov 26 19:46:26 2014 @@ -95,6 +95,8 @@ BOOL CDeviceView::Uninitialize() { + EmptyDeviceView(); + (VOID)m_Devices->Uninitialize(); return TRUE; @@ -186,12 +188,8 @@ { CDeviceView *This = (CDeviceView *)Param; - /* Check if there are any items in the tree */ - if (TreeView_GetRoot(This->m_hTreeView) != NULL) - { - /* Delete all the items */ - (VOID)TreeView_DeleteAllItems(This->m_hTreeView); - } + /* Clear any existing data */ + This->EmptyDeviceView(); /* Reset the tree root */ This->m_hTreeRoot = NULL; @@ -515,3 +513,66 @@ return TreeView_InsertItem(m_hTreeView, &tvins); } + +VOID +CDeviceView::RecurseDeviceView( + _In_ HTREEITEM hParentItem + ) +{ + HTREEITEM hItem; + TVITEMW tvItem; + + /* Check if this node has any children */ + hItem = TreeView_GetChild(m_hTreeView, hParentItem); + if (hItem == NULL) return; + + /* The lParam contains the device id */ + tvItem.hItem = hItem; + tvItem.mask = TVIF_PARAM; + + if (TreeView_GetItem(m_hTreeView, &tvItem) && + tvItem.lParam != NULL) + { + /* Free the device id */ + HeapFree(GetProcessHeap(), 0, (LPVOID)tvItem.lParam); + } + + /* This node may have its own children */ + RecurseDeviceView(hItem); + + for (;;) + { + /* Get the next item at this level */ + hItem = TreeView_GetNextSibling(m_hTreeView, hItem); + if (hItem == NULL) break; + + tvItem.hItem = hItem; + tvItem.mask = TVIF_PARAM; + + if (TreeView_GetItem(m_hTreeView, &tvItem)) + { + if (tvItem.lParam != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)tvItem.lParam); + } + + /* This node may have its own children */ + RecurseDeviceView(hItem); + } +} + + +VOID +CDeviceView::EmptyDeviceView() +{ + HTREEITEM hItem; + + /* Check if there are any items in the tree */ + hItem = TreeView_GetRoot(m_hTreeView); + if (hItem == NULL) return; + + /* Free all the Device Ids */ + RecurseDeviceView(hItem); + + /* Delete all the items */ + (VOID)TreeView_DeleteAllItems(m_hTreeView); +} Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h [iso-8859-1] Wed Nov 26 19:46:26 2014 @@ -81,5 +81,12 @@ _In_ INT DevImage, _In_ UINT OverlayImage ); + + VOID RecurseDeviceView( + _In_ HTREEITEM hParentItem + ); + + VOID EmptyDeviceView( + ); }; Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp [iso-8859-1] Wed Nov 26 19:46:26 2014 @@ -11,6 +11,9 @@ #include "devmgmt.h" #include "Devices.h" + +/* PUBLIC METHODS *****************************************/ + CDevices::CDevices(void) : m_bInitialized(FALSE), m_RootImageIndex(-1) @@ -133,7 +136,7 @@ _In_ DEVINST Device, _Out_writes_(DeviceNameSize) LPWSTR DeviceName, _In_ DWORD DeviceNameSize, - _Out_ LPWSTR *DeviceId, + _Outptr_ LPWSTR *DeviceId, _Out_ PINT ClassImage, _Out_ LPBOOL IsUnknown, _Out_ LPBOOL IsHidden @@ -146,6 +149,7 @@ *DeviceId = NULL; + /* Get the length of the device id string */ cr = CM_Get_Device_ID_Size(&ulLength, Device, 0); if (cr == CR_SUCCESS) { @@ -166,6 +170,7 @@ } } + /* Make sure we got the string */ if (*DeviceId == NULL) return FALSE; @@ -180,8 +185,10 @@ 0); if (cr == CR_SUCCESS) { + /* Convert the string to a proper guid */ CLSIDFromString(ClassGuidString, &ClassGuid); + /* Check if this is a hidden device */ if ((IsEqualGUID(ClassGuid, GUID_DEVCLASS_LEGACYDRIVER) || IsEqualGUID(ClassGuid, GUID_DEVCLASS_VOLUME))) { @@ -195,13 +202,12 @@ *IsUnknown = TRUE; } - + /* Get the image for the class this device is in */ SetupDiGetClassImageIndex(&m_ImageListData, &ClassGuid, ClassImage); - - + /* Get the description for the device */ ulLength = DeviceNameSize * sizeof(WCHAR); cr = CM_Get_DevNode_Registry_PropertyW(Device, CM_DRP_FRIENDLYNAME, @@ -221,6 +227,7 @@ } + /* Cleanup if something failed */ if (cr != CR_SUCCESS) { HeapFree(GetProcessHeap(), 0, *DeviceId); @@ -346,7 +353,7 @@ _Out_ LPBOOL MoreItems, _Out_ LPTSTR DeviceName, _In_ DWORD DeviceNameSize, - _Out_ LPTSTR *DeviceId + _Outptr_ LPTSTR *DeviceId ) { SP_DEVINFO_DATA DeviceInfoData; Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h [iso-8859-1] Wed Nov 26 19:46:26 2014 @@ -42,7 +42,7 @@ _In_ DEVINST Device, _Out_writes_(DeviceNameSize) LPTSTR DeviceName, _In_ DWORD DeviceNameSize, - _Out_ LPTSTR *DeviceId, + _Outptr_ LPTSTR *DeviceId, _Out_ PINT ClassImage, _Out_ LPBOOL IsUnknown, _Out_ LPBOOL IsHidden @@ -67,7 +67,7 @@ _Out_ LPBOOL MoreItems, _Out_writes_(DeviceNameSize) LPTSTR DeviceName, _In_ DWORD DeviceNameSize, - _Out_ LPTSTR *DeviceId + _Outptr_ LPTSTR *DeviceId ); BOOL GetDeviceStatus( Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln [iso-8859-1] Wed Nov 26 19:46:26 2014 @@ -26,7 +26,4 @@ GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection EndGlobal
10 years
1
0
0
0
[akhaldi] 65494: * Addendum to r65483.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Nov 26 18:02:55 2014 New Revision: 65494 URL:
http://svn.reactos.org/svn/reactos?rev=65494&view=rev
Log: * Addendum to r65483. Added: branches/shell-experiments/base/shell/explorer/ - copied from r65493, branches/shell-experiments/base/shell/explorer-old/ Removed: branches/shell-experiments/base/shell/explorer-old/ Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.cpp branches/shell-experiments/base/shell/explorer/globals.h branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/traywnd.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/traywnd.cpp [iso-8859-1] Wed Nov 26 18:02:55 2014 @@ -1853,11 +1853,6 @@ default: partId = TBP_BACKGROUNDBOTTOM; break; - } - - if (IsThemeBackgroundPartiallyTransparent(TaskbarTheme, partId, 0)) - { - DrawThemeParentBackground(m_hWnd, hdc, &rect); } DrawThemeBackground(TaskbarTheme, hdc, partId, 0, &rect, 0); Modified: branches/shell-experiments/base/shell/explorer/globals.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer/globals.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer/globals.h [iso-8859-1] Wed Nov 26 18:02:55 2014 @@ -235,7 +235,7 @@ #endif -#define DESKTOP_COUNT 2 +#define DESKTOP_COUNT 4 struct Desktops : public vector<DesktopRef> { Modified: branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] Wed Nov 26 18:02:55 2014 @@ -145,8 +145,8 @@ TCHAR QuickLaunchBand[] = _T("Quicklaunch"); rbBand.lpText = QuickLaunchBand; rbBand.hwndChild = _hwndQuickLaunch; - rbBand.cx = 100; - rbBand.cxMinChild = 100; + rbBand.cx = 150; + rbBand.cxMinChild = 150; rbBand.wID = IDW_QUICKLAUNCHBAR; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); @@ -451,7 +451,9 @@ break; case ID_SWITCH_DESKTOP_1: - case ID_SWITCH_DESKTOP_1+1: { + case ID_SWITCH_DESKTOP_1+1: + case ID_SWITCH_DESKTOP_1+2: + case ID_SWITCH_DESKTOP_1+3: { int desktop_idx = id - ID_SWITCH_DESKTOP_1; g_Globals._desktops.SwitchToDesktop(desktop_idx);
10 years
1
0
0
0
[gedmurphy] 65493: [DEVICE_MANAGER] - Add a class for managing the device view, and a class for managing the device objects. - Implement listing devices by type and by connection. - Add support for...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Nov 26 17:21:45 2014 New Revision: 65493 URL:
http://svn.reactos.org/svn/reactos?rev=65493&view=rev
Log: [DEVICE_MANAGER] - Add a class for managing the device view, and a class for managing the device objects. - Implement listing devices by type and by connection. - Add support for showing hidden devices - Add support for showing unknown devices with overlay icons. - implement showing the device properties via dounle click or hitting enter - Add support for both Win7/8 as well as XP - Make the code much more readable and maintainable. and easier to move to an mmc snapin if we ever get one. I forgot this existed until today. I had some spare time so I decided to have a quick go at finishing it. Stick with the original one for now though, I ran out of time.... Added: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters trunk/reactos/base/applications/mscutils/devmgmt_new/targetver.h (with props) Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h trunk/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h trunk/reactos/base/applications/mscutils/devmgmt_new/Resource.h trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj trunk/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc trunk/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc trunk/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc trunk/reactos/base/applications/mscutils/devmgmt_new/stdafx.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/Devices.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/Resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Added: trunk/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj.filters URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Modified: trunk/reactos/base/applications/mscutils/devmgmt_new/stdafx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
Added: trunk/reactos/base/applications/mscutils/devmgmt_new/targetver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
10 years
1
0
0
0
[akhaldi] 65492: * Sync up to trunk head (r65491).
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Nov 26 16:49:31 2014 New Revision: 65492 URL:
http://svn.reactos.org/svn/reactos?rev=65492&view=rev
Log: * Sync up to trunk head (r65491). Modified: branches/shell-experiments/ (props changed) branches/shell-experiments/base/shell/explorer/globals.h branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp branches/shell-experiments/base/system/lsass/lsass.c branches/shell-experiments/base/system/services/services.c branches/shell-experiments/base/system/winlogon/winlogon.c branches/shell-experiments/boot/freeldr/freeldr/include/arch/pc/x86common.h branches/shell-experiments/drivers/filesystems/ntfs/mft.c branches/shell-experiments/win32ss/gdi/eng/floatobj.h branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c branches/shell-experiments/win32ss/gdi/ntgdi/xformobj.c branches/shell-experiments/win32ss/user/ntuser/msgqueue.c branches/shell-experiments/win32ss/user/ntuser/winpos.c Propchange: branches/shell-experiments/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Nov 26 16:49:31 2014 @@ -19,4 +19,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:61927-65481 +/trunk/reactos:61927-65491 Modified: branches/shell-experiments/base/shell/explorer/globals.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer/globals.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer/globals.h [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -235,7 +235,7 @@ #endif -#define DESKTOP_COUNT 2 +#define DESKTOP_COUNT 4 struct Desktops : public vector<DesktopRef> { Modified: branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -145,8 +145,8 @@ TCHAR QuickLaunchBand[] = _T("Quicklaunch"); rbBand.lpText = QuickLaunchBand; rbBand.hwndChild = _hwndQuickLaunch; - rbBand.cx = 100; - rbBand.cxMinChild = 100; + rbBand.cx = 150; + rbBand.cxMinChild = 150; rbBand.wID = IDW_QUICKLAUNCHBAR; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); @@ -451,7 +451,9 @@ break; case ID_SWITCH_DESKTOP_1: - case ID_SWITCH_DESKTOP_1+1: { + case ID_SWITCH_DESKTOP_1+1: + case ID_SWITCH_DESKTOP_1+2: + case ID_SWITCH_DESKTOP_1+3: { int desktop_idx = id - ID_SWITCH_DESKTOP_1; g_Globals._desktops.SwitchToDesktop(desktop_idx); Modified: branches/shell-experiments/base/system/lsass/lsass.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/system/l…
============================================================================== --- branches/shell-experiments/base/system/lsass/lsass.c [iso-8859-1] (original) +++ branches/shell-experiments/base/system/lsass/lsass.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -28,6 +28,7 @@ #define NTOS_MODE_USER #include <ndk/psfuncs.h> +#include <ndk/rtlfuncs.h> #include <lsass/lsasrv.h> #include <samsrv/samsrv.h> @@ -45,6 +46,9 @@ DPRINT("Local Security Authority Subsystem\n"); DPRINT(" Initializing...\n"); + + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, TRUE); /* Initialize the LSA server DLL. */ Status = LsapInitLsa(); Modified: branches/shell-experiments/base/system/services/services.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/system/s…
============================================================================== --- branches/shell-experiments/base/system/services/services.c [iso-8859-1] (original) +++ branches/shell-experiments/base/system/services/services.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -316,6 +316,9 @@ DPRINT("SERVICES: Service Control Manager\n"); + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, TRUE); + /* We are initializing ourselves */ ScmInitialize = TRUE; Modified: branches/shell-experiments/base/system/winlogon/winlogon.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/system/w…
============================================================================== --- branches/shell-experiments/base/system/winlogon/winlogon.c [iso-8859-1] (original) +++ branches/shell-experiments/base/system/winlogon/winlogon.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -318,6 +318,10 @@ hAppInstance = hInstance; + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, FALSE); + RtlSetThreadIsCritical(TRUE, NULL, FALSE); + if (!RegisterLogonProcess(GetCurrentProcessId(), TRUE)) { ERR("WL: Could not register logon process\n"); Modified: branches/shell-experiments/boot/freeldr/freeldr/include/arch/pc/x86common.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/boot/freeldr/…
============================================================================== --- branches/shell-experiments/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] (original) +++ branches/shell-experiments/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -17,7 +17,7 @@ #define FREELDR_BASE HEX(F800) #define FREELDR_PE_BASE HEX(10000) #define DISKREADBUFFER HEX(8E000) /* Buffer to store data read in from the disk via the BIOS */ -#define MEMORY_MARGIN HEX(9C000) /* Highest usable address */ +#define MEMORY_MARGIN HEX(9A000) /* Highest usable address */ /* 9F000- 9FFFF is reserved for the EBDA */ #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ Modified: branches/shell-experiments/drivers/filesystems/ntfs/mft.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
============================================================================== --- branches/shell-experiments/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original) +++ branches/shell-experiments/drivers/filesystems/ntfs/mft.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -558,7 +558,7 @@ IndexRoot = (PINDEX_ROOT_ATTRIBUTE)IndexRecord; IndexEntry = (PINDEX_ENTRY_ATTRIBUTE)((PCHAR)&IndexRoot->Header + IndexRoot->Header.FirstEntryOffset); /* Index root is always resident. */ - IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRootCtx->Record.Resident.ValueLength); + IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRoot->Header.TotalSizeOfEntries); ReleaseAttributeContext(IndexRootCtx); DPRINT("IndexRecordSize: %x IndexBlockSize: %x\n", Vcb->NtfsInfo.BytesPerIndexRecord, IndexRoot->SizeOfEntry); Modified: branches/shell-experiments/win32ss/gdi/eng/floatobj.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/gdi/e…
============================================================================== --- branches/shell-experiments/win32ss/gdi/eng/floatobj.h [iso-8859-1] (original) +++ branches/shell-experiments/win32ss/gdi/eng/floatobj.h [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -1,4 +1,8 @@ #pragma once + +C_ASSERT(sizeof(FIX) == sizeof(LONG)); +#define FIX2LONG(x) (((x) + 8) >> 4) +#define LONG2FIX(x) ((x) << 4) #if defined(_M_IX86) @@ -10,6 +14,7 @@ EFLOAT_S *pef2 = (EFLOAT_S*)pf2; return (pef1->lMant == pef2->lMant && pef1->lExp == pef2->lExp); } +#define FLOATOBJ_Equal _FLOATOBJ_Equal FORCEINLINE LONG @@ -18,10 +23,36 @@ EFLOAT_S *pef = (EFLOAT_S*)pf; return pef->lMant >> (32 - pef->lExp); } +#define FLOATOBJ_GetLong _FLOATOBJ_GetLong + +/*! + * \brief Converts a FLOATOBJ into a LONG by truncating the value to integer + * + * \param pf - Pointer to a FLOATOBJ containing the value to convert + * + * \param pl - Pointer to a variable that receives the result + * + * \return TRUE if the function succeeded, FALSE if the result would overflow + * a LONG. + */ +FORCEINLINE +BOOL +FASTCALL +FLOATOBJ_bConvertToLong(FLOATOBJ *pf, PLONG pl) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + LONG lShift = 32 - pef->lExp; + if (lShift < 0) + { + return FALSE; + } + *pl = pef->lMant >> lShift; + return TRUE; +} FORCEINLINE LONG -_FLOATOBJ_GetFix(FLOATOBJ *pf) +FLOATOBJ_GetFix(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; LONG Shift = (28 - pef->lExp); @@ -30,7 +61,7 @@ FORCEINLINE BOOL -_FLOATOBJ_IsLong(FLOATOBJ *pf) +FLOATOBJ_IsLong(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; ULONG ulShift = pef->lExp; @@ -42,7 +73,7 @@ FORCEINLINE BOOL -_FLOATOBJ_Equal0(FLOATOBJ *pf) +FLOATOBJ_Equal0(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; return (pef->lMant == 0 && pef->lExp == 0); @@ -50,7 +81,7 @@ FORCEINLINE BOOL -_FLOATOBJ_Equal1(FLOATOBJ *pf) +FLOATOBJ_Equal1(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; return (pef->lMant == 0x40000000 && pef->lExp == 2); @@ -70,12 +101,11 @@ #else -#define _FLOATOBJ_Equal(pf,pf1) (*(pf) == *(pf1)) -#define _FLOATOBJ_GetLong(pf) ((LONG)*(pf)) -#define _FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) -#define _FLOATOBJ_Equal0(pf) (*(pf) == 0.) -#define _FLOATOBJ_Equal1(pf) (*(pf) == 1.) -#define _FLOATOBJ_GetFix(pf) ((LONG)(*(pf) * 16.)) +#define FLOATOBJ_bConvertToLong(pf, pl) (*pl = (LONG)*pf, TRUE) +#define FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) +#define FLOATOBJ_Equal0(pf) (*(pf) == 0.) +#define FLOATOBJ_Equal1(pf) (*(pf) == 1.) +#define FLOATOBJ_GetFix(pf) ((LONG)(*(pf) * 16.)) #define FLOATOBJ_0 0. #define FLOATOBJ_1 1. Modified: branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/gdi/n…
============================================================================== --- branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -1105,7 +1105,7 @@ } if (fs.fsCsb[0] == 0) { /* Let's see if we can find any interesting cmaps */ - for (i = 0; i < FontGDI->face->num_charmaps; i++) + for (i = 0; i < (UINT)FontGDI->face->num_charmaps; i++) { switch (FontGDI->face->charmaps[i]->encoding) { @@ -1501,7 +1501,7 @@ { TTPOLYGONHEADER *pph; TTPOLYCURVE *ppc; - unsigned int needed = 0, point = 0, contour, first_pt; + int needed = 0, point = 0, contour, first_pt; unsigned int pph_start, cpfx; DWORD type; @@ -2073,7 +2073,7 @@ INT x; while (h--) { - for (x = 0; x < pitch; x++) + for (x = 0; (UINT)x < pitch; x++) { if (x < ft_face->glyph->bitmap.width) dst[x] = (src[x / 8] & (1 << ( (7 - (x % 8))))) ? 0xff : 0; @@ -2346,7 +2346,8 @@ DWORD dwFlags) { PDC_ATTR pdcattr; - UINT Ret = DEFAULT_CHARSET, i; + UINT Ret = DEFAULT_CHARSET; + INT i; HFONT hFont; PTEXTOBJ TextObj; PFONTGDI FontGdi; @@ -3752,7 +3753,7 @@ { // FIXME this should probably be a matrix transform with TextTop as well. Scale = pdcattr->mxWorldToDevice.efM11; - if (_FLOATOBJ_Equal0(&Scale)) + if (FLOATOBJ_Equal0(&Scale)) FLOATOBJ_Set1(&Scale); FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); // do the shift before multiplying to preserve precision @@ -4029,7 +4030,7 @@ face = FontGDI->face; if (face->charmap == NULL) { - for (i = 0; i < face->num_charmaps; i++) + for (i = 0; i < (UINT)face->num_charmaps; i++) { charmap = face->charmaps[i]; if (charmap->encoding != 0) @@ -4227,7 +4228,7 @@ face = FontGDI->face; if (face->charmap == NULL) { - for (i = 0; i < face->num_charmaps; i++) + for (i = 0; i < (UINT)face->num_charmaps; i++) { charmap = face->charmaps[i]; if (charmap->encoding != 0) Modified: branches/shell-experiments/win32ss/gdi/ntgdi/xformobj.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/gdi/n…
============================================================================== --- branches/shell-experiments/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] (original) +++ branches/shell-experiments/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -12,16 +12,8 @@ #define NDEBUG #include <debug.h> -C_ASSERT(sizeof(FIX) == sizeof(LONG)); -#define FIX2LONG(x) (((x) + 8) >> 4) -#define LONG2FIX(x) ((x) << 4) - -#define FLOATOBJ_Equal _FLOATOBJ_Equal -#define FLOATOBJ_GetLong _FLOATOBJ_GetLong -#define FLOATOBJ_GetFix _FLOATOBJ_GetFix -#define FLOATOBJ_IsLong _FLOATOBJ_IsLong -#define FLOATOBJ_Equal0 _FLOATOBJ_Equal0 -#define FLOATOBJ_Equal1 _FLOATOBJ_Equal1 +#define DOES_VALUE_OVERFLOW_LONG(x) \ + (((__int64)((long)(x))) != (x)) /** Inline helper functions ***************************************************/ @@ -297,76 +289,153 @@ return XFORMOBJ_UpdateAccel(pxoDst); } + +/*! + * \brief Transforms fix-point coordinates in an array of POINTL structures using + * the transformation matrix from the XFORMOBJ. + * + * \param pxo - Pointer to the XFORMOBJ + * + * \param cPoints - Number of coordinates to transform + * + * \param pptIn - Pointer to an array of POINTL structures containing the + * source coordinates. + * + * \param pptOut - Pointer to an array of POINTL structures, receiving the + * transformed coordinates. Can be the same as pptIn. + * + * \return TRUE if the operation was successful, FALSE if any of the calculations + * caused an integer overflow. + * + * \note If the function returns FALSE, it might still have written to the + * output buffer. If pptIn and pptOut are equal, the source coordinates + * might have been partly overwritten! + */ static -VOID +BOOL NTAPI -XFORMOBJ_vXformFixPoints( - IN XFORMOBJ *pxo, - IN ULONG cPoints, - IN PPOINTL pptIn, - OUT PPOINTL pptOut) +XFORMOBJ_bXformFixPoints( + _In_ XFORMOBJ *pxo, + _In_ ULONG cPoints, + _In_reads_(cPoints) PPOINTL pptIn, + _Out_writes_(cPoints) PPOINTL pptOut) { PMATRIX pmx; INT i; FLOATOBJ fo1, fo2; FLONG flAccel; + LONG lM11, lM12, lM21, lM22, lTemp; + register LONGLONG llx, lly; pmx = XFORMOBJ_pmx(pxo); flAccel = pmx->flAccel; if ((flAccel & (XFORM_SCALE|XFORM_UNITY)) == (XFORM_SCALE|XFORM_UNITY)) { - /* Identity transformation, nothing todo */ + /* Identity transformation, nothing to do */ } else if (flAccel & XFORM_INTEGER) { if (flAccel & XFORM_UNITY) { - /* 1-scale integer transform */ - LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); - LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); + /* 1-scale integer transform, get the off-diagonal elements */ + if (!FLOATOBJ_bConvertToLong(&pmx->efM12, &lM12) || + !FLOATOBJ_bConvertToLong(&pmx->efM21, &lM21)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - LONG x = pptIn[i].x + pptIn[i].y * lM21; - LONG y = pptIn[i].y + pptIn[i].x * lM12; - pptOut[i].y = y; - pptOut[i].x = x; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].y, lM21) + pptIn[i].x; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].x, lM12) + pptIn[i].y; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } else if (flAccel & XFORM_SCALE) { - /* Diagonal integer transform */ - LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); - LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + /* Diagonal integer transform, get the diagonal elements */ + if (!FLOATOBJ_bConvertToLong(&pmx->efM11, &lM11) || + !FLOATOBJ_bConvertToLong(&pmx->efM22, &lM22)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - pptOut[i].x = pptIn[i].x * lM11; - pptOut[i].y = pptIn[i].y * lM22; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].x, lM11); + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].y, lM22); + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } else { /* Full integer transform */ - LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); - LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); - LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); - LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + if (!FLOATOBJ_bConvertToLong(&pmx->efM11, &lM11) || + !FLOATOBJ_bConvertToLong(&pmx->efM12, &lM12) || + !FLOATOBJ_bConvertToLong(&pmx->efM21, &lM21) || + !FLOATOBJ_bConvertToLong(&pmx->efM22, &lM22)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - LONG x; - x = pptIn[i].x * lM11; - x += pptIn[i].y * lM21; - pptOut[i].y = pptIn[i].y * lM22; - pptOut[i].y += pptIn[i].x * lM12; - pptOut[i].x = x; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].x, lM11); + llx += Int32x32To64(pptIn[i].y, lM21); + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].y, lM22); + lly += Int32x32To64(pptIn[i].x, lM12); + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } @@ -377,12 +446,35 @@ i = cPoints - 1; do { + /* Calculate x in 64 bit and check for overflow */ fo1 = pmx->efM21; FLOATOBJ_MulLong(&fo1, pptIn[i].y); + if (!FLOATOBJ_bConvertToLong(&fo1, &lTemp)) + { + return FALSE; + } + llx = (LONGLONG)pptIn[i].x + lTemp; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ fo2 = pmx->efM12; FLOATOBJ_MulLong(&fo2, pptIn[i].x); - pptOut[i].x = pptIn[i].x + FLOATOBJ_GetLong(&fo1); - pptOut[i].y = pptIn[i].y + FLOATOBJ_GetLong(&fo2); + if (!FLOATOBJ_bConvertToLong(&fo2, &lTemp)) + { + return FALSE; + } + lly = (LONGLONG)pptIn[i].y + lTemp; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } @@ -394,10 +486,17 @@ { fo1 = pmx->efM11; FLOATOBJ_MulLong(&fo1, pptIn[i].x); - pptOut[i].x = FLOATOBJ_GetLong(&fo1); + if (!FLOATOBJ_bConvertToLong(&fo1, &pptOut[i].x)) + { + return FALSE; + } + fo2 = pmx->efM22; FLOATOBJ_MulLong(&fo2, pptIn[i].y); - pptOut[i].y = FLOATOBJ_GetLong(&fo2); + if (!FLOATOBJ_bConvertToLong(&fo2, &pptOut[i].y)) + { + return FALSE; + } } while (--i >= 0); } @@ -407,10 +506,21 @@ i = cPoints - 1; do { + /* Calculate x as FLOATOBJ */ MulAddLong(&fo1, &pmx->efM11, pptIn[i].x, &pmx->efM21, pptIn[i].y); + + /* Calculate y as FLOATOBJ */ MulAddLong(&fo2, &pmx->efM12, pptIn[i].x, &pmx->efM22, pptIn[i].y); - pptOut[i].x = FLOATOBJ_GetLong(&fo1); - pptOut[i].y = FLOATOBJ_GetLong(&fo2); + + if (!FLOATOBJ_bConvertToLong(&fo1, &pptOut[i].x)) + { + return FALSE; + } + + if (!FLOATOBJ_bConvertToLong(&fo2, &pptOut[i].y)) + { + return FALSE; + } } while (--i >= 0); } @@ -421,11 +531,24 @@ i = cPoints - 1; do { - pptOut[i].x += pmx->fxDx; - pptOut[i].y += pmx->fxDy; + llx = (LONGLONG)pptOut[i].x + pmx->fxDx; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + pptOut[i].x = (LONG)llx; + + lly = (LONGLONG)pptOut[i].y + pmx->fxDy; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + pptOut[i].y = (LONG)lly; } while (--i >= 0); } + + return TRUE; } /** Public functions **********************************************************/ @@ -534,7 +657,10 @@ } /* Do the actual fixpoint transformation */ - XFORMOBJ_vXformFixPoints(pxo, cPoints, pvIn, pvOut); + if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) + { + return FALSE; + } /* Convert POINTFIX to POINTL? */ if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL) Modified: branches/shell-experiments/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
============================================================================== --- branches/shell-experiments/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ branches/shell-experiments/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -1450,7 +1450,10 @@ } else { - pwndMsg = co_WinPosWindowFromPoint(pwndMsg, &msg->pt, &hittest, FALSE); + /* + Start with null window. See wine win.c:test_mouse_input:WM_COMMAND tests. + */ + pwndMsg = co_WinPosWindowFromPoint( NULL, &msg->pt, &hittest, FALSE); } TRACE("Got mouse message for %p, hittest: 0x%x\n", msg->hwnd, hittest); Modified: branches/shell-experiments/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
============================================================================== --- branches/shell-experiments/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ branches/shell-experiments/win32ss/user/ntuser/winpos.c [iso-8859-1] Wed Nov 26 16:49:31 2014 @@ -327,6 +327,7 @@ /* If this is popup window, try to activate the owner first. */ if ((Wnd->style & WS_POPUP) && (WndTo = Wnd->spwndOwner)) { + ERR("WPAOW Popup with Owner\n"); WndTo = UserGetAncestor( WndTo, GA_ROOT ); if (can_activate_window(WndTo)) goto done; } @@ -336,18 +337,41 @@ WndTo = Wnd; for (;;) { - if (!(WndTo = WndTo->spwndNext)) break; - if (can_activate_window( WndTo )) break; + if (!(WndTo = WndTo->spwndNext)) break; + if (can_activate_window( WndTo )) goto done; + } + + /* + Fixes wine win.c:test_SetParent last ShowWindow test after popup dies. + Check for previous active window to bring to top. + */ + if (Wnd) + { + WndTo = Wnd->head.pti->MessageQueue->spwndActivePrev; + if (can_activate_window( WndTo )) goto done; + } + + // Find any window to bring to top. Works Okay for wine. + WndTo = UserGetDesktopWindow(); + WndTo = WndTo->spwndChild; + for (;;) + { + if (WndTo == Wnd) + { + WndTo = NULL; + break; + } + if (can_activate_window( WndTo )) goto done; + if (!(WndTo = WndTo->spwndNext)) break; } done: - if (WndTo) UserRefObjectCo(WndTo, &Ref); - if (!gpqForeground || Wnd == gpqForeground->spwndActive) + if ((gpqForeground && !gpqForeground->spwndActive) || Wnd == gpqForeground->spwndActive) { /* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */ - //ERR("WinPosActivateOtherWindow Set FG 0x%p\n",WndTo); + //ERR("WinPosActivateOtherWindow Set FG 0x%p hWnd %p\n",WndTo, WndTo ? WndTo->head.h : 0); if (co_IntSetForegroundWindow(WndTo)) { if (WndTo) UserDerefObjectCo(WndTo);
10 years
1
0
0
0
[jimtabor] 65491: [Explorer] - Restore the original four virtual window support. See CORE-6151.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Nov 26 15:29:51 2014 New Revision: 65491 URL:
http://svn.reactos.org/svn/reactos?rev=65491&view=rev
Log: [Explorer] - Restore the original four virtual window support. See CORE-6151. Modified: trunk/reactos/base/shell/explorer/globals.h trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp Modified: trunk/reactos/base/shell/explorer/globals.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/global…
============================================================================== --- trunk/reactos/base/shell/explorer/globals.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/globals.h [iso-8859-1] Wed Nov 26 15:29:51 2014 @@ -235,7 +235,7 @@ #endif -#define DESKTOP_COUNT 2 +#define DESKTOP_COUNT 4 struct Desktops : public vector<DesktopRef> { Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp [iso-8859-1] Wed Nov 26 15:29:51 2014 @@ -145,8 +145,8 @@ TCHAR QuickLaunchBand[] = _T("Quicklaunch"); rbBand.lpText = QuickLaunchBand; rbBand.hwndChild = _hwndQuickLaunch; - rbBand.cx = 100; - rbBand.cxMinChild = 100; + rbBand.cx = 150; + rbBand.cxMinChild = 150; rbBand.wID = IDW_QUICKLAUNCHBAR; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); @@ -451,7 +451,9 @@ break; case ID_SWITCH_DESKTOP_1: - case ID_SWITCH_DESKTOP_1+1: { + case ID_SWITCH_DESKTOP_1+1: + case ID_SWITCH_DESKTOP_1+2: + case ID_SWITCH_DESKTOP_1+3: { int desktop_idx = id - ID_SWITCH_DESKTOP_1; g_Globals._desktops.SwitchToDesktop(desktop_idx);
10 years
1
0
0
0
[tkreuzer] 65490: [WIN32K] - Implement FLOATOBJ_bConvertToLong inline function that converts a FLOATOBJ to a long or returns FALSE if the value would overflow a LONG - Remove underscore prefixes fr...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Nov 25 23:44:59 2014 New Revision: 65490 URL:
http://svn.reactos.org/svn/reactos?rev=65490&view=rev
Log: [WIN32K] - Implement FLOATOBJ_bConvertToLong inline function that converts a FLOATOBJ to a long or returns FALSE if the value would overflow a LONG - Remove underscore prefixes from inline FLOATOBJ functions and use it only on those that already exist as non-inline versions. - Remove duplicated FLOATOBJ defines for non-x86 - Fail on integer overflow in XFORMOBJ_bXformFixPoints to avoid creating bogus coordinates. Modified: trunk/reactos/win32ss/gdi/eng/floatobj.h trunk/reactos/win32ss/gdi/ntgdi/freetype.c trunk/reactos/win32ss/gdi/ntgdi/xformobj.c Modified: trunk/reactos/win32ss/gdi/eng/floatobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/floatobj.h…
============================================================================== --- trunk/reactos/win32ss/gdi/eng/floatobj.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/floatobj.h [iso-8859-1] Tue Nov 25 23:44:59 2014 @@ -1,4 +1,8 @@ #pragma once + +C_ASSERT(sizeof(FIX) == sizeof(LONG)); +#define FIX2LONG(x) (((x) + 8) >> 4) +#define LONG2FIX(x) ((x) << 4) #if defined(_M_IX86) @@ -10,6 +14,7 @@ EFLOAT_S *pef2 = (EFLOAT_S*)pf2; return (pef1->lMant == pef2->lMant && pef1->lExp == pef2->lExp); } +#define FLOATOBJ_Equal _FLOATOBJ_Equal FORCEINLINE LONG @@ -18,10 +23,36 @@ EFLOAT_S *pef = (EFLOAT_S*)pf; return pef->lMant >> (32 - pef->lExp); } +#define FLOATOBJ_GetLong _FLOATOBJ_GetLong + +/*! + * \brief Converts a FLOATOBJ into a LONG by truncating the value to integer + * + * \param pf - Pointer to a FLOATOBJ containing the value to convert + * + * \param pl - Pointer to a variable that receives the result + * + * \return TRUE if the function succeeded, FALSE if the result would overflow + * a LONG. + */ +FORCEINLINE +BOOL +FASTCALL +FLOATOBJ_bConvertToLong(FLOATOBJ *pf, PLONG pl) +{ + EFLOAT_S *pef = (EFLOAT_S*)pf; + LONG lShift = 32 - pef->lExp; + if (lShift < 0) + { + return FALSE; + } + *pl = pef->lMant >> lShift; + return TRUE; +} FORCEINLINE LONG -_FLOATOBJ_GetFix(FLOATOBJ *pf) +FLOATOBJ_GetFix(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; LONG Shift = (28 - pef->lExp); @@ -30,7 +61,7 @@ FORCEINLINE BOOL -_FLOATOBJ_IsLong(FLOATOBJ *pf) +FLOATOBJ_IsLong(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; ULONG ulShift = pef->lExp; @@ -42,7 +73,7 @@ FORCEINLINE BOOL -_FLOATOBJ_Equal0(FLOATOBJ *pf) +FLOATOBJ_Equal0(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; return (pef->lMant == 0 && pef->lExp == 0); @@ -50,7 +81,7 @@ FORCEINLINE BOOL -_FLOATOBJ_Equal1(FLOATOBJ *pf) +FLOATOBJ_Equal1(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; return (pef->lMant == 0x40000000 && pef->lExp == 2); @@ -70,12 +101,11 @@ #else -#define _FLOATOBJ_Equal(pf,pf1) (*(pf) == *(pf1)) -#define _FLOATOBJ_GetLong(pf) ((LONG)*(pf)) -#define _FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) -#define _FLOATOBJ_Equal0(pf) (*(pf) == 0.) -#define _FLOATOBJ_Equal1(pf) (*(pf) == 1.) -#define _FLOATOBJ_GetFix(pf) ((LONG)(*(pf) * 16.)) +#define FLOATOBJ_bConvertToLong(pf, pl) (*pl = (LONG)*pf, TRUE) +#define FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf)) +#define FLOATOBJ_Equal0(pf) (*(pf) == 0.) +#define FLOATOBJ_Equal1(pf) (*(pf) == 1.) +#define FLOATOBJ_GetFix(pf) ((LONG)(*(pf) * 16.)) #define FLOATOBJ_0 0. #define FLOATOBJ_1 1. Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Tue Nov 25 23:44:59 2014 @@ -1105,7 +1105,7 @@ } if (fs.fsCsb[0] == 0) { /* Let's see if we can find any interesting cmaps */ - for (i = 0; i < FontGDI->face->num_charmaps; i++) + for (i = 0; i < (UINT)FontGDI->face->num_charmaps; i++) { switch (FontGDI->face->charmaps[i]->encoding) { @@ -1501,7 +1501,7 @@ { TTPOLYGONHEADER *pph; TTPOLYCURVE *ppc; - unsigned int needed = 0, point = 0, contour, first_pt; + int needed = 0, point = 0, contour, first_pt; unsigned int pph_start, cpfx; DWORD type; @@ -2073,7 +2073,7 @@ INT x; while (h--) { - for (x = 0; x < pitch; x++) + for (x = 0; (UINT)x < pitch; x++) { if (x < ft_face->glyph->bitmap.width) dst[x] = (src[x / 8] & (1 << ( (7 - (x % 8))))) ? 0xff : 0; @@ -2346,7 +2346,8 @@ DWORD dwFlags) { PDC_ATTR pdcattr; - UINT Ret = DEFAULT_CHARSET, i; + UINT Ret = DEFAULT_CHARSET; + INT i; HFONT hFont; PTEXTOBJ TextObj; PFONTGDI FontGdi; @@ -3752,7 +3753,7 @@ { // FIXME this should probably be a matrix transform with TextTop as well. Scale = pdcattr->mxWorldToDevice.efM11; - if (_FLOATOBJ_Equal0(&Scale)) + if (FLOATOBJ_Equal0(&Scale)) FLOATOBJ_Set1(&Scale); FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); // do the shift before multiplying to preserve precision @@ -4029,7 +4030,7 @@ face = FontGDI->face; if (face->charmap == NULL) { - for (i = 0; i < face->num_charmaps; i++) + for (i = 0; i < (UINT)face->num_charmaps; i++) { charmap = face->charmaps[i]; if (charmap->encoding != 0) @@ -4227,7 +4228,7 @@ face = FontGDI->face; if (face->charmap == NULL) { - for (i = 0; i < face->num_charmaps; i++) + for (i = 0; i < (UINT)face->num_charmaps; i++) { charmap = face->charmaps[i]; if (charmap->encoding != 0) Modified: trunk/reactos/win32ss/gdi/ntgdi/xformobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/xformobj…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] Tue Nov 25 23:44:59 2014 @@ -12,16 +12,8 @@ #define NDEBUG #include <debug.h> -C_ASSERT(sizeof(FIX) == sizeof(LONG)); -#define FIX2LONG(x) (((x) + 8) >> 4) -#define LONG2FIX(x) ((x) << 4) - -#define FLOATOBJ_Equal _FLOATOBJ_Equal -#define FLOATOBJ_GetLong _FLOATOBJ_GetLong -#define FLOATOBJ_GetFix _FLOATOBJ_GetFix -#define FLOATOBJ_IsLong _FLOATOBJ_IsLong -#define FLOATOBJ_Equal0 _FLOATOBJ_Equal0 -#define FLOATOBJ_Equal1 _FLOATOBJ_Equal1 +#define DOES_VALUE_OVERFLOW_LONG(x) \ + (((__int64)((long)(x))) != (x)) /** Inline helper functions ***************************************************/ @@ -297,76 +289,153 @@ return XFORMOBJ_UpdateAccel(pxoDst); } + +/*! + * \brief Transforms fix-point coordinates in an array of POINTL structures using + * the transformation matrix from the XFORMOBJ. + * + * \param pxo - Pointer to the XFORMOBJ + * + * \param cPoints - Number of coordinates to transform + * + * \param pptIn - Pointer to an array of POINTL structures containing the + * source coordinates. + * + * \param pptOut - Pointer to an array of POINTL structures, receiving the + * transformed coordinates. Can be the same as pptIn. + * + * \return TRUE if the operation was successful, FALSE if any of the calculations + * caused an integer overflow. + * + * \note If the function returns FALSE, it might still have written to the + * output buffer. If pptIn and pptOut are equal, the source coordinates + * might have been partly overwritten! + */ static -VOID +BOOL NTAPI -XFORMOBJ_vXformFixPoints( - IN XFORMOBJ *pxo, - IN ULONG cPoints, - IN PPOINTL pptIn, - OUT PPOINTL pptOut) +XFORMOBJ_bXformFixPoints( + _In_ XFORMOBJ *pxo, + _In_ ULONG cPoints, + _In_reads_(cPoints) PPOINTL pptIn, + _Out_writes_(cPoints) PPOINTL pptOut) { PMATRIX pmx; INT i; FLOATOBJ fo1, fo2; FLONG flAccel; + LONG lM11, lM12, lM21, lM22, lTemp; + register LONGLONG llx, lly; pmx = XFORMOBJ_pmx(pxo); flAccel = pmx->flAccel; if ((flAccel & (XFORM_SCALE|XFORM_UNITY)) == (XFORM_SCALE|XFORM_UNITY)) { - /* Identity transformation, nothing todo */ + /* Identity transformation, nothing to do */ } else if (flAccel & XFORM_INTEGER) { if (flAccel & XFORM_UNITY) { - /* 1-scale integer transform */ - LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); - LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); + /* 1-scale integer transform, get the off-diagonal elements */ + if (!FLOATOBJ_bConvertToLong(&pmx->efM12, &lM12) || + !FLOATOBJ_bConvertToLong(&pmx->efM21, &lM21)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - LONG x = pptIn[i].x + pptIn[i].y * lM21; - LONG y = pptIn[i].y + pptIn[i].x * lM12; - pptOut[i].y = y; - pptOut[i].x = x; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].y, lM21) + pptIn[i].x; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].x, lM12) + pptIn[i].y; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } else if (flAccel & XFORM_SCALE) { - /* Diagonal integer transform */ - LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); - LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + /* Diagonal integer transform, get the diagonal elements */ + if (!FLOATOBJ_bConvertToLong(&pmx->efM11, &lM11) || + !FLOATOBJ_bConvertToLong(&pmx->efM22, &lM22)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - pptOut[i].x = pptIn[i].x * lM11; - pptOut[i].y = pptIn[i].y * lM22; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].x, lM11); + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].y, lM22); + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } else { /* Full integer transform */ - LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); - LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); - LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); - LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + if (!FLOATOBJ_bConvertToLong(&pmx->efM11, &lM11) || + !FLOATOBJ_bConvertToLong(&pmx->efM12, &lM12) || + !FLOATOBJ_bConvertToLong(&pmx->efM21, &lM21) || + !FLOATOBJ_bConvertToLong(&pmx->efM22, &lM22)) + { + NT_ASSERT(FALSE); + return FALSE; + } i = cPoints - 1; do { - LONG x; - x = pptIn[i].x * lM11; - x += pptIn[i].y * lM21; - pptOut[i].y = pptIn[i].y * lM22; - pptOut[i].y += pptIn[i].x * lM12; - pptOut[i].x = x; + /* Calculate x in 64 bit and check for overflow */ + llx = Int32x32To64(pptIn[i].x, lM11); + llx += Int32x32To64(pptIn[i].y, lM21); + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ + lly = Int32x32To64(pptIn[i].y, lM22); + lly += Int32x32To64(pptIn[i].x, lM12); + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } @@ -377,12 +446,35 @@ i = cPoints - 1; do { + /* Calculate x in 64 bit and check for overflow */ fo1 = pmx->efM21; FLOATOBJ_MulLong(&fo1, pptIn[i].y); + if (!FLOATOBJ_bConvertToLong(&fo1, &lTemp)) + { + return FALSE; + } + llx = (LONGLONG)pptIn[i].x + lTemp; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + + /* Calculate y in 64 bit and check for overflow */ fo2 = pmx->efM12; FLOATOBJ_MulLong(&fo2, pptIn[i].x); - pptOut[i].x = pptIn[i].x + FLOATOBJ_GetLong(&fo1); - pptOut[i].y = pptIn[i].y + FLOATOBJ_GetLong(&fo2); + if (!FLOATOBJ_bConvertToLong(&fo2, &lTemp)) + { + return FALSE; + } + lly = (LONGLONG)pptIn[i].y + lTemp; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + + /* Write back the results */ + pptOut[i].x = (LONG)llx; + pptOut[i].y = (LONG)lly; } while (--i >= 0); } @@ -394,10 +486,17 @@ { fo1 = pmx->efM11; FLOATOBJ_MulLong(&fo1, pptIn[i].x); - pptOut[i].x = FLOATOBJ_GetLong(&fo1); + if (!FLOATOBJ_bConvertToLong(&fo1, &pptOut[i].x)) + { + return FALSE; + } + fo2 = pmx->efM22; FLOATOBJ_MulLong(&fo2, pptIn[i].y); - pptOut[i].y = FLOATOBJ_GetLong(&fo2); + if (!FLOATOBJ_bConvertToLong(&fo2, &pptOut[i].y)) + { + return FALSE; + } } while (--i >= 0); } @@ -407,10 +506,21 @@ i = cPoints - 1; do { + /* Calculate x as FLOATOBJ */ MulAddLong(&fo1, &pmx->efM11, pptIn[i].x, &pmx->efM21, pptIn[i].y); + + /* Calculate y as FLOATOBJ */ MulAddLong(&fo2, &pmx->efM12, pptIn[i].x, &pmx->efM22, pptIn[i].y); - pptOut[i].x = FLOATOBJ_GetLong(&fo1); - pptOut[i].y = FLOATOBJ_GetLong(&fo2); + + if (!FLOATOBJ_bConvertToLong(&fo1, &pptOut[i].x)) + { + return FALSE; + } + + if (!FLOATOBJ_bConvertToLong(&fo2, &pptOut[i].y)) + { + return FALSE; + } } while (--i >= 0); } @@ -421,11 +531,24 @@ i = cPoints - 1; do { - pptOut[i].x += pmx->fxDx; - pptOut[i].y += pmx->fxDy; + llx = (LONGLONG)pptOut[i].x + pmx->fxDx; + if (DOES_VALUE_OVERFLOW_LONG(llx)) + { + return FALSE; + } + pptOut[i].x = (LONG)llx; + + lly = (LONGLONG)pptOut[i].y + pmx->fxDy; + if (DOES_VALUE_OVERFLOW_LONG(lly)) + { + return FALSE; + } + pptOut[i].y = (LONG)lly; } while (--i >= 0); } + + return TRUE; } /** Public functions **********************************************************/ @@ -534,7 +657,10 @@ } /* Do the actual fixpoint transformation */ - XFORMOBJ_vXformFixPoints(pxo, cPoints, pvIn, pvOut); + if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) + { + return FALSE; + } /* Convert POINTFIX to POINTL? */ if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL)
10 years
1
0
0
0
[hbelusca] 65489: Forgot this include...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Nov 25 23:36:56 2014 New Revision: 65489 URL:
http://svn.reactos.org/svn/reactos?rev=65489&view=rev
Log: Forgot this include... Modified: trunk/reactos/base/system/lsass/lsass.c Modified: trunk/reactos/base/system/lsass/lsass.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/lsass/lsass.c?…
============================================================================== --- trunk/reactos/base/system/lsass/lsass.c [iso-8859-1] (original) +++ trunk/reactos/base/system/lsass/lsass.c [iso-8859-1] Tue Nov 25 23:36:56 2014 @@ -28,6 +28,7 @@ #define NTOS_MODE_USER #include <ndk/psfuncs.h> +#include <ndk/rtlfuncs.h> #include <lsass/lsasrv.h> #include <samsrv/samsrv.h>
10 years
1
0
0
0
[hbelusca] 65488: [LSASS][SERVICES][WINLOGON]: As CSRSS and SMSS already, those apps should be marked as critical for the system. See http://www.geoffchappell.com/studies/windows/win32/ntdll/api/rt...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Nov 25 23:34:14 2014 New Revision: 65488 URL:
http://svn.reactos.org/svn/reactos?rev=65488&view=rev
Log: [LSASS][SERVICES][WINLOGON]: As CSRSS and SMSS already, those apps should be marked as critical for the system. See
http://www.geoffchappell.com/studies/windows/win32/ntdll/api/rtl/peb/setpro…
for more details. Modified: trunk/reactos/base/system/lsass/lsass.c trunk/reactos/base/system/services/services.c trunk/reactos/base/system/winlogon/winlogon.c Modified: trunk/reactos/base/system/lsass/lsass.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/lsass/lsass.c?…
============================================================================== --- trunk/reactos/base/system/lsass/lsass.c [iso-8859-1] (original) +++ trunk/reactos/base/system/lsass/lsass.c [iso-8859-1] Tue Nov 25 23:34:14 2014 @@ -46,6 +46,9 @@ DPRINT("Local Security Authority Subsystem\n"); DPRINT(" Initializing...\n"); + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, TRUE); + /* Initialize the LSA server DLL. */ Status = LsapInitLsa(); if (!NT_SUCCESS(Status)) Modified: trunk/reactos/base/system/services/services.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/servi…
============================================================================== --- trunk/reactos/base/system/services/services.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/services.c [iso-8859-1] Tue Nov 25 23:34:14 2014 @@ -316,6 +316,9 @@ DPRINT("SERVICES: Service Control Manager\n"); + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, TRUE); + /* We are initializing ourselves */ ScmInitialize = TRUE; Modified: trunk/reactos/base/system/winlogon/winlogon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/winlo…
============================================================================== --- trunk/reactos/base/system/winlogon/winlogon.c [iso-8859-1] (original) +++ trunk/reactos/base/system/winlogon/winlogon.c [iso-8859-1] Tue Nov 25 23:34:14 2014 @@ -318,6 +318,10 @@ hAppInstance = hInstance; + /* Make us critical */ + RtlSetProcessIsCritical(TRUE, NULL, FALSE); + RtlSetThreadIsCritical(TRUE, NULL, FALSE); + if (!RegisterLogonProcess(GetCurrentProcessId(), TRUE)) { ERR("WL: Could not register logon process\n");
10 years
1
0
0
0
[jimtabor] 65487: [Win32k] - Fixes wine win.c:test_SetParent last ShowWindow test after popup dies.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Nov 25 23:03:43 2014 New Revision: 65487 URL:
http://svn.reactos.org/svn/reactos?rev=65487&view=rev
Log: [Win32k] - Fixes wine win.c:test_SetParent last ShowWindow test after popup dies. Modified: trunk/reactos/win32ss/user/ntuser/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Tue Nov 25 23:03:43 2014 @@ -327,6 +327,7 @@ /* If this is popup window, try to activate the owner first. */ if ((Wnd->style & WS_POPUP) && (WndTo = Wnd->spwndOwner)) { + ERR("WPAOW Popup with Owner\n"); WndTo = UserGetAncestor( WndTo, GA_ROOT ); if (can_activate_window(WndTo)) goto done; } @@ -336,18 +337,41 @@ WndTo = Wnd; for (;;) { - if (!(WndTo = WndTo->spwndNext)) break; - if (can_activate_window( WndTo )) break; + if (!(WndTo = WndTo->spwndNext)) break; + if (can_activate_window( WndTo )) goto done; + } + + /* + Fixes wine win.c:test_SetParent last ShowWindow test after popup dies. + Check for previous active window to bring to top. + */ + if (Wnd) + { + WndTo = Wnd->head.pti->MessageQueue->spwndActivePrev; + if (can_activate_window( WndTo )) goto done; + } + + // Find any window to bring to top. Works Okay for wine. + WndTo = UserGetDesktopWindow(); + WndTo = WndTo->spwndChild; + for (;;) + { + if (WndTo == Wnd) + { + WndTo = NULL; + break; + } + if (can_activate_window( WndTo )) goto done; + if (!(WndTo = WndTo->spwndNext)) break; } done: - if (WndTo) UserRefObjectCo(WndTo, &Ref); - if (!gpqForeground || Wnd == gpqForeground->spwndActive) + if ((gpqForeground && !gpqForeground->spwndActive) || Wnd == gpqForeground->spwndActive) { /* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */ - //ERR("WinPosActivateOtherWindow Set FG 0x%p\n",WndTo); + //ERR("WinPosActivateOtherWindow Set FG 0x%p hWnd %p\n",WndTo, WndTo ? WndTo->head.h : 0); if (co_IntSetForegroundWindow(WndTo)) { if (WndTo) UserDerefObjectCo(WndTo);
10 years
1
0
0
0
[pschweitzer] 65486: [NTFS] Make the bound check more consistent and more accurate
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Nov 25 21:03:17 2014 New Revision: 65486 URL:
http://svn.reactos.org/svn/reactos?rev=65486&view=rev
Log: [NTFS] Make the bound check more consistent and more accurate Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Tue Nov 25 21:03:17 2014 @@ -558,7 +558,7 @@ IndexRoot = (PINDEX_ROOT_ATTRIBUTE)IndexRecord; IndexEntry = (PINDEX_ENTRY_ATTRIBUTE)((PCHAR)&IndexRoot->Header + IndexRoot->Header.FirstEntryOffset); /* Index root is always resident. */ - IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRootCtx->Record.Resident.ValueLength); + IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRoot->Header.TotalSizeOfEntries); ReleaseAttributeContext(IndexRootCtx); DPRINT("IndexRecordSize: %x IndexBlockSize: %x\n", Vcb->NtfsInfo.BytesPerIndexRecord, IndexRoot->SizeOfEntry);
10 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
38
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
Results per page:
10
25
50
100
200