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
October 2013
----- 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
14 participants
325 discussions
Start a n
N
ew thread
[ekohl] 60691: [SAMSRV] Add query and set code of user private data and security descriptor attributes.
by ekohl@svn.reactos.org
Author: ekohl Date: Wed Oct 16 19:17:09 2013 New Revision: 60691 URL:
http://svn.reactos.org/svn/reactos?rev=60691&view=rev
Log: [SAMSRV] Add query and set code of user private data and security descriptor attributes. Modified: trunk/reactos/dll/win32/samsrv/samrpc.c Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Wed Oct 16 19:17:09 2013 @@ -6793,17 +6793,49 @@ if (InfoBuffer->All.WhichFields & USER_ALL_PRIVATEDATA) { + Status = SampGetObjectAttributeString(UserObject, + L"PrivateData", + &InfoBuffer->All.PrivateData); + if (!NT_SUCCESS(Status)) + { + TRACE("Status 0x%08lx\n", Status); + goto done; + } + } + + if (InfoBuffer->All.WhichFields & USER_ALL_PASSWORDEXPIRED) + { /* FIXME */ } - if (InfoBuffer->All.WhichFields & USER_ALL_PASSWORDEXPIRED) - { - /* FIXME */ - } - if (InfoBuffer->All.WhichFields & USER_ALL_SECURITYDESCRIPTOR) { - /* FIXME */ + Length = 0; + SampGetObjectAttribute(UserObject, + L"SecDesc", + NULL, + NULL, + &Length); + + if (Length > 0) + { + InfoBuffer->All.SecurityDescriptor.SecurityDescriptor = midl_user_allocate(Length); + if (InfoBuffer->All.SecurityDescriptor.SecurityDescriptor == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + InfoBuffer->All.SecurityDescriptor.Length = Length; + + Status = SampGetObjectAttribute(UserObject, + L"SecDesc", + NULL, + (PVOID)InfoBuffer->All.SecurityDescriptor.SecurityDescriptor, + &Length); + if (!NT_SUCCESS(Status)) + goto done; + } } *Buffer = InfoBuffer; @@ -6851,6 +6883,12 @@ if (InfoBuffer->All.NtOwfPassword.Buffer != NULL) midl_user_free(InfoBuffer->All.NtOwfPassword.Buffer); + + if (InfoBuffer->All.PrivateData.Buffer != NULL) + midl_user_free(InfoBuffer->All.PrivateData.Buffer); + + if (InfoBuffer->All.SecurityDescriptor.SecurityDescriptor != NULL) + midl_user_free(InfoBuffer->All.SecurityDescriptor.SecurityDescriptor); midl_user_free(InfoBuffer); } @@ -7539,6 +7577,15 @@ WriteFixedData = TRUE; } + if (WhichFields & USER_ALL_PRIVATEDATA) + { + Status = SampSetObjectAttributeString(UserObject, + L"PrivateData", + &Buffer->All.PrivateData); + if (!NT_SUCCESS(Status)) + goto done; + } + if (WhichFields & USER_ALL_PASSWORDEXPIRED) { if (Buffer->All.PasswordExpired) @@ -7556,6 +7603,15 @@ } WriteFixedData = TRUE; + } + + if (WhichFields & USER_ALL_SECURITYDESCRIPTOR) + { + Status = SampSetObjectAttribute(UserObject, + L"SecDesc", + REG_BINARY, + Buffer->All.SecurityDescriptor.SecurityDescriptor, + Buffer->All.SecurityDescriptor.Length); } if (WriteFixedData == TRUE)
11 years, 2 months
1
0
0
0
[gadamopoulos] 60690: [shell32] - Add an initial stub for CMenuBand that creates a menu bar and fills it with contents. However its still not functional
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Oct 16 19:13:49 2013 New Revision: 60690 URL:
http://svn.reactos.org/svn/reactos?rev=60690&view=rev
Log: [shell32] - Add an initial stub for CMenuBand that creates a menu bar and fills it with contents. However its still not functional Modified: trunk/reactos/dll/win32/shell32/CMenuBand.cpp trunk/reactos/dll/win32/shell32/CMenuBand.h trunk/reactos/dll/win32/shell32/precomp.h Modified: trunk/reactos/dll/win32/shell32/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMenuBan…
============================================================================== --- trunk/reactos/dll/win32/shell32/CMenuBand.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CMenuBand.cpp [iso-8859-1] Wed Oct 16 19:13:49 2013 @@ -7,57 +7,368 @@ */ #include "precomp.h" +#include <windowsx.h> WINE_DEFAULT_DEBUG_CHANNEL(CMenuBand); -HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::ShowDW(BOOL fShow) -{ - UNIMPLEMENTED; - return S_OK; + +BOOL +AllocAndGetMenuString(HMENU hMenu, UINT ItemIDByPosition, WCHAR** String) +{ + int Length; + + Length = GetMenuStringW(hMenu, ItemIDByPosition, NULL, 0, MF_BYPOSITION); + + if(!Length) + return FALSE; + + /* Also allocate space for the terminating NULL character */ + ++Length; + *String = (PWSTR)HeapAlloc(GetProcessHeap(), 0, Length * sizeof(WCHAR)); + + GetMenuStringW(hMenu, ItemIDByPosition, *String, Length, MF_BYPOSITION); + + return TRUE; +} + +CMenuStaticToolbar::CMenuStaticToolbar(CMenuBand *menuBand) +{ + m_menuBand = menuBand; + + + m_menuBand = NULL; + m_hwnd = NULL; + m_hmenu = NULL; + m_hwndOwner = NULL; + m_dwMenuFlags = NULL; +} + +HRESULT CMenuStaticToolbar::GetMenu( + HMENU *phmenu, + HWND *phwnd, + DWORD *pdwFlags) +{ + *phmenu = m_hmenu; + *phwnd = m_hwndOwner; + *pdwFlags = m_dwMenuFlags; + + return S_OK; +} + +HRESULT CMenuStaticToolbar::SetMenu( + HMENU hmenu, + HWND hwnd, + DWORD dwFlags) +{ + if (!hwnd) + return E_FAIL; + + m_hmenu = hmenu; + m_hwndOwner = hwnd; + m_dwMenuFlags = dwFlags; + + return S_OK; +} + +HRESULT CMenuStaticToolbar::ShowWindow(BOOL fShow) +{ + ::ShowWindow(m_hwnd, fShow ? SW_SHOW : SW_HIDE); + + return S_OK; +} + +HRESULT CMenuStaticToolbar::Close() +{ + DestroyWindow(m_hwnd); + m_hwnd = NULL; + return S_OK; +} + +HRESULT CMenuStaticToolbar::CreateToolbar(HWND hwndParent, DWORD dwFlags) +{ + HWND hwndToolbar; + hwndToolbar = CreateWindowEx(TBSTYLE_EX_DOUBLEBUFFER, TOOLBARCLASSNAMEW, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | + WS_CLIPCHILDREN | TBSTYLE_TOOLTIPS | TBSTYLE_TRANSPARENT | TBSTYLE_REGISTERDROP | TBSTYLE_LIST | TBSTYLE_FLAT | + CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_TOP, 0, 0, 500, 20, m_hwndOwner, NULL, + _AtlBaseModule.GetModuleInstance(), 0); + if (hwndToolbar == NULL) + return E_FAIL; + + ::SetParent(hwndToolbar, hwndParent); + + m_hwnd = hwndToolbar; + + /* Identify the version of the used Common Controls DLL by sending the size of the TBBUTTON structure */ + SendMessageW(m_hwnd, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); + + if (dwFlags & SMINIT_TOPLEVEL) + { + /* Hide the placeholders for the button images */ + SendMessageW(m_hwnd, TB_SETIMAGELIST, 0, 0); + } + + return S_OK; +} + +HRESULT CMenuStaticToolbar::FillToolbar() +{ + TBBUTTON tbb = {0}; + int i; + PWSTR MenuString; + + tbb.fsState = TBSTATE_ENABLED; + tbb.fsStyle = BTNS_DROPDOWN | BTNS_AUTOSIZE; + + for(i = 0; i < GetMenuItemCount(m_hmenu); i++) + { + if(!AllocAndGetMenuString(m_hmenu, i, &MenuString)) + return E_OUTOFMEMORY; + + tbb.idCommand = i; + tbb.iString = (INT_PTR)MenuString; + + SendMessageW(m_hwnd, TB_ADDBUTTONS, 1, (LPARAM)(LPTBBUTTON)&tbb); + HeapFree(GetProcessHeap(), 0, MenuString); + } + + return S_OK; +} + +HRESULT CMenuStaticToolbar::GetWindow(HWND *phwnd) +{ + if (!phwnd) + return E_FAIL; + + *phwnd = m_hwnd; + + return S_OK; +} + +CMenuBand::CMenuBand() +{ + m_site = NULL; + m_psmc = NULL; + m_staticToolbar = NULL; +} + +CMenuBand::~CMenuBand() +{ + if (m_site) + m_site->Release(); + + if (m_psmc) + m_psmc->Release(); + + if (m_staticToolbar) + delete m_staticToolbar; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::Initialize( + IShellMenuCallback *psmc, + UINT uId, + UINT uIdAncestor, + DWORD dwFlags) +{ + if(m_psmc) + m_psmc->Release(); + + m_psmc = psmc; + m_uId = uId; + m_uIdAncestor = uIdAncestor; + m_dwFlags = dwFlags; + + if (m_psmc) + m_psmc->AddRef(); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetMenuInfo( + IShellMenuCallback **ppsmc, + UINT *puId, + UINT *puIdAncestor, + DWORD *pdwFlags) +{ + *ppsmc = m_psmc; + *puId = m_uId; + *puIdAncestor = m_uIdAncestor; + *pdwFlags = m_dwFlags; + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetMenu( + HMENU hmenu, + HWND hwnd, + DWORD dwFlags) +{ + if (m_staticToolbar == NULL) + m_staticToolbar = new CMenuStaticToolbar(this); + + HRESULT hResult = m_staticToolbar->SetMenu(hmenu, hwnd, dwFlags); + if (FAILED(hResult)) + return hResult; + + if (m_site) + { + HWND hwndParent; + + hResult = m_site->GetWindow(&hwndParent); + if (FAILED(hResult)) + return hResult; + + hResult = m_staticToolbar->CreateToolbar(hwndParent, m_dwFlags); + if (FAILED(hResult)) + return hResult; + + hResult = m_staticToolbar->FillToolbar(); + } + + return hResult; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetMenu( + HMENU *phmenu, + HWND *phwnd, + DWORD *pdwFlags) +{ + if (m_staticToolbar == NULL) + return E_FAIL; + + return m_staticToolbar->GetMenu(phmenu, phwnd, pdwFlags); +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetSite(IUnknown *pUnkSite) +{ + HWND hwndParent; + HRESULT hResult; + + if (m_site != NULL) + m_site->Release(); + + if (pUnkSite == NULL) + return S_OK; + + hwndParent = NULL; + hResult = pUnkSite->QueryInterface(IID_IOleWindow, reinterpret_cast<void **>(&m_site)); + if (SUCCEEDED(hResult)) + { + m_site->GetWindow(&hwndParent); + m_site->Release(); + } + if (!::IsWindow(hwndParent)) + return E_FAIL; + + if (m_staticToolbar != NULL) + { + m_staticToolbar->CreateToolbar(hwndParent, m_dwFlags); + m_staticToolbar->FillToolbar(); + } + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetSite(REFIID riid, PVOID *ppvSite) +{ + if (m_site == NULL) + return E_FAIL; + + return m_site->QueryInterface(riid, ppvSite); +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetWindow( + HWND *phwnd) +{ + if (m_staticToolbar != NULL) + return m_staticToolbar->GetWindow(phwnd); + + return E_FAIL; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo( + DWORD dwBandID, + DWORD dwViewMode, + DESKBANDINFO *pdbi) +{ + SIZE size; + HWND hwnd; + HRESULT hResult; + + /* FIXME */ + if (m_staticToolbar == NULL) + return E_FAIL; + hResult = m_staticToolbar->GetWindow(&hwnd); + if (FAILED(hResult)) + return hResult; + if (hwnd == NULL) + return E_FAIL; + + if (pdbi->dwMask & DBIM_MINSIZE) + { + SendMessageW( hwnd, TB_GETIDEALSIZE, TRUE, (LPARAM)&size); + + pdbi->ptMinSize.x = 0; + pdbi->ptMinSize.y = size.cy; + } + if (pdbi->dwMask & DBIM_MAXSIZE) + { + SendMessageW( hwnd, TB_GETMAXSIZE, 0, (LPARAM)&size); + + pdbi->ptMaxSize.x = size.cx; + pdbi->ptMaxSize.y = size.cy; + } + if (pdbi->dwMask & DBIM_INTEGRAL) + { + pdbi->ptIntegral.x = 0; + pdbi->ptIntegral.y = 0; + } + if (pdbi->dwMask & DBIM_ACTUAL) + { + SendMessageW( hwnd, TB_GETIDEALSIZE, TRUE, (LPARAM)&size); + SendMessageW( hwnd, TB_GETIDEALSIZE, FALSE, (LPARAM)&size); + + pdbi->ptActual.x = size.cx; + pdbi->ptActual.y = size.cy; + } + if (pdbi->dwMask & DBIM_TITLE) + wcscpy(pdbi->wszTitle, L""); + if (pdbi->dwMask & DBIM_MODEFLAGS) + pdbi->dwModeFlags = DBIMF_UNDELETEABLE; + if (pdbi->dwMask & DBIM_BKCOLOR) + pdbi->crBkgnd = 0; + return S_OK; +} + +/* IDockingWindow */ +HRESULT STDMETHODCALLTYPE CMenuBand::ShowDW(BOOL fShow) +{ + if (m_staticToolbar != NULL) + return m_staticToolbar->ShowWindow(fShow); + + return E_FAIL; } HRESULT STDMETHODCALLTYPE CMenuBand::CloseDW(DWORD dwReserved) { - UNIMPLEMENTED; - return S_OK; -} - + ShowDW(FALSE); + + if (m_staticToolbar != NULL) + return m_staticToolbar->Close(); + + return S_OK; +} HRESULT STDMETHODCALLTYPE CMenuBand::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) { UNIMPLEMENTED; return S_OK; } -HRESULT STDMETHODCALLTYPE CMenuBand::GetWindow(HWND *phwnd) -{ - UNIMPLEMENTED; - return S_OK; -} - HRESULT STDMETHODCALLTYPE CMenuBand::ContextSensitiveHelp(BOOL fEnterMode) { UNIMPLEMENTED; return S_OK; } -HRESULT STDMETHODCALLTYPE CMenuBand::SetSite(IUnknown *pUnkSite) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetSite(REFIID riid, PVOID *ppvSite) -{ - UNIMPLEMENTED; - return S_OK; -} - HRESULT STDMETHODCALLTYPE CMenuBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg) { UNIMPLEMENTED; @@ -172,18 +483,6 @@ return S_FALSE; } -HRESULT STDMETHODCALLTYPE CMenuBand::Initialize(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor,DWORD dwFlags) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetMenuInfo(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) -{ - UNIMPLEMENTED; - return S_OK; -} - HRESULT STDMETHODCALLTYPE CMenuBand::SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) { UNIMPLEMENTED; @@ -196,18 +495,6 @@ return S_OK; } -HRESULT STDMETHODCALLTYPE CMenuBand::SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) -{ - UNIMPLEMENTED; - return S_OK; -} - HRESULT STDMETHODCALLTYPE CMenuBand::InvalidateItem(LPSMDATA psmd, DWORD dwFlags) { UNIMPLEMENTED; Modified: trunk/reactos/dll/win32/shell32/CMenuBand.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMenuBan…
============================================================================== --- trunk/reactos/dll/win32/shell32/CMenuBand.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CMenuBand.h [iso-8859-1] Wed Oct 16 19:13:49 2013 @@ -1,3 +1,29 @@ + +class CMenuBand; + +class CMenuStaticToolbar +{ +public: + CMenuStaticToolbar(CMenuBand *menuBand); + + HRESULT CreateToolbar(HWND hwndParent, DWORD dwFlags); + HRESULT FillToolbar(); + HRESULT GetWindow(HWND *phwnd); + HRESULT SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags); + HRESULT GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags); + HRESULT ShowWindow(BOOL fShow); + HRESULT Close(); + +private: + + static const UINT WM_USER_SHOWPOPUPMENU = WM_USER + 1; + + CMenuBand *m_menuBand; + HWND m_hwnd; + HMENU m_hmenu; + HWND m_hwndOwner; + DWORD m_dwMenuFlags; +}; class CMenuBand : public CComCoClass<CMenuBand, &CLSID_MenuBand>, @@ -14,6 +40,19 @@ public IWinEventHandler, public IShellMenuAcc { +public: + CMenuBand(); + ~CMenuBand(); + +private: + + IOleWindow *m_site; + CMenuStaticToolbar *m_staticToolbar; + + IShellMenuCallback *m_psmc; + UINT m_uId; + UINT m_uIdAncestor; + DWORD m_dwFlags; public : // *** IDeskBand methods *** @@ -103,19 +142,18 @@ DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CMenuBand) - COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup) - COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) + COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IMenuPopup) COM_INTERFACE_ENTRY_IID(IID_IShellMenu, IShellMenu) COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IDeskBand) COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow) - COM_INTERFACE_ENTRY_IID(IID_IDeskBar, IDeskBar) COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject) COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) - COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersistStream) COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider) + COM_INTERFACE_ENTRY_IID(IID_IMenuPopup, IMenuPopup) COM_INTERFACE_ENTRY_IID(IID_IMenuBand, IMenuBand) COM_INTERFACE_ENTRY_IID(IID_IShellMenu2, IShellMenu2) COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) Modified: trunk/reactos/dll/win32/shell32/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
============================================================================== --- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Wed Oct 16 19:13:49 2013 @@ -32,6 +32,7 @@ #include <ndk/rtlfuncs.h> #include <fmifs/fmifs.h> #include <sddl.h> +#include <commoncontrols.h> #include <tchar.h> #include <strsafe.h>
11 years, 2 months
1
0
0
0
[aandrejevic] 60689: [SOFT386] Allow the DS segment to overriden in LODS, MOVS and CMPS.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Oct 16 03:44:06 2013 New Revision: 60689 URL:
http://svn.reactos.org/svn/reactos?rev=60689&view=rev
Log: [SOFT386] Allow the DS segment to overriden in LODS, MOVS and CMPS. Modified: branches/ntvdm/lib/soft386/opcodes.c Modified: branches/ntvdm/lib/soft386/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Wed Oct 16 03:44:06 2013 @@ -6080,6 +6080,7 @@ { ULONG Data, DataSize; BOOLEAN OperandSize, AddressSize; + SOFT386_SEG_REGS Segment = SOFT386_REG_DS; OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size; @@ -6096,6 +6097,12 @@ { /* The ADSIZE prefix toggles the size */ AddressSize = !AddressSize; + } + + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead of DS */ + Segment = State->SegmentOverride; } /* Calculate the size */ @@ -6148,7 +6155,7 @@ /* Read from memory */ if (!Soft386ReadMemory(State, - SOFT386_REG_DS, + Segment, AddressSize ? State->GeneralRegs[SOFT386_REG_ESI].Long : State->GeneralRegs[SOFT386_REG_ESI].LowWord, FALSE, @@ -6267,6 +6274,7 @@ ULONG FirstValue = 0, SecondValue = 0, Result; ULONG DataSize, DataMask, SignFlag; BOOLEAN OperandSize, AddressSize; + SOFT386_SEG_REGS Segment = SOFT386_REG_DS; OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size; @@ -6285,12 +6293,10 @@ AddressSize = !AddressSize; } - if ((State->PrefixFlags & SOFT386_PREFIX_REP) - || (State->PrefixFlags & SOFT386_PREFIX_REPNZ)) - { - // TODO: The REP/REPZ/REPNZ prefixes need to be implemented! - Soft386Exception(State, SOFT386_EXCEPTION_UD); - return FALSE; + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead of DS */ + Segment = State->SegmentOverride; } /* Calculate the size */ @@ -6303,7 +6309,7 @@ /* Read from the first source operand */ if (!Soft386ReadMemory(State, - SOFT386_REG_DS, + Segment, AddressSize ? State->GeneralRegs[SOFT386_REG_ESI].Long : State->GeneralRegs[SOFT386_REG_ESI].LowWord, FALSE, @@ -6553,6 +6559,7 @@ { ULONG DataSize; BOOLEAN OperandSize, AddressSize; + SOFT386_SEG_REGS Segment = SOFT386_REG_DS; OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size; @@ -6569,6 +6576,12 @@ { /* The ADSIZE prefix toggles the size */ AddressSize = !AddressSize; + } + + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead of DS */ + Segment = State->SegmentOverride; } /* Calculate the size */ @@ -6598,7 +6611,7 @@ /* Read from the source operand */ if (!Soft386ReadMemory(State, - SOFT386_REG_DS, + Segment, AddressSize ? State->GeneralRegs[SOFT386_REG_ESI].Long : State->GeneralRegs[SOFT386_REG_ESI].LowWord, FALSE,
11 years, 2 months
1
0
0
0
[aandrejevic] 60688: [SOFT386] Implement the far absolute indirect JMP/CALL instructions in group 0xFF.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Oct 16 03:14:12 2013 New Revision: 60688 URL:
http://svn.reactos.org/svn/reactos?rev=60688&view=rev
Log: [SOFT386] Implement the far absolute indirect JMP/CALL instructions in group 0xFF. Modified: branches/ntvdm/lib/soft386/opgroups.c Modified: branches/ntvdm/lib/soft386/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] Wed Oct 16 03:14:12 2013 @@ -1508,8 +1508,90 @@ /* Set the EIP to the address */ State->InstPtr.Long = Value; } + else if (ModRegRm.Register == 3) + { + USHORT Selector; + INT Segment = SOFT386_REG_DS; + + /* Check for the segment override */ + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read the selector */ + if (!Soft386ReadMemory(State, + Segment, + ModRegRm.MemoryAddress + sizeof(ULONG), + FALSE, + &Selector, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current value of CS */ + if (!Soft386StackPush(State, State->SegmentRegs[SOFT386_REG_CS].Selector)) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current value of EIP */ + if (!Soft386StackPush(State, State->InstPtr.Long)) + { + /* Exception occurred */ + return FALSE; + } + + /* Load the new code segment */ + if (!Soft386LoadSegment(State, SOFT386_REG_CS, Selector)) + { + /* Exception occurred */ + return FALSE; + } + + /* Set the EIP to the address */ + State->InstPtr.Long = Value; + } else if (ModRegRm.Register == 4) { + /* Set the EIP to the address */ + State->InstPtr.Long = Value; + } + else if (ModRegRm.Register == 5) + { + USHORT Selector; + INT Segment = SOFT386_REG_DS; + + /* Check for the segment override */ + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read the selector */ + if (!Soft386ReadMemory(State, + Segment, + ModRegRm.MemoryAddress + sizeof(ULONG), + FALSE, + &Selector, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } + + /* Load the new code segment */ + if (!Soft386LoadSegment(State, SOFT386_REG_CS, Selector)) + { + /* Exception occurred */ + return FALSE; + } + /* Set the EIP to the address */ State->InstPtr.Long = Value; } @@ -1569,15 +1651,104 @@ /* Set the IP to the address */ State->InstPtr.LowWord = Value; } - else if (ModRegRm.Register == 4) - { + else if (ModRegRm.Register == 3) + { + USHORT Selector; + INT Segment = SOFT386_REG_DS; + + /* Check for the segment override */ + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read the selector */ + if (!Soft386ReadMemory(State, + Segment, + ModRegRm.MemoryAddress + sizeof(USHORT), + FALSE, + &Selector, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current value of CS */ + if (!Soft386StackPush(State, State->SegmentRegs[SOFT386_REG_CS].Selector)) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current value of IP */ + if (!Soft386StackPush(State, State->InstPtr.LowWord)) + { + /* Exception occurred */ + return FALSE; + } + + /* Load the new code segment */ + if (!Soft386LoadSegment(State, SOFT386_REG_CS, Selector)) + { + /* Exception occurred */ + return FALSE; + } + /* Set the IP to the address */ State->InstPtr.LowWord = Value; + + } + else if (ModRegRm.Register == 4) + { + /* Set the IP to the address */ + State->InstPtr.LowWord = Value; + } + else if (ModRegRm.Register == 5) + { + USHORT Selector; + INT Segment = SOFT386_REG_DS; + + /* Check for the segment override */ + if (State->PrefixFlags & SOFT386_PREFIX_SEG) + { + /* Use the override segment instead */ + Segment = State->SegmentOverride; + } + + /* Read the selector */ + if (!Soft386ReadMemory(State, + Segment, + ModRegRm.MemoryAddress + sizeof(USHORT), + FALSE, + &Selector, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } + + /* Load the new code segment */ + if (!Soft386LoadSegment(State, SOFT386_REG_CS, Selector)) + { + /* Exception occurred */ + return FALSE; + } + + /* Set the IP to the address */ + State->InstPtr.LowWord = Value; } else if (ModRegRm.Register == 6) { /* Push the value on to the stack */ return Soft386StackPush(State, Value); + } + else + { + /* Invalid */ + Soft386Exception(State, SOFT386_EXCEPTION_UD); + return FALSE; } if (ModRegRm.Register <= 1) @@ -1595,14 +1766,6 @@ } } - if ((ModRegRm.Register == 3) - || (ModRegRm.Register == 5) - || (ModRegRm.Register == 7)) - { - UNIMPLEMENTED; - return FALSE; // NOT IMPLEMENTED - } - return TRUE; }
11 years, 2 months
1
0
0
0
[aandrejevic] 60687: [SOFT386] Fix bugs in SF calculation.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Oct 16 02:22:40 2013 New Revision: 60687 URL:
http://svn.reactos.org/svn/reactos?rev=60687&view=rev
Log: [SOFT386] Fix bugs in SF calculation. Modified: branches/ntvdm/lib/soft386/opcodes.c Modified: branches/ntvdm/lib/soft386/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Wed Oct 16 02:22:40 2013 @@ -1663,7 +1663,7 @@ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; State->Flags.Pf = Soft386CalculateParity(Result); /* Write back the result */ @@ -1930,7 +1930,7 @@ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; State->Flags.Pf = Soft386CalculateParity(Result); /* Write back the result */ @@ -2197,7 +2197,7 @@ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; State->Flags.Pf = Soft386CalculateParity(Result); /* Write back the result */ @@ -2454,7 +2454,7 @@ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; State->Flags.Pf = Soft386CalculateParity(Result); }
11 years, 2 months
1
0
0
0
[aandrejevic] 60686: [SOFT386] Implement the near absolute indirect JMP/CALL in opcode group 0xFF.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Oct 16 01:44:39 2013 New Revision: 60686 URL:
http://svn.reactos.org/svn/reactos?rev=60686&view=rev
Log: [SOFT386] Implement the near absolute indirect JMP/CALL in opcode group 0xFF. Modified: branches/ntvdm/lib/soft386/opgroups.c Modified: branches/ntvdm/lib/soft386/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] Wed Oct 16 01:44:39 2013 @@ -1496,6 +1496,23 @@ Value--; State->Flags.Af = ((Value & 0x0F) == 0x0F); } + else if (ModRegRm.Register == 2) + { + /* Push the current value of EIP */ + if (!Soft386StackPush(State, State->InstPtr.Long)) + { + /* Exception occurred */ + return FALSE; + } + + /* Set the EIP to the address */ + State->InstPtr.Long = Value; + } + else if (ModRegRm.Register == 4) + { + /* Set the EIP to the address */ + State->InstPtr.Long = Value; + } else if (ModRegRm.Register == 6) { /* Push the value on to the stack */ @@ -1540,6 +1557,23 @@ Value--; State->Flags.Af = ((Value & 0x0F) == 0x0F); } + else if (ModRegRm.Register == 2) + { + /* Push the current value of IP */ + if (!Soft386StackPush(State, State->InstPtr.LowWord)) + { + /* Exception occurred */ + return FALSE; + } + + /* Set the IP to the address */ + State->InstPtr.LowWord = Value; + } + else if (ModRegRm.Register == 4) + { + /* Set the IP to the address */ + State->InstPtr.LowWord = Value; + } else if (ModRegRm.Register == 6) { /* Push the value on to the stack */ @@ -1561,7 +1595,9 @@ } } - if ((ModRegRm.Register > 1) && (ModRegRm.Register != 6)) + if ((ModRegRm.Register == 3) + || (ModRegRm.Register == 5) + || (ModRegRm.Register == 7)) { UNIMPLEMENTED; return FALSE; // NOT IMPLEMENTED
11 years, 2 months
1
0
0
0
[aandrejevic] 60685: [SOFT386] Start implementing call gate support. Implement the direct far call opcode (0x9A).
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed Oct 16 00:41:24 2013 New Revision: 60685 URL:
http://svn.reactos.org/svn/reactos?rev=60685&view=rev
Log: [SOFT386] Start implementing call gate support. Implement the direct far call opcode (0x9A). Modified: branches/ntvdm/include/reactos/libs/soft386/soft386.h branches/ntvdm/lib/soft386/common.inl branches/ntvdm/lib/soft386/opcodes.c Modified: branches/ntvdm/include/reactos/libs/soft386/soft386.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/include/reactos/libs/soft…
============================================================================== --- branches/ntvdm/include/reactos/libs/soft386/soft386.h [iso-8859-1] (original) +++ branches/ntvdm/include/reactos/libs/soft386/soft386.h [iso-8859-1] Wed Oct 16 00:41:24 2013 @@ -227,6 +227,19 @@ ULONG Granularity : 1; ULONG BaseHigh : 8; } SOFT386_GDT_ENTRY, *PSOFT386_GDT_ENTRY; + +typedef struct +{ + ULONG Offset : 16; + ULONG Selector : 16; + ULONG ParamCount : 5; + ULONG Reserved : 3; + ULONG Type : 4; + ULONG SystemType : 1; + ULONG Dpl : 2; + ULONG Present : 1; + ULONG OffsetHigh : 16; +} SOFT386_CALL_GATE, *PSOFT386_CALL_GATE; typedef struct { Modified: branches/ntvdm/lib/soft386/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.inl?re…
============================================================================== --- branches/ntvdm/lib/soft386/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/common.inl [iso-8859-1] Wed Oct 16 00:41:24 2013 @@ -202,11 +202,19 @@ sizeof(GdtEntry)); } - /* Check if we are loading SS */ if (Segment == SOFT386_REG_SS) { + /* Loading the stack segment */ + if (GET_SEGMENT_INDEX(Selector) == 0) { + Soft386Exception(State, SOFT386_EXCEPTION_GP); + return FALSE; + } + + if (!GdtEntry.SystemType) + { + /* This is a special descriptor */ Soft386Exception(State, SOFT386_EXCEPTION_GP); return FALSE; } @@ -230,8 +238,22 @@ return FALSE; } } + else if (Segment == SOFT386_REG_CS) + { + /* Loading the code segment */ + // TODO: NOT IMPLEMENTED + } else { + /* Loading a data segment */ + + if (!GdtEntry.SystemType) + { + /* This is a special descriptor */ + Soft386Exception(State, SOFT386_EXCEPTION_GP); + return FALSE; + } + if ((GET_SEGMENT_RPL(Selector) > GdtEntry.Dpl) && (Soft386GetCurrentPrivLevel(State) > GdtEntry.Dpl)) { Modified: branches/ntvdm/lib/soft386/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Wed Oct 16 00:41:24 2013 @@ -4612,10 +4612,77 @@ SOFT386_OPCODE_HANDLER(Soft386OpcodeCallAbs) { - // TODO: NOT IMPLEMENTED - UNIMPLEMENTED; - - return FALSE; + USHORT Segment = 0; + ULONG Offset = 0; + BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size; + + /* Make sure this is the right instruction */ + ASSERT(Opcode == 0x9A); + + if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE) + { + /* The OPSIZE prefix toggles the size */ + Size = !Size; + } + + if (State->PrefixFlags & SOFT386_PREFIX_LOCK) + { + /* Invalid prefix */ + Soft386Exception(State, SOFT386_EXCEPTION_UD); + return FALSE; + } + + /* Fetch the offset */ + if (Size) + { + if (!Soft386FetchDword(State, &Offset)) + { + /* Exception occurred */ + return FALSE; + } + } + else + { + if (!Soft386FetchWord(State, (PUSHORT)&Offset)) + { + /* Exception occurred */ + return FALSE; + } + } + + /* Fetch the segment */ + if (!Soft386FetchWord(State, &Segment)) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current code segment selector */ + if (!Soft386StackPush(State, State->SegmentRegs[SOFT386_REG_CS].Selector)) + { + /* Exception occurred */ + return FALSE; + } + + /* Push the current value of the instruction pointer */ + if (!Soft386StackPush(State, State->InstPtr.Long)) + { + /* Exception occurred */ + return FALSE; + } + + /* Load the new CS */ + if (!Soft386LoadSegment(State, SOFT386_REG_CS, Segment)) + { + /* Exception occurred */ + return FALSE; + } + + /* Load new (E)IP */ + if (Size) State->InstPtr.Long = Offset; + else State->InstPtr.LowWord = LOWORD(Offset); + + return TRUE; } SOFT386_OPCODE_HANDLER(Soft386OpcodeWait)
11 years, 2 months
1
0
0
0
[jimtabor] 60684: - Properly remove window properties when destroying the window.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Oct 16 00:11:23 2013 New Revision: 60684 URL:
http://svn.reactos.org/svn/reactos?rev=60684&view=rev
Log: - Properly remove window properties when destroying the window. Modified: trunk/reactos/win32ss/user/ntuser/prop.c trunk/reactos/win32ss/user/ntuser/prop.h trunk/reactos/win32ss/user/ntuser/window.c Modified: trunk/reactos/win32ss/user/ntuser/prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/prop.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/prop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/prop.c [iso-8859-1] Wed Oct 16 00:11:23 2013 @@ -16,12 +16,12 @@ { PLIST_ENTRY ListEntry; PPROPERTY Property; + int i; ListEntry = Window->PropListHead.Flink; - while (ListEntry != &Window->PropListHead) + for (i = 0; i < Window->PropListItems; i++ ) { Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry); - if (!Property) break; if (Property->Atom == Atom) { return(Property); @@ -77,6 +77,25 @@ Prop->Data = Data; return TRUE; +} + +VOID FASTCALL +IntRemoveWindowProp(PWND Window) +{ + PLIST_ENTRY ListEntry; + PPROPERTY Property; + int i, Count = Window->PropListItems; + + ListEntry = Window->PropListHead.Flink; + for (i = 0; i < Count; i++ ) + { + Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry); + ListEntry = ListEntry->Flink; + RemoveEntryList(&Property->PropListEntry); + UserHeapFree(Property); + Window->PropListItems--; + } + return; } /* FUNCTIONS *****************************************************************/ Modified: trunk/reactos/win32ss/user/ntuser/prop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/prop.h…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/prop.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/prop.h [iso-8859-1] Wed Oct 16 00:11:23 2013 @@ -4,3 +4,4 @@ BOOL FASTCALL IntRemoveProp(PWND,ATOM); BOOL FASTCALL IntSetProp(PWND, ATOM, HANDLE); HANDLE FASTCALL UserGetProp(PWND, ATOM); +VOID FASTCALL IntRemoveWindowProp(PWND Window); Modified: trunk/reactos/win32ss/user/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Wed Oct 16 00:11:23 2013 @@ -426,8 +426,6 @@ PWND Child; PMENU_OBJECT Menu; BOOLEAN BelongsToThreadData; - PLIST_ENTRY ListEntry; - PPROPERTY Property; ASSERT(Window); @@ -556,12 +554,11 @@ IntUnlinkWindow(Window); - ListEntry = Window->PropListHead.Flink; - while (ListEntry != &Window->PropListHead) - { - Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry); - ListEntry = ListEntry->Flink; - IntRemoveProp(Window, Property->Atom); + if (Window->PropListItems) + { + IntRemoveWindowProp(Window); + TRACE("Window->PropListItems %d\n",Window->PropListItems); + ASSERT(Window->PropListItems==0); } UserReferenceObject(Window);
11 years, 2 months
1
0
0
0
[jimtabor] 60683: [Win32ss] - Prevent a potential kernel exception.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Oct 15 22:16:31 2013 New Revision: 60683 URL:
http://svn.reactos.org/svn/reactos?rev=60683&view=rev
Log: [Win32ss] - Prevent a potential kernel exception. Modified: trunk/reactos/win32ss/user/ntuser/prop.c Modified: trunk/reactos/win32ss/user/ntuser/prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/prop.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/prop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/prop.c [iso-8859-1] Tue Oct 15 22:16:31 2013 @@ -21,6 +21,7 @@ while (ListEntry != &Window->PropListHead) { Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry); + if (!Property) break; if (Property->Atom == Atom) { return(Property);
11 years, 2 months
1
0
0
0
[jimtabor] 60682: [Win32ss] - Prevent a potential kernel exception.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Oct 15 22:14:48 2013 New Revision: 60682 URL:
http://svn.reactos.org/svn/reactos?rev=60682&view=rev
Log: [Win32ss] - Prevent a potential kernel exception. Modified: trunk/reactos/win32ss/user/user32/windows/prop.c Modified: trunk/reactos/win32ss/user/user32/windows/prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/prop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/prop.c [iso-8859-1] Tue Oct 15 22:14:48 2013 @@ -53,6 +53,7 @@ for (i = 0; i < pWnd->PropListItems; i++ ) { Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry); + if (!Property) break; if (Property->Atom == Atom) { return(Property);
11 years, 2 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
33
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
Results per page:
10
25
50
100
200