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
December 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
17 participants
387 discussions
Start a n
N
ew thread
[dquintana] 65542: [RSHELL] * Fix gcc build.
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Dec 1 16:41:58 2014 New Revision: 65542 URL:
http://svn.reactos.org/svn/reactos?rev=65542&view=rev
Log: [RSHELL] * Fix gcc build. Modified: trunk/reactos/base/shell/rshell/CStartMenu.cpp trunk/reactos/include/reactos/undocshell.h Modified: trunk/reactos/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CStartMe…
============================================================================== --- trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Mon Dec 1 16:41:58 2014 @@ -415,59 +415,6 @@ return GetMergedFolder(CSIDL_PROGRAMS, CSIDL_COMMON_PROGRAMS, ppsfStartMenu); } -static void DumpIdList(LPCITEMIDLIST pcidl) -{ - DbgPrint("Begin IDList Dump\n"); - - for (; pcidl != NULL; pcidl = ILGetNext(pcidl)) - { - int i; - int cb = pcidl->mkid.cb; - BYTE * sh = (BYTE*) &(pcidl->mkid); - if (cb == 0) // ITEMIDLISTs are terminatedwith a null SHITEMID. - break; - DbgPrint("Begin SHITEMID (cb=%d)\n", cb); - if ((cb & 3) != 0) - DbgPrint(" - WARNING: cb is not a multiple of 4\n"); - for (i = 0; (i + 4) <= cb; i += 4) - { - DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n", - i, - sh[i + 0], - sh[i + 1], - sh[i + 2], - sh[i + 3]); - } - if (i < cb) - { - cb -= i; - if (cb == 3) - { - DbgPrint(" - abID[%08x]: %02x %02x %02x --\n", - i, - sh[i + 0], - sh[i + 1], - sh[i + 2]); - } - else if (cb == 2) - { - DbgPrint(" - abID[%08x]: %02x %02x -- --\n", - i, - sh[i + 0], - sh[i + 1]); - } - else if (cb == 1) - { - DbgPrint(" - abID[%08x]: %02x -- -- --\n", - i, - sh[i + 0]); - } - } - DbgPrint("End SHITEMID\n"); - } - DbgPrint("End IDList Dump.\n"); -} - extern "C" HRESULT WINAPI CStartMenu_Constructor(REFIID riid, void **ppv) Modified: trunk/reactos/include/reactos/undocshell.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/undocshell…
============================================================================== --- trunk/reactos/include/reactos/undocshell.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/undocshell.h [iso-8859-1] Mon Dec 1 16:41:58 2014 @@ -608,6 +608,61 @@ { char padding[128]; DbgDumpMenuInternal(hmenu, padding, 0); +} + + +static inline +void DumpIdList(LPCITEMIDLIST pcidl) +{ + DbgPrint("Begin IDList Dump\n"); + + for (; pcidl != NULL; pcidl = ILGetNext(pcidl)) + { + int i; + int cb = pcidl->mkid.cb; + BYTE * sh = (BYTE*) &(pcidl->mkid); + if (cb == 0) // ITEMIDLISTs are terminatedwith a null SHITEMID. + break; + DbgPrint("Begin SHITEMID (cb=%d)\n", cb); + if ((cb & 3) != 0) + DbgPrint(" - WARNING: cb is not a multiple of 4\n"); + for (i = 0; (i + 4) <= cb; i += 4) + { + DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n", + i, + sh[i + 0], + sh[i + 1], + sh[i + 2], + sh[i + 3]); + } + if (i < cb) + { + cb -= i; + if (cb == 3) + { + DbgPrint(" - abID[%08x]: %02x %02x %02x --\n", + i, + sh[i + 0], + sh[i + 1], + sh[i + 2]); + } + else if (cb == 2) + { + DbgPrint(" - abID[%08x]: %02x %02x -- --\n", + i, + sh[i + 0], + sh[i + 1]); + } + else if (cb == 1) + { + DbgPrint(" - abID[%08x]: %02x -- -- --\n", + i, + sh[i + 0]); + } + } + DbgPrint("End SHITEMID\n"); + } + DbgPrint("End IDList Dump.\n"); }
10 years
1
0
0
0
[dquintana] 65541: [RSHELL] * The windows menu classes hide the items when the callback returns S_OK, and show them on S_FALSE. Fix our implementation to match. * The windows CMergedFolder uses its...
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Dec 1 16:32:58 2014 New Revision: 65541 URL:
http://svn.reactos.org/svn/reactos?rev=65541&view=rev
Log: [RSHELL] * The windows menu classes hide the items when the callback returns S_OK, and show them on S_FALSE. Fix our implementation to match. * The windows CMergedFolder uses its own internal SHITEMID structure, so using filesystem paths directly won't work for hiding the Programs folder. * Also, because of the above, it's best to create the Programs menu object separately. Modified: trunk/reactos/base/shell/rshell/CMenuToolbars.cpp trunk/reactos/base/shell/rshell/CStartMenu.cpp trunk/reactos/base/shell/rshell/precomp.h trunk/reactos/dll/win32/browseui/internettoolbar.cpp Modified: trunk/reactos/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMenuToo…
============================================================================== --- trunk/reactos/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Mon Dec 1 16:32:58 2014 @@ -1289,7 +1289,7 @@ INT index = 0; INT indexOpen = 0; - if (m_menuBand->_CallCBWithItemPidl(item, 0x10000000, 0, 0) == S_OK) + if (m_menuBand->_CallCBWithItemPidl(item, 0x10000000, 0, 0) == S_FALSE) { STRRET sr = { STRRET_CSTR, { 0 } }; Modified: trunk/reactos/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CStartMe…
============================================================================== --- trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Mon Dec 1 16:32:58 2014 @@ -24,7 +24,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(CStartMenu); // TODO: declare these GUIDs and interfaces in the right place (whatever that may be) -IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; +IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; IID IID_IAugmentedShellFolder2 = { 0x8DB3B3F4, 0x6CFE, 0x11D1, { 0x8A, 0xE9, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0 } }; IID IID_IAugmentedShellFolder3 = { 0x4F755EA8, 0x247D, 0x479B, { 0x91, 0x81, 0x22, 0x7D, 0x09, 0xC2, 0xE0, 0x01 } }; CLSID CLSID_MergedFolder = { 0x26FDC864, 0xBE88, 0x46E7, { 0x92, 0x35, 0x03, 0x2D, 0x8E, 0xA5, 0x16, 0x2E } }; @@ -74,7 +74,7 @@ CComPtr<IDeskBar> m_pDeskBar; CComPtr<ITrayPriv> m_pTrayPriv; CComPtr<IShellFolder> m_psfPrograms; - + LPITEMIDLIST m_pidlPrograms; HRESULT OnInitMenu() @@ -163,9 +163,9 @@ #if USE_SYSTEM_MENUBAND hr = CoCreateInstance(CLSID_MenuBand, - NULL, - CLSCTX_INPROC_SERVER, - IID_PPV_ARG(IShellMenu, &pShellMenu)); + NULL, + CLSCTX_INPROC_SERVER, + IID_PPV_ARG(IShellMenu, &pShellMenu)); #else hr = CMenuBand_Constructor(IID_PPV_ARG(IShellMenu, &pShellMenu)); #endif @@ -303,8 +303,8 @@ break; case 0x10000000: // _FilterPIDL from CMenuSFToolbar if (psmd->psf->CompareIDs(0, psmd->pidlItem, m_pidlPrograms) == 0) - return S_FALSE; - return S_OK; + return S_OK; + return S_FALSE; } return S_FALSE; @@ -327,7 +327,7 @@ return hr; } -static HRESULT GetStartMenuFolder(IShellFolder ** ppsfStartMenu) +static HRESULT GetMergedFolder(int folder1, int folder2, IShellFolder ** ppsfStartMenu) { HRESULT hr; LPITEMIDLIST pidlUserStartMenu; @@ -338,12 +338,12 @@ *ppsfStartMenu = NULL; - hr = SHGetSpecialFolderLocation(NULL, CSIDL_STARTMENU, &pidlUserStartMenu); + hr = SHGetSpecialFolderLocation(NULL, folder1, &pidlUserStartMenu); if (FAILED(hr)) { WARN("Failed to get the USER start menu folder. Trying to run with just the COMMON one.\n"); - hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_STARTMENU, &pidlCommonStartMenu); + hr = SHGetSpecialFolderLocation(NULL, folder2, &pidlCommonStartMenu); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -352,9 +352,12 @@ ILFree(pidlCommonStartMenu); return hr; } - - hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_STARTMENU, &pidlCommonStartMenu); - if (FAILED_UNEXPECTEDLY(hr)) +#if MERGE_FOLDERS + hr = SHGetSpecialFolderLocation(NULL, folder2, &pidlCommonStartMenu); + if (FAILED_UNEXPECTEDLY(hr)) +#else + else +#endif { WARN("Failed to get the COMMON start menu folder. Will use only the USER contents.\n"); hr = BindToDesktop(pidlUserStartMenu, ppsfStartMenu); @@ -400,6 +403,69 @@ ILFree(pidlUserStartMenu); return hr; +} + +static HRESULT GetStartMenuFolder(IShellFolder ** ppsfStartMenu) +{ + return GetMergedFolder(CSIDL_STARTMENU, CSIDL_COMMON_STARTMENU, ppsfStartMenu); +} + +static HRESULT GetProgramsFolder(IShellFolder ** ppsfStartMenu) +{ + return GetMergedFolder(CSIDL_PROGRAMS, CSIDL_COMMON_PROGRAMS, ppsfStartMenu); +} + +static void DumpIdList(LPCITEMIDLIST pcidl) +{ + DbgPrint("Begin IDList Dump\n"); + + for (; pcidl != NULL; pcidl = ILGetNext(pcidl)) + { + int i; + int cb = pcidl->mkid.cb; + BYTE * sh = (BYTE*) &(pcidl->mkid); + if (cb == 0) // ITEMIDLISTs are terminatedwith a null SHITEMID. + break; + DbgPrint("Begin SHITEMID (cb=%d)\n", cb); + if ((cb & 3) != 0) + DbgPrint(" - WARNING: cb is not a multiple of 4\n"); + for (i = 0; (i + 4) <= cb; i += 4) + { + DbgPrint(" - abID[%08x]: %02x %02x %02x %02x\n", + i, + sh[i + 0], + sh[i + 1], + sh[i + 2], + sh[i + 3]); + } + if (i < cb) + { + cb -= i; + if (cb == 3) + { + DbgPrint(" - abID[%08x]: %02x %02x %02x --\n", + i, + sh[i + 0], + sh[i + 1], + sh[i + 2]); + } + else if (cb == 2) + { + DbgPrint(" - abID[%08x]: %02x %02x -- --\n", + i, + sh[i + 0], + sh[i + 1]); + } + else if (cb == 1) + { + DbgPrint(" - abID[%08x]: %02x -- -- --\n", + i, + sh[i + 0]); + } + } + DbgPrint("End SHITEMID\n"); + } + DbgPrint("End IDList Dump.\n"); } extern "C" @@ -460,24 +526,44 @@ pShellMenu->Initialize(pCallback, (UINT) -1, 0, SMINIT_TOPLEVEL | SMINIT_VERTICAL); if (FAILED_UNEXPECTEDLY(hr)) return hr; - + hr = GetStartMenuFolder(&psf); if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidlProgramsAbsolute); - if (FAILED(hr)) - { - WARN("USER Programs folder not found."); - hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_PROGRAMS, &pidlProgramsAbsolute); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - } - - pidlPrograms = ILClone(ILFindLastID(pidlProgramsAbsolute)); - ILFree(pidlProgramsAbsolute); - - hr = psf->BindToObject(pidlPrograms, NULL, IID_PPV_ARG(IShellFolder, &psfPrograms)); + { + hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidlProgramsAbsolute); + if (FAILED(hr)) + { + WARN("USER Programs folder not found."); + hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_PROGRAMS, &pidlProgramsAbsolute); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + } + + LPCITEMIDLIST pcidlPrograms; + CComPtr<IShellFolder> psfParent; + STRRET str; + TCHAR szDisplayName[MAX_PATH]; + + hr = SHBindToParent(pidlProgramsAbsolute, IID_PPV_ARG(IShellFolder, &psfParent), &pcidlPrograms); + if (FAILED(hr)) + return hr; + + hr = psfParent->GetDisplayNameOf(pcidlPrograms, SHGDN_NORMAL, &str); + if (FAILED(hr)) + return hr; + + StrRetToBuf(&str, pcidlPrograms, szDisplayName, _countof(szDisplayName)); + ILFree((LPITEMIDLIST)pcidlPrograms); + ILFree(pidlProgramsAbsolute); + + hr = psf->ParseDisplayName(NULL, NULL, szDisplayName, NULL, &pidlPrograms, NULL); + if (FAILED(hr)) + return hr; + } + + hr = GetProgramsFolder(&psfPrograms); if (FAILED_UNEXPECTEDLY(hr)) return hr; Modified: trunk/reactos/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/precomp.…
============================================================================== --- trunk/reactos/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/precomp.h [iso-8859-1] Mon Dec 1 16:32:58 2014 @@ -17,14 +17,10 @@ #pragma warning(disable:4512) // assignment operator could not be gernerated #endif -#define USE_SYSTEM_MENUDESKBAR 0 -#define USE_SYSTEM_MENUSITE 0 -#define USE_SYSTEM_MENUBAND 0 - -#define WRAP_MENUDESKBAR 0 -#define WRAP_MENUSITE 0 -#define WRAP_MENUBAND 0 -#define WRAP_TRAYPRIV 0 +#define USE_SYSTEM_MENUDESKBAR 1 +#define USE_SYSTEM_MENUSITE 1 +#define USE_SYSTEM_MENUBAND 1 +#define USE_SYSTEM_MERGED_FOLDERS 0 #define MERGE_FOLDERS 1 Modified: trunk/reactos/dll/win32/browseui/internettoolbar.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/interne…
============================================================================== --- trunk/reactos/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Mon Dec 1 16:32:58 2014 @@ -688,7 +688,7 @@ case 49: break; case 0x10000000: - return S_OK; + break; } return S_FALSE; }
10 years
1
0
0
0
[jimtabor] 65540: [Win32k] - Use thread state for GetMessageExtraInfo.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Dec 1 14:47:05 2014 New Revision: 65540 URL:
http://svn.reactos.org/svn/reactos?rev=65540&view=rev
Log: [Win32k] - Use thread state for GetMessageExtraInfo. Modified: trunk/reactos/win32ss/include/ntuser.h trunk/reactos/win32ss/user/ntuser/misc.c trunk/reactos/win32ss/user/ntuser/simplecall.c trunk/reactos/win32ss/user/user32/include/ntwrapper.h Modified: trunk/reactos/win32ss/include/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
============================================================================== --- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Mon Dec 1 14:47:05 2014 @@ -2296,7 +2296,8 @@ THREADSTATE_GETINPUTSTATE, THREADSTATE_UPTIMELASTREAD, THREADSTATE_FOREGROUNDTHREAD, - THREADSTATE_GETCURSOR + THREADSTATE_GETCURSOR, + THREADSTATE_GETMESSAGEEXTRAINFO }; DWORD_PTR @@ -3375,7 +3376,6 @@ */ #define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001 -#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005 #define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e Modified: trunk/reactos/win32ss/user/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/misc.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] Mon Dec 1 14:47:05 2014 @@ -271,6 +271,9 @@ ret = (DWORD_PTR) (GetW32ThreadInfo()->MessageQueue->CursorObject ? UserHMGetHandle(GetW32ThreadInfo()->MessageQueue->CursorObject) : 0); break; + case THREADSTATE_GETMESSAGEEXTRAINFO: + ret = (DWORD_PTR)MsqGetMessageExtraInfo(); + break; } TRACE("Leave NtUserGetThreadState, ret=%lu\n", ret); Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Mon Dec 1 14:47:05 2014 @@ -85,10 +85,6 @@ case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP: Result = (DWORD_PTR)IntUninitMessagePumpHook(); - break; - - case NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO: - Result = (DWORD_PTR)MsqGetMessageExtraInfo(); break; case NOPARAM_ROUTINE_MSQCLEARWAKEMASK: Modified: trunk/reactos/win32ss/user/user32/include/ntwrapper.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
============================================================================== --- trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/include/ntwrapper.h [iso-8859-1] Mon Dec 1 14:47:05 2014 @@ -788,7 +788,7 @@ EXTINLINE LPARAM NtUserxGetMessageExtraInfo(VOID) { - return (LPARAM)NtUserCallNoParam(NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO); + return (LPARAM)NtUserGetThreadState(THREADSTATE_GETMESSAGEEXTRAINFO); } EXTINLINE BOOL NtUserxSwitchCaretShowing(THRDCARETINFO* CaretInfo)
10 years
1
0
0
0
[gadamopoulos] 65539: Try to fix Build
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Dec 1 09:42:29 2014 New Revision: 65539 URL:
http://svn.reactos.org/svn/reactos?rev=65539&view=rev
Log: Try to fix Build Modified: trunk/reactos/win32ss/user/ntuser/guicheck.h Modified: trunk/reactos/win32ss/user/ntuser/guicheck.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/guiche…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] Mon Dec 1 09:42:29 2014 @@ -1,7 +1,7 @@ #pragma once BOOL FASTCALL co_IntGraphicsCheck(BOOL Create); -VOID FASTCALL co_IntUserManualGuiCheck(LONG Check); +VOID FASTCALL co_IntUserManualGuiCheck(BOOL Create); BOOL FASTCALL IntCreatePrimarySurface(VOID); VOID FASTCALL IntDestroyPrimarySurface(VOID);
10 years
1
0
0
0
[gadamopoulos] 65538: [WINSRV] * Stop using ONEPARAM_ROUTINE_CSRSS_GUICHECK [WIN32K] * Move the manual gui check for console windows entirely in win32k * This shouldn't cause any regressions to the...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Dec 1 09:38:04 2014 New Revision: 65538 URL:
http://svn.reactos.org/svn/reactos?rev=65538&view=rev
Log: [WINSRV] * Stop using ONEPARAM_ROUTINE_CSRSS_GUICHECK [WIN32K] * Move the manual gui check for console windows entirely in win32k * This shouldn't cause any regressions to the ancient gui-on-demand feature Modified: trunk/reactos/win32ss/gdi/ntgdi/misc.h trunk/reactos/win32ss/include/ntuser.h trunk/reactos/win32ss/user/ntuser/guicheck.c trunk/reactos/win32ss/user/ntuser/guicheck.h trunk/reactos/win32ss/user/ntuser/simplecall.c trunk/reactos/win32ss/user/ntuser/window.c trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c trunk/reactos/win32ss/user/winsrv/usersrv/init.c Modified: trunk/reactos/win32ss/gdi/ntgdi/misc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/misc.h?r…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/misc.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/misc.h [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -24,7 +24,6 @@ extern SHORT gusLanguageID; SHORT FASTCALL UserGetLanguageID(VOID); -VOID FASTCALL IntUserManualGuiCheck(LONG Check); PVOID APIENTRY HackSecureVirtualMemory(IN PVOID,IN SIZE_T,IN ULONG,OUT PVOID *); VOID APIENTRY HackUnsecureVirtualMemory(IN PVOID); Modified: trunk/reactos/win32ss/include/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
============================================================================== --- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -3376,7 +3376,6 @@ #define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001 #define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005 -#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008 #define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008 #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e Modified: trunk/reactos/win32ss/user/ntuser/guicheck.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/guiche…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/guicheck.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/guicheck.c [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -74,28 +74,18 @@ VOID FASTCALL -IntUserManualGuiCheck(LONG Check) +co_IntUserManualGuiCheck(BOOL Create) { - PPROCESSINFO W32Data; + PPROCESSINFO W32Data = (PPROCESSINFO)PsGetCurrentProcessWin32Process(); + W32Data->W32PF_flags |= W32PF_MANUALGUICHECK; - W32Data = PsGetCurrentProcessWin32Process(); - if (0 == Check) + if (Create) { - W32Data->W32PF_flags |= W32PF_MANUALGUICHECK; - } - else if (0 < Check) - { - if (! (W32Data->W32PF_flags & W32PF_CREATEDWINORDC)) - { - co_AddGuiApp(W32Data); - } + co_AddGuiApp(W32Data); } else { - if (W32Data->W32PF_flags & W32PF_CREATEDWINORDC) - { - RemoveGuiApp(W32Data); - } + RemoveGuiApp(W32Data); } } Modified: trunk/reactos/win32ss/user/ntuser/guicheck.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/guiche…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -1,6 +1,7 @@ #pragma once BOOL FASTCALL co_IntGraphicsCheck(BOOL Create); +VOID FASTCALL co_IntUserManualGuiCheck(LONG Check); BOOL FASTCALL IntCreatePrimarySurface(VOID); VOID FASTCALL IntDestroyPrimarySurface(VOID); Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -291,10 +291,6 @@ case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS: /* FIXME: Should use UserEnterShared */ RETURN(UserEnumClipboardFormats(Param)); - - case ONEPARAM_ROUTINE_CSRSS_GUICHECK: - IntUserManualGuiCheck(Param); - RETURN(TRUE); case ONEPARAM_ROUTINE_GETCURSORPOS: { 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] Mon Dec 1 09:38:04 2014 @@ -618,6 +618,12 @@ UserDeleteObject(Window->head.h, TYPE_WINDOW); IntDestroyScrollBars(Window); + + if (Window->pcls->atomClassName == gaGuiConsoleWndClass) + { + /* Count only console windows manually */ + co_IntUserManualGuiCheck(FALSE); + } /* dereference the class */ IntDereferenceClass(Window->pcls, @@ -2313,6 +2319,12 @@ } } + if (Class->atomClassName == gaGuiConsoleWndClass) + { + /* Count only console windows manually */ + co_IntUserManualGuiCheck(TRUE); + } + TRACE("co_UserCreateWindowEx(): Created window %p\n", hWnd); ret = Window; Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -27,11 +27,6 @@ #define PM_DESTROY_CONSOLE (WM_APP + 2) -/* Not defined in any header file */ -extern VOID NTAPI PrivateCsrssManualGuiCheck(LONG Check); -// See winsrv/usersrv/init.c line 234 - - /* GLOBALS ********************************************************************/ typedef struct _GUI_INIT_INFO @@ -169,8 +164,6 @@ RECT rcWnd; DPRINT("PM_CREATE_CONSOLE -- creating window\n"); - - PrivateCsrssManualGuiCheck(-1); // co_AddGuiApp NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, GUI_CONWND_CLASS, @@ -187,7 +180,6 @@ if (NewWindow == NULL) { DPRINT1("Failed to create a new console window\n"); - PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp continue; } @@ -260,7 +252,6 @@ if (GuiData->hWindow == NULL) continue; DestroyWindow(GuiData->hWindow); - PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp NtSetEvent(GuiData->hGuiTermEvent, NULL); Modified: trunk/reactos/win32ss/user/winsrv/usersrv/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] Mon Dec 1 09:38:04 2014 @@ -90,14 +90,6 @@ return TRUE; } -// From win32ss/user/win32csr/dllmain.c -VOID -WINAPI -PrivateCsrssManualGuiCheck(LONG Check) -{ - NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK); -} - ULONG NTAPI CreateSystemThreads(PVOID pParam) @@ -152,7 +144,6 @@ /* Initialize the video */ NtUserInitialize(0, NULL, NULL); - PrivateCsrssManualGuiCheck(0); /* Setup the DLL Object */ LoadedServerDll->ApiBase = USERSRV_FIRST_API_NUMBER;
10 years
1
0
0
0
[dquintana] 65537: [RSHELL] * Partially rewrite CMergedFolder to fix the invalid assumption that the results of enumerating a folder are ordered. Fixes the folder merging on certain languages not w...
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Dec 1 04:23:44 2014 New Revision: 65537 URL:
http://svn.reactos.org/svn/reactos?rev=65537&view=rev
Log: [RSHELL] * Partially rewrite CMergedFolder to fix the invalid assumption that the results of enumerating a folder are ordered. Fixes the folder merging on certain languages not working as expected, and also some other weaknesses of the previous implementation. CORE-8835 #resolve #comment Should be fixed in r65537. Thanks for reporting. Modified: trunk/reactos/base/shell/rshell/CMergedFolder.cpp trunk/reactos/base/shell/rshell/CMergedFolder.h trunk/reactos/base/shell/rshell/CStartMenu.cpp Modified: trunk/reactos/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMergedF…
============================================================================== --- trunk/reactos/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Mon Dec 1 04:23:44 2014 @@ -30,6 +30,8 @@ BOOL shared; IShellFolder * parent; LPITEMIDLIST pidl; + LPITEMIDLIST pidl2; + LPCWSTR parseName; }; class CEnumMergedFolder : @@ -66,6 +68,7 @@ HRESULT SetSources(IShellFolder * userLocal, IShellFolder * allUSers); HRESULT Begin(HWND hwndOwner, SHCONTF flags); HRESULT FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo); + HRESULT FindByName(HWND hwndOwner, LPCWSTR strParsingName, LocalPidlInfo * pinfo); virtual HRESULT STDMETHODCALLTYPE Next( ULONG celt, @@ -96,6 +99,9 @@ int CEnumMergedFolder::DsaDeleteCallback(LocalPidlInfo * info) { ILFree(info->pidl); + if (info->pidl2) + ILFree(info->pidl2); + CoTaskMemFree((LPVOID)info->parseName); return 0; } @@ -118,7 +124,8 @@ HRESULT CEnumMergedFolder::Begin(HWND hwndOwner, SHCONTF flags) { HRESULT hr; - + LPITEMIDLIST pidl = NULL; + if (m_hDsa && m_HwndOwner == hwndOwner && m_Flags == flags) { return Reset(); @@ -127,16 +134,14 @@ TRACE("Search conditions changed, recreating list...\n"); CComPtr<IEnumIDList> userLocal; - CComPtr<IEnumIDList> allUSers; + CComPtr<IEnumIDList> allUsers; + hr = m_UserLocalFolder->EnumObjects(hwndOwner, flags, &userLocal); if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = m_AllUSersFolder->EnumObjects(hwndOwner, flags, &allUSers); - if (FAILED_UNEXPECTEDLY(hr)) - { - userLocal = NULL; - return hr; - } + hr = m_AllUSersFolder->EnumObjects(hwndOwner, flags, &allUsers); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; if (!m_hDsa) { @@ -147,143 +152,131 @@ DSA_DeleteAllItems(m_hDsa); m_hDsaCount = 0; - HRESULT hr1 = S_OK; - HRESULT hr2 = S_OK; - LPITEMIDLIST pidl1 = NULL; - LPITEMIDLIST pidl2 = NULL; - int order = 0; - do - { - if (order <= 0) + TRACE("Loading Local entries...\n"); + for (;;) + { + hr = userLocal->Next(1, &pidl, NULL); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + if (hr == S_FALSE) + break; + + LPWSTR name; + STRRET str = { STRRET_WSTR }; + hr = m_UserLocalFolder->GetDisplayNameOf(pidl, SHGDN_FORPARSING | SHGDN_INFOLDER, &str); + if (FAILED(hr)) + return hr; + StrRetToStrW(&str, pidl, &name); + + LocalPidlInfo info = { + FALSE, + m_UserLocalFolder, + ILClone(pidl), + NULL, + name + }; + + ILFree(pidl); + + TRACE("Inserting item %d with name %S\n", m_hDsaCount, name); + int idx = DSA_InsertItem(m_hDsa, DSA_APPEND, &info); + TRACE("New index: %d\n", idx); + + m_hDsaCount++; + } + + TRACE("Loading Common entries...\n"); + for (;;) + { + hr = allUsers->Next(1, &pidl, NULL); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + if (hr == S_FALSE) + break; + + LPWSTR name; + STRRET str = { STRRET_WSTR }; + hr = m_AllUSersFolder->GetDisplayNameOf(pidl, SHGDN_FORPARSING | SHGDN_INFOLDER, &str); + if (FAILED(hr)) + return hr; + StrRetToStrW(&str, pidl, &name); + + LocalPidlInfo info = { + FALSE, + m_AllUSersFolder, + ILClone(pidl), + NULL, + name + }; + + ILFree(pidl); + + BOOL bShared = FALSE; + for (int i = 0; i < (int)m_hDsaCount; i++) { - if (hr1 == S_OK) + LocalPidlInfo *pInfo = (LocalPidlInfo *) DSA_GetItemPtr(m_hDsa, i); + + int order = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, + pInfo->parseName, lstrlenW(pInfo->parseName), + info.parseName, lstrlenW(info.parseName)); + switch (order) { - hr1 = userLocal->Next(1, &pidl1, NULL); - if (FAILED_UNEXPECTEDLY(hr1)) - return hr1; - } - else - { - pidl1 = NULL; + case CSTR_EQUAL: + TRACE("Item name already exists! Marking '%S' as shared ...\n", name); + bShared = TRUE; + pInfo->shared = TRUE; + pInfo->pidl2 = info.pidl; + CoTaskMemFree(name); + break; + default: + continue; } } - if (order >= 0) + + if (!bShared) { - if (hr2 == S_OK) - { - hr2 = allUSers->Next(1, &pidl2, NULL); - if (FAILED_UNEXPECTEDLY(hr2)) - return hr2; - } - else - { - pidl2 = NULL; - } + TRACE("Inserting item %d with name %S\n", m_hDsaCount, name); + int idx = DSA_InsertItem(m_hDsa, DSA_APPEND, &info); + TRACE("New index: %d\n", idx); + + m_hDsaCount++; } - - if (hr1 == S_OK && hr2 == S_OK) - { - LPWSTR name1; - LPWSTR name2; - STRRET str1 = { STRRET_WSTR }; - STRRET str2 = { STRRET_WSTR }; - hr = m_UserLocalFolder->GetDisplayNameOf(pidl1, SHGDN_FORPARSING | SHGDN_INFOLDER, &str1); - if (FAILED(hr)) - return hr; - hr = m_AllUSersFolder->GetDisplayNameOf(pidl2, SHGDN_FORPARSING | SHGDN_INFOLDER, &str2); - if (FAILED(hr)) - return hr; - StrRetToStrW(&str1, pidl1, &name1); - StrRetToStrW(&str2, pidl2, &name2); - order = StrCmpW(name1, name2); - - TRACE("Both sources are S_OK, comparison between %S and %S returns %d\n", name1, name2, order); - - CoTaskMemFree(name1); - CoTaskMemFree(name2); - } - else if (hr1 == S_OK) - { - order = -1; - - TRACE("Both sources are S_OK, forcing %d\n", order); - } - else if (hr2 == S_OK) - { - order = 1; - - TRACE("Both sources are S_OK, forcing %d\n", order); - } - else - { - TRACE("None of the sources\n"); - break; - } - - LocalPidlInfo info = { FALSE }; - if (order < 0) - { - info.parent = m_UserLocalFolder; - info.pidl = ILClone(pidl1); - ILFree(pidl1); - } - else if (order > 0) - { - info.parent = m_AllUSersFolder; - info.pidl = ILClone(pidl2); - ILFree(pidl2); - } - else // if (order == 0) - { - info.shared = TRUE; - info.parent = m_UserLocalFolder; - info.pidl = ILClone(pidl1); - ILFree(pidl1); - ILFree(pidl2); - } - - TRACE("Inserting item %d with parent %p and pidl { cb=%d }\n", m_hDsaCount, info.parent, info.pidl->mkid.cb); - int idx = DSA_InsertItem(m_hDsa, DSA_APPEND, &info); - TRACE("New index: %d\n", idx); - - m_hDsaCount++; - - } while (hr1 == S_OK || hr2 == S_OK); + } m_HwndOwner = hwndOwner; m_Flags = flags; + + return Reset(); +} + +HRESULT CEnumMergedFolder::FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo) +{ + HRESULT hr; + + if (!m_hDsa) + { + Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS); + } + + TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDsaCount); + + for (int i = 0; i < (int)m_hDsaCount; i++) + { + LocalPidlInfo * pInfo = (LocalPidlInfo *) DSA_GetItemPtr(m_hDsa, i); + if (!pInfo) + return E_FAIL; - return Reset(); -} - -HRESULT CEnumMergedFolder::FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo) -{ - HRESULT hr; - - if (!m_hDsa) - { - Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS); - } - - TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDsaCount); - - for (int i = 0; i < (int)m_hDsaCount; i++) - { - LocalPidlInfo * tinfo = (LocalPidlInfo *)DSA_GetItemPtr(m_hDsa, i); - if (!tinfo) - return E_FAIL; - - LocalPidlInfo info = *tinfo; - - TRACE("Comparing with item at %d with parent %p and pidl { cb=%d }\n", i, info.parent, info.pidl->mkid.cb); - - hr = info.parent->CompareIDs(0, info.pidl, pcidl); + TRACE("Comparing with item at %d with parent %p and pidl { cb=%d }\n", i, pInfo->parent, pInfo->pidl->mkid.cb); + + hr = pInfo->parent->CompareIDs(0, pInfo->pidl, pcidl); if (FAILED_UNEXPECTEDLY(hr)) return hr; if (hr == S_OK) { - *pinfo = info; + *pinfo = *pInfo; return S_OK; } else @@ -296,12 +289,45 @@ return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); } +HRESULT CEnumMergedFolder::FindByName(HWND hwndOwner, LPCWSTR strParsingName, LocalPidlInfo * pinfo) +{ + if (!m_hDsa) + { + Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS); + } + + TRACE("Searching for '%S' in a list of %d items\n", strParsingName, m_hDsaCount); + + for (int i = 0; i < (int) m_hDsaCount; i++) + { + LocalPidlInfo * pInfo = (LocalPidlInfo *) DSA_GetItemPtr(m_hDsa, i); + if (!pInfo) + return E_FAIL; + + int order = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, + pInfo->parseName, lstrlenW(pInfo->parseName), + strParsingName, lstrlenW(strParsingName)); + switch (order) + { + case CSTR_EQUAL: + *pinfo = *pInfo; + return S_OK; + default: + continue; + } + } + + TRACE("Pidl not found\n"); + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); +} + HRESULT STDMETHODCALLTYPE CEnumMergedFolder::Next( ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) { - if (pceltFetched) *pceltFetched = 0; + if (pceltFetched) + *pceltFetched = 0; if (m_hDsaIndex == m_hDsaCount) return S_FALSE; @@ -323,7 +349,8 @@ m_hDsaIndex++; if (m_hDsaIndex == m_hDsaCount) { - if (pceltFetched) *pceltFetched = i; + if (pceltFetched) + *pceltFetched = i; return (i == (int)celt) ? S_OK : S_FALSE; } } @@ -361,7 +388,7 @@ CMergedFolder::CMergedFolder() : m_UserLocal(NULL), - m_AllUSers(NULL), + m_AllUsers(NULL), m_EnumSource(NULL), m_UserLocalPidl(NULL), m_AllUsersPidl(NULL), @@ -384,7 +411,7 @@ return E_NOTIMPL; } - TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUSers.p); + TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUsers.p); // FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...) // For now, assume only 2 will ever be used, and ignore all the other data. @@ -395,14 +422,14 @@ return S_OK; } - if (m_AllUSers) + if (m_AllUsers) return E_FAIL; - m_AllUSers = psf; + m_AllUsers = psf; m_AllUsersPidl = ILClone(pcidl); m_EnumSource = new CComObject<CEnumMergedFolder>(); - return m_EnumSource->SetSources(m_UserLocal, m_AllUSers); + return m_EnumSource->SetSources(m_UserLocal, m_AllUsers); } HRESULT STDMETHODCALLTYPE CMergedFolder::GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid) @@ -440,45 +467,33 @@ { HRESULT hr; LocalPidlInfo info; - LPITEMIDLIST pidl; - - if (!ppidl) return E_FAIL; - - if (pchEaten) *pchEaten = 0; - if (pdwAttributes) *pdwAttributes = 0; + + if (!ppidl) + return E_FAIL; + + if (pchEaten) + *pchEaten = 0; + + if (pdwAttributes) + *pdwAttributes = 0; TRACE("ParseDisplayName name=%S\n", lpszDisplayName); - hr = m_UserLocal->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, &pidl, pdwAttributes); - if (SUCCEEDED(hr)) - { - TRACE("ParseDisplayName result local\n"); - hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info); - if (SUCCEEDED(hr)) - { - ILFree(pidl); - *ppidl = ILClone(info.pidl); - return hr; - } - } - - hr = m_AllUSers->ParseDisplayName(hwndOwner, pbcReserved, lpszDisplayName, pchEaten, &pidl, pdwAttributes); - if (SUCCEEDED(hr)) - { - TRACE("ParseDisplayName result common\n"); - hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info); - if (SUCCEEDED(hr)) - { - ILFree(pidl); - *ppidl = ILClone(info.pidl); - return hr; - } - } - - if (ppidl) *ppidl = NULL; - if (pchEaten) *pchEaten = 0; - if (pdwAttributes) *pdwAttributes = 0; - return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + hr = m_EnumSource->FindByName(hwndOwner, lpszDisplayName, &info); + if (FAILED(hr)) + { + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + } + + *ppidl = ILClone(info.pidl); + + if (pchEaten) + *pchEaten = lstrlenW(info.parseName); + + if (pdwAttributes) + *pdwAttributes = info.parent->GetAttributesOf(1, (LPCITEMIDLIST*)ppidl, pdwAttributes); + + return S_OK; } HRESULT STDMETHODCALLTYPE CMergedFolder::EnumObjects( @@ -514,14 +529,16 @@ if (riid != IID_IShellFolder) return E_FAIL; + // Construct a child MergedFolder and return it CComPtr<IShellFolder> fld1; CComPtr<IShellFolder> fld2; + // In shared folders, the user one takes precedence over the common one, so it will always be on pidl1 hr = m_UserLocal->BindToObject(info.pidl, pbcReserved, IID_PPV_ARG(IShellFolder, &fld1)); if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = m_AllUSers->BindToObject(info.pidl, pbcReserved, IID_PPV_ARG(IShellFolder, &fld2)); + hr = m_AllUsers->BindToObject(info.pidl2, pbcReserved, IID_PPV_ARG(IShellFolder, &fld2)); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -538,7 +555,7 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - hr = pasf->AddNameSpace(NULL, fld2, info.pidl, 0x0000); + hr = pasf->AddNameSpace(NULL, fld2, info.pidl2, 0x0000); if (FAILED_UNEXPECTEDLY(hr)) return hr; @@ -786,4 +803,11 @@ { UNIMPLEMENTED; return E_NOTIMPL; +} + +// IAugmentedShellFolder3 +HRESULT STDMETHODCALLTYPE CMergedFolder::QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *) +{ + UNIMPLEMENTED; + return E_NOTIMPL; } Modified: trunk/reactos/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CMergedF…
============================================================================== --- trunk/reactos/base/shell/rshell/CMergedFolder.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CMergedFolder.h [iso-8859-1] Mon Dec 1 04:23:44 2014 @@ -21,6 +21,7 @@ extern IID IID_IAugmentedShellFolder; extern IID IID_IAugmentedShellFolder2; +extern IID IID_IAugmentedShellFolder3; extern CLSID CLSID_MergedFolder; interface IAugmentedShellFolder : public IShellFolder @@ -36,33 +37,35 @@ virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST, LONG, IShellFolder **, LPITEMIDLIST *, LPITEMIDLIST *, LONG *) = 0; }; -/* No idea what QUERYNAMESPACEINFO struct contains -- the prototype comes from the PDB info +/* No idea what QUERYNAMESPACEINFO struct contains, yet */ +struct QUERYNAMESPACEINFO +{ + BYTE unknown[1]; +}; + interface IAugmentedShellFolder3 : public IAugmentedShellFolder2 { virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *) = 0; }; -*/ class CEnumMergedFolder; class CMergedFolder : public CComObjectRootEx<CComMultiThreadModelNoCS>, public IShellFolder2, - //public IStorage, - public IAugmentedShellFolder2, // -- undocumented - //public IAugmentedShellFolder3, // -- undocumented + public IPersistFolder2, + public IAugmentedShellFolder3 // -- undocumented //public IShellService, // -- undocumented //public ITranslateShellChangeNotify,// -- undocumented - public IPersistFolder2 + //public IStorage, //public IPersistPropertyBag, //public IShellIconOverlay, // -- undocumented //public ICompositeFolder, // -- undocumented //public IItemNameLimits, // -- undocumented - { private: CComPtr<IShellFolder> m_UserLocal; - CComPtr<IShellFolder> m_AllUSers; + CComPtr<IShellFolder> m_AllUsers; CComPtr<CEnumMergedFolder> m_EnumSource; LPITEMIDLIST m_UserLocalPidl; @@ -86,7 +89,7 @@ COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder, IAugmentedShellFolder) COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder2, IAugmentedShellFolder2) - //COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder3, IAugmentedShellFolder3) + COM_INTERFACE_ENTRY_IID(IID_IAugmentedShellFolder3, IAugmentedShellFolder3) //COM_INTERFACE_ENTRY_IID(IID_IStorage, IStorage) //COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService) //COM_INTERFACE_ENTRY_IID(IID_ITranslateShellChangeNotify,ITranslateShellChangeNotify) @@ -202,4 +205,7 @@ virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG dwUnknown, LPGUID lpGuid, IShellFolder ** ppsf); virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG dwUnknown, PULONG lpUnknown); virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder ** ppsf, LPITEMIDLIST * ppidl1, LPITEMIDLIST *ppidl2, LONG * lpUnknown); -}; + + // IAugmentedShellFolder3 + virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *); +}; Modified: trunk/reactos/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/rshell/CStartMe…
============================================================================== --- trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Mon Dec 1 04:23:44 2014 @@ -24,8 +24,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(CStartMenu); // TODO: declare these GUIDs and interfaces in the right place (whatever that may be) -IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; +IID IID_IAugmentedShellFolder = { 0x91EA3F8C, 0xC99B, 0x11D0, { 0x98, 0x15, 0x00, 0xC0, 0x4F, 0xD9, 0x19, 0x72 } }; IID IID_IAugmentedShellFolder2 = { 0x8DB3B3F4, 0x6CFE, 0x11D1, { 0x8A, 0xE9, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0 } }; +IID IID_IAugmentedShellFolder3 = { 0x4F755EA8, 0x247D, 0x479B, { 0x91, 0x81, 0x22, 0x7D, 0x09, 0xC2, 0xE0, 0x01 } }; CLSID CLSID_MergedFolder = { 0x26FDC864, 0xBE88, 0x46E7, { 0x92, 0x35, 0x03, 0x2D, 0x8E, 0xA5, 0x16, 0x2E } }; //#define TEST_TRACKPOPUPMENU_SUBMENUS
10 years
1
0
0
0
[tkreuzer] 65536: [WIN32K] Fix reference counting in PDEVOBJ_pSurface. Fixes failed assertions on newer MSVC builds.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 1 00:01:17 2014 New Revision: 65536 URL:
http://svn.reactos.org/svn/reactos?rev=65536&view=rev
Log: [WIN32K] Fix reference counting in PDEVOBJ_pSurface. Fixes failed assertions on newer MSVC builds. Modified: trunk/reactos/win32ss/gdi/eng/pdevobj.c Modified: trunk/reactos/win32ss/gdi/eng/pdevobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/pdevobj.c?…
============================================================================== --- trunk/reactos/win32ss/gdi/eng/pdevobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/pdevobj.c [iso-8859-1] Mon Dec 1 00:01:17 2014 @@ -81,7 +81,7 @@ if (ppdev->cPdevRefs == 0) { /* Do we have a surface? */ - if(ppdev->pSurface) + if (ppdev->pSurface) { /* Release the surface and let the driver free it */ SURFACE_ShareUnlockSurface(ppdev->pSurface); @@ -212,20 +212,18 @@ { HSURF hsurf; - /* Check if we already have a surface */ - if (ppdev->pSurface) - { - /* Increment reference count */ - GDIOBJ_vReferenceObjectByPointer(&ppdev->pSurface->BaseObject); - } - else + /* Check if there is no surface for this PDEV yet */ + if (ppdev->pSurface == NULL) { /* Call the drivers DrvEnableSurface */ hsurf = ppdev->pldev->pfn.EnableSurface(ppdev->dhpdev); - /* Lock the surface */ + /* Get a reference to the surface */ ppdev->pSurface = SURFACE_ShareLockSurface(hsurf); } + + /* Increment reference count */ + GDIOBJ_vReferenceObjectByPointer(&ppdev->pSurface->BaseObject); DPRINT("PDEVOBJ_pSurface() returning %p\n", ppdev->pSurface); return ppdev->pSurface;
10 years
1
0
0
0
← Newer
1
...
36
37
38
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200