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
September 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
16 participants
413 discussions
Start a n
N
ew thread
[akhaldi] 64090: [NTOS:VF] * Don't mark varargs functions as stdcall.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 9 16:32:51 2014 New Revision: 64090 URL:
http://svn.reactos.org/svn/reactos?rev=64090&view=rev
Log: [NTOS:VF] * Don't mark varargs functions as stdcall. Modified: trunk/reactos/ntoskrnl/vf/driver.c Modified: trunk/reactos/ntoskrnl/vf/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/vf/driver.c?rev=6…
============================================================================== --- trunk/reactos/ntoskrnl/vf/driver.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/vf/driver.c [iso-8859-1] Tue Sep 9 16:32:51 2014 @@ -30,7 +30,6 @@ * @unimplemented */ VOID -NTAPI VfFailDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject, IN ULONG BugCheckMajorCode, IN ULONG BugCheckMinorCode, @@ -47,7 +46,6 @@ * @unimplemented */ VOID -NTAPI VfFailSystemBIOS(IN ULONG BugCheckMajorCode, IN ULONG BugCheckMinorCode, IN VF_FAILURE_CLASS FailureClass,
10 years, 3 months
1
0
0
0
[dquintana] 64089: [EXPLORER-NEW] * Implement Taskbar auto-hide. The setting dialog does not work, though, so in order to enable it you need to change the StuckRects2 registry key so that the Setti...
by dquintana@svn.reactos.org
Author: dquintana Date: Tue Sep 9 14:58:38 2014 New Revision: 64089 URL:
http://svn.reactos.org/svn/reactos?rev=64089&view=rev
Log: [EXPLORER-NEW] * Implement Taskbar auto-hide. The setting dialog does not work, though, so in order to enable it you need to change the StuckRects2 registry key so that the Settings value has the right bit set to 1 (or import from a Windows installation). Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.c Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] Tue Sep 9 14:58:38 2014 @@ -27,6 +27,21 @@ #define WM_APP_TRAYDESTROY (WM_APP + 0x100) +#define TIMER_ID_AUTOHIDE 1 +#define TIMER_ID_MOUSETRACK 2 +#define MOUSETRACK_INTERVAL 100 +#define AUTOHIDE_DELAY_HIDE 2000 +#define AUTOHIDE_DELAY_SHOW 50 +#define AUTOHIDE_INTERVAL_ANIMATING 10 + +#define AUTOHIDE_SPEED_SHOW 10 +#define AUTOHIDE_SPEED_HIDE 1 + +#define AUTOHIDE_HIDDEN 0 +#define AUTOHIDE_SHOWING 1 +#define AUTOHIDE_SHOWN 2 +#define AUTOHIDE_HIDING 3 + static LONG TrayWndCount = 0; static const TCHAR szTrayWndClass[] = TEXT("Shell_TrayWnd"); @@ -97,6 +112,10 @@ HWND hwndTrayPropertiesOwner; HWND hwndRunFileDlgOwner; + + UINT AutoHideState; + SIZE AutoHideOffset; + TRACKMOUSEEVENT MouseTrackingInfo; HDPA hdpaShellServices; } ITrayWindowImpl; @@ -491,7 +510,13 @@ &rcScreen, &szTray, pRect); - + if (This->AutoHide) + { + pRect->left += This->AutoHideOffset.cx; + pRect->right += This->AutoHideOffset.cx; + pRect->top += This->AutoHideOffset.cy; + pRect->bottom += This->AutoHideOffset.cy; + } hMon = hMonNew; } else @@ -499,6 +524,13 @@ /* The user is dragging the tray window on the same monitor. We don't need to recalculate the rectangle */ *pRect = This->rcTrayWnd[Pos]; + if (This->AutoHide) + { + pRect->left += This->AutoHideOffset.cx; + pRect->right += This->AutoHideOffset.cx; + pRect->top += This->AutoHideOffset.cy; + pRect->bottom += This->AutoHideOffset.cy; + } } *phMonitor = hMon; @@ -537,6 +569,13 @@ rcTray.top = pwp->y; rcTray.right = rcTray.left + pwp->cx; rcTray.bottom = rcTray.top + pwp->cy; + if (This->AutoHide) + { + rcTray.left -= This->AutoHideOffset.cx; + rcTray.right -= This->AutoHideOffset.cx; + rcTray.top -= This->AutoHideOffset.cy; + rcTray.bottom -= This->AutoHideOffset.cy; + } if (!EqualRect(&rcTray, &This->rcTrayWnd[This->DraggingPosition])) @@ -594,6 +633,13 @@ &rcTray); } + if (This->AutoHide) + { + rcTray.left -= This->AutoHideOffset.cx; + rcTray.right -= This->AutoHideOffset.cx; + rcTray.top -= This->AutoHideOffset.cy; + rcTray.bottom -= This->AutoHideOffset.cy; + } This->rcTrayWnd[This->Position] = rcTray; } else @@ -607,6 +653,14 @@ ChangePos: This->TraySize.cx = rcTray.right - rcTray.left; This->TraySize.cy = rcTray.bottom - rcTray.top; + + if (This->AutoHide) + { + rcTray.left += This->AutoHideOffset.cx; + rcTray.right += This->AutoHideOffset.cx; + rcTray.top += This->AutoHideOffset.cy; + rcTray.bottom += This->AutoHideOffset.cy; + } pwp->flags &= ~(SWP_NOMOVE | SWP_NOSIZE); pwp->x = rcTray.left; @@ -719,6 +773,15 @@ RECT rcTray; rcTray = This->rcTrayWnd[This->Position]; + + if (This->AutoHide) + { + rcTray.left += This->AutoHideOffset.cx; + rcTray.right += This->AutoHideOffset.cx; + rcTray.top += This->AutoHideOffset.cy; + rcTray.bottom += This->AutoHideOffset.cy; + } + // TRACE("CheckTray: %d: %d,%d,%d,%d\n", This->Position, rcTray.left, rcTray.top, rcTray.right, rcTray.bottom); /* Move the tray window */ @@ -1602,6 +1665,12 @@ NULL); InitShellServices(&(This->hdpaShellServices)); + + if (This->AutoHide) + { + This->AutoHideState = AUTOHIDE_HIDING; + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_DELAY_HIDE, NULL); + } } static HRESULT STDMETHODCALLTYPE @@ -2286,6 +2355,14 @@ else { *pRect = This->rcTrayWnd[This->Position]; + + if (This->AutoHide) + { + pRect->left += This->AutoHideOffset.cx; + pRect->right += This->AutoHideOffset.cx; + pRect->top += This->AutoHideOffset.cy; + pRect->bottom += This->AutoHideOffset.cy; + } } return TRUE; } @@ -2303,6 +2380,14 @@ else { *pRect = This->rcTrayWnd[This->Position]; + + if (This->AutoHide) + { + pRect->left += This->AutoHideOffset.cx; + pRect->right += This->AutoHideOffset.cx; + pRect->top += This->AutoHideOffset.cy; + pRect->bottom += This->AutoHideOffset.cy; + } } return TRUE; } @@ -2714,6 +2799,191 @@ } break; + case WM_MOUSEMOVE: + case WM_NCMOUSEMOVE: + + if (This->AutoHide) + { + SetTimer(This->hWnd, TIMER_ID_MOUSETRACK, MOUSETRACK_INTERVAL, NULL); + } + + break; + case WM_TIMER: + if (wParam == TIMER_ID_MOUSETRACK) + { + RECT rcCurrent; + POINT pt; + BOOL over; + UINT state = This->AutoHideState; + + GetCursorPos(&pt); + GetWindowRect(This->hWnd, &rcCurrent); + over = PtInRect(&rcCurrent, pt); + + if (SendMessage(This->hwndStart, BM_GETSTATE, 0, 0) != BST_UNCHECKED) + { + over = TRUE; + } + + if (over) + { + if (state == AUTOHIDE_HIDING) + { + TRACE("AutoHide cancelling hide.\n"); + This->AutoHideState = AUTOHIDE_SHOWING; + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_INTERVAL_ANIMATING, NULL); + } + else if (state == AUTOHIDE_HIDDEN) + { + TRACE("AutoHide starting show.\n"); + This->AutoHideState = AUTOHIDE_SHOWING; + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_DELAY_SHOW, NULL); + } + } + else + { + if (state == AUTOHIDE_SHOWING) + { + TRACE("AutoHide cancelling show.\n"); + This->AutoHideState = AUTOHIDE_HIDING; + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_INTERVAL_ANIMATING, NULL); + } + else if (state == AUTOHIDE_SHOWN) + { + TRACE("AutoHide starting hide.\n"); + This->AutoHideState = AUTOHIDE_HIDING; + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_DELAY_HIDE, NULL); + } + + KillTimer(This->hWnd, TIMER_ID_MOUSETRACK); + } + } + else if (wParam == TIMER_ID_AUTOHIDE) + { + BOOL ret; + RECT rc = This->rcTrayWnd[This->Position]; + INT w = This->TraySize.cx - GetSystemMetrics(SM_CXBORDER) * 2 - 1; + INT h = This->TraySize.cy - GetSystemMetrics(SM_CYBORDER) * 2 - 1; + + TRACE("AutoHide Timer received for %u, rc=(%d, %d, %d, %d), w=%d, h=%d.\n", This->AutoHideState, rc.left, rc.top, rc.right, rc.bottom, w, h); + + switch (This->AutoHideState) + { + case AUTOHIDE_HIDING: + switch (This->Position) + { + case ABE_LEFT: + This->AutoHideOffset.cy = 0; + This->AutoHideOffset.cx -= AUTOHIDE_SPEED_HIDE; + if (This->AutoHideOffset.cx < -w) + This->AutoHideOffset.cx = -w; + break; + case ABE_TOP: + This->AutoHideOffset.cx = 0; + This->AutoHideOffset.cy -= AUTOHIDE_SPEED_HIDE; + if (This->AutoHideOffset.cy < -h) + This->AutoHideOffset.cy = -h; + break; + case ABE_RIGHT: + This->AutoHideOffset.cy = 0; + This->AutoHideOffset.cx += AUTOHIDE_SPEED_HIDE; + if (This->AutoHideOffset.cx > w) + This->AutoHideOffset.cx = w; + break; + case ABE_BOTTOM: + This->AutoHideOffset.cx = 0; + This->AutoHideOffset.cy += AUTOHIDE_SPEED_HIDE; + if (This->AutoHideOffset.cy > h) + This->AutoHideOffset.cy = h; + break; + } + + if (This->AutoHideOffset.cx != w && This->AutoHideOffset.cy != h) + { + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_INTERVAL_ANIMATING, NULL); + break; + } + + /* fallthrough */ + case AUTOHIDE_HIDDEN: + + switch (This->Position) + { + case ABE_LEFT: + This->AutoHideOffset.cx = -w; + This->AutoHideOffset.cy = 0; + break; + case ABE_TOP: + This->AutoHideOffset.cx = 0; + This->AutoHideOffset.cy = -h; + break; + case ABE_RIGHT: + This->AutoHideOffset.cx = w; + This->AutoHideOffset.cy = 0; + break; + case ABE_BOTTOM: + This->AutoHideOffset.cx = 0; + This->AutoHideOffset.cy = h; + break; + } + + KillTimer(This->hWnd, TIMER_ID_AUTOHIDE); + This->AutoHideState = AUTOHIDE_HIDDEN; + break; + + case AUTOHIDE_SHOWING: + if (This->AutoHideOffset.cx >= AUTOHIDE_SPEED_SHOW) + { + This->AutoHideOffset.cx -= AUTOHIDE_SPEED_SHOW; + } + else if (This->AutoHideOffset.cx <= -AUTOHIDE_SPEED_SHOW) + { + This->AutoHideOffset.cx += AUTOHIDE_SPEED_SHOW; + } + else + { + This->AutoHideOffset.cx = 0; + } + + if (This->AutoHideOffset.cy >= AUTOHIDE_SPEED_SHOW) + { + This->AutoHideOffset.cy -= AUTOHIDE_SPEED_SHOW; + } + else if (This->AutoHideOffset.cy <= -AUTOHIDE_SPEED_SHOW) + { + This->AutoHideOffset.cy += AUTOHIDE_SPEED_SHOW; + } + else + { + This->AutoHideOffset.cy = 0; + } + + if (This->AutoHideOffset.cx != 0 || This->AutoHideOffset.cy != 0) + { + SetTimer(This->hWnd, TIMER_ID_AUTOHIDE, AUTOHIDE_INTERVAL_ANIMATING, NULL); + break; + } + + /* fallthrough */ + case AUTOHIDE_SHOWN: + + KillTimer(This->hWnd, TIMER_ID_AUTOHIDE); + This->AutoHideState = AUTOHIDE_SHOWN; + break; + } + + rc.left += This->AutoHideOffset.cx; + rc.right += This->AutoHideOffset.cx; + rc.top += This->AutoHideOffset.cy; + rc.bottom += This->AutoHideOffset.cy; + + TRACE("AutoHide Changing position to (%d, %d, %d, %d) and state=%u.\n", rc.left, rc.top, rc.right, rc.bottom, This->AutoHideState); + ret = SetWindowPos(This->hWnd, NULL, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOZORDER); + TRACE("ret=%d, err=%d\n", ret, GetLastError()); + } + + goto DefHandler; + default: goto DefHandler; }
10 years, 3 months
1
0
0
0
[akhaldi] 64088: [NTOS] * Fall back to gas with some source files until http://llvm.org/bugs/show_bug.cgi?id=19027 is fixed. CORE-8516
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 9 12:28:48 2014 New Revision: 64088 URL:
http://svn.reactos.org/svn/reactos?rev=64088&view=rev
Log: [NTOS] * Fall back to gas with some source files until
http://llvm.org/bugs/show_bug.cgi?id=19027
is fixed. CORE-8516 Modified: trunk/reactos/ntoskrnl/ntos.cmake Modified: trunk/reactos/ntoskrnl/ntos.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntos.cmake?rev=64…
============================================================================== --- trunk/reactos/ntoskrnl/ntos.cmake [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntos.cmake [iso-8859-1] Tue Sep 9 12:28:48 2014 @@ -422,3 +422,12 @@ endif() endif() + +if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + #FIXME:
http://llvm.org/bugs/show_bug.cgi?id=19027
+ set_property(SOURCE + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/cpu.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/kiinit.c + ${REACTOS_SOURCE_DIR}/ntoskrnl/ke/i386/traphdlr.c + APPEND_STRING PROPERTY COMPILE_FLAGS " -no-integrated-as") +endif()
10 years, 3 months
1
0
0
0
[akhaldi] 64087: [CMAKE/CLANG] * Clang c++ support is not there yet, so we'll use g++ until then. CORE-8516
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 9 12:14:52 2014 New Revision: 64087 URL:
http://svn.reactos.org/svn/reactos?rev=64087&view=rev
Log: [CMAKE/CLANG] * Clang c++ support is not there yet, so we'll use g++ until then. CORE-8516 Modified: trunk/reactos/toolchain-clang.cmake Modified: trunk/reactos/toolchain-clang.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/toolchain-clang.cmake?rev=…
============================================================================== --- trunk/reactos/toolchain-clang.cmake [iso-8859-1] (original) +++ trunk/reactos/toolchain-clang.cmake [iso-8859-1] Tue Sep 9 12:14:52 2014 @@ -40,7 +40,7 @@ # Which tools to use set(CMAKE_C_COMPILER clang) -set(CMAKE_CXX_COMPILER clang++) +set(CMAKE_CXX_COMPILER ${MINGW_TOOLCHAIN_PREFIX}g++${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_ASM_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_ASM_COMPILER_ID "GNU") set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
10 years, 3 months
1
0
0
0
[akhaldi] 64086: [RTL] * Remove unused asmv2hashW and DeviceRootW.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 9 12:06:01 2014 New Revision: 64086 URL:
http://svn.reactos.org/svn/reactos?rev=64086&view=rev
Log: [RTL] * Remove unused asmv2hashW and DeviceRootW. Modified: trunk/reactos/lib/rtl/actctx.c trunk/reactos/lib/rtl/path.c Modified: trunk/reactos/lib/rtl/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=64086…
============================================================================== --- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Tue Sep 9 12:06:01 2014 @@ -582,7 +582,6 @@ static const WCHAR dependentAssemblyW[] = {'d','e','p','e','n','d','e','n','t','A','s','s','e','m','b','l','y',0}; static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR fileW[] = {'f','i','l','e',0}; -static const WCHAR asmv2hashW[] = {'a','s','m','v','2',':','h','a','s','h',0}; static const WCHAR noInheritW[] = {'n','o','I','n','h','e','r','i','t',0}; static const WCHAR noInheritableW[] = {'n','o','I','n','h','e','r','i','t','a','b','l','e',0}; static const WCHAR typelibW[] = {'t','y','p','e','l','i','b',0}; Modified: trunk/reactos/lib/rtl/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=64086&r…
============================================================================== --- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Tue Sep 9 12:06:01 2014 @@ -31,7 +31,6 @@ /* GLOBALS ********************************************************************/ -static const WCHAR DeviceRootW[] = L"\\\\.\\"; const UNICODE_STRING DeviceRootString = RTL_CONSTANT_STRING(L"\\\\.\\"); const UNICODE_STRING RtlpDosDevicesUncPrefix = RTL_CONSTANT_STRING(L"\\??\\UNC\\");
10 years, 3 months
1
0
0
0
[hbelusca] 64085: [CONSRV]: Use a console input thread that doesn't need any hidden notification window of any sort.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Sep 8 23:31:12 2014 New Revision: 64085 URL:
http://svn.reactos.org/svn/reactos?rev=64085&view=rev
Log: [CONSRV]: Use a console input thread that doesn't need any hidden notification window of any sort. Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h [iso-8859-1] Mon Sep 8 23:31:12 2014 @@ -38,6 +38,7 @@ CRITICAL_SECTION Lock; BOOL WindowSizeLock; HANDLE hGuiInitEvent; + HANDLE hGuiTermEvent; POINT OldCursor; Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
============================================================================== --- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] (original) +++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Mon Sep 8 23:31:12 2014 @@ -42,7 +42,8 @@ } GUI_INIT_INFO, *PGUI_INIT_INFO; static BOOL ConsInitialized = FALSE; -static HWND NotifyWnd = NULL; +static HANDLE hInputThread = NULL; +static DWORD dwInputThreadId = 0; extern HICON ghDefaultIcon; extern HICON ghDefaultIconSm; @@ -139,48 +140,59 @@ SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen); VOID CreateSysMenu(HWND hWnd); -static LRESULT CALLBACK -GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HWND NewWindow; - LONG WindowCount; - MSG Msg; - - switch (msg) - { - case WM_CREATE: + +static DWORD NTAPI +GuiConsoleInputThread(PVOID Data) +{ + PHANDLE GraphicsStartupEvent = (PHANDLE)Data; + LONG WindowCount = 0; + MSG msg; + + /* + * This thread dispatches all the console notifications to the notify window. + * It is common for all the console windows. + */ + + /* The thread has been initialized, set the event */ + SetEvent(*GraphicsStartupEvent); + + while (GetMessageW(&msg, NULL, 0, 0)) + { + switch (msg.message) { - SetWindowLongW(hWnd, GWL_USERDATA, 0); - return 0; - } - - case PM_CREATE_CONSOLE: - { - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)lParam; - PCONSRV_CONSOLE Console = GuiData->Console; - RECT rcWnd; - - DPRINT("PM_CREATE_CONSOLE -- creating window\n"); - - NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, - GUI_CONWND_CLASS, - Console->Title.Buffer, - WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - ConSrvDllInstance, - (PVOID)GuiData); - if (NULL != NewWindow) + case PM_CREATE_CONSOLE: { + PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)msg.lParam; + PCONSRV_CONSOLE Console = GuiData->Console; + HWND NewWindow; + RECT rcWnd; + + DPRINT("PM_CREATE_CONSOLE -- creating window\n"); + + PrivateCsrssManualGuiCheck(-1); // co_AddGuiApp + + NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, + GUI_CONWND_CLASS, + Console->Title.Buffer, + WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + NULL, + NULL, + ConSrvDllInstance, + (PVOID)GuiData); + if (NewWindow == NULL) + { + DPRINT1("Failed to create a new console window\n"); + PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp + continue; + } + ASSERT(NewWindow == GuiData->hWindow); - WindowCount = GetWindowLongW(hWnd, GWL_USERDATA); - WindowCount++; - SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); + InterlockedIncrement(&WindowCount); // // FIXME: TODO: Move everything there into conwnd.c!OnNcCreate() @@ -205,99 +217,60 @@ if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE); DPRINT("PM_CREATE_CONSOLE -- showing window\n"); - // ShowWindow(NewWindow, (int)wParam); - ShowWindowAsync(NewWindow, (int)wParam); + // ShowWindow(NewWindow, (int)GuiData->GuiInfo.ShowWindow); + ShowWindowAsync(NewWindow, (int)GuiData->GuiInfo.ShowWindow); DPRINT("Window showed\n"); + + continue; } - return (LRESULT)NewWindow; + case PM_DESTROY_CONSOLE: + { + PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)msg.lParam; + MSG TempMsg; + + /* Exit the full screen mode if it was already set */ + // LeaveFullScreen(GuiData); + + /* + * Window creation is done using a PostMessage(), so it's possible + * that the window that we want to destroy doesn't exist yet. + * So first empty the message queue. + */ + /* + while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&TempMsg); + DispatchMessageW(&TempMsg); + }*/ + while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE)) ; + + if (GuiData->hWindow == NULL) continue; + + DestroyWindow(GuiData->hWindow); + PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp + + SetEvent(GuiData->hGuiTermEvent); + + if (InterlockedDecrement(&WindowCount) == 0) + { + DPRINT("CONSRV: Going to quit the Input Thread!!\n"); + goto Quit; + } + + continue; + } } - case PM_DESTROY_CONSOLE: - { - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)lParam; - - /* Exit the full screen mode if it was already set */ - // LeaveFullScreen(GuiData); - - /* - * Window creation is done using a PostMessage(), so it's possible - * that the window that we want to destroy doesn't exist yet. - * So first empty the message queue. - */ - /* - while (PeekMessageW(&Msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - }*/ - while (PeekMessageW(&Msg, NULL, 0, 0, PM_REMOVE)) ; - - if (GuiData->hWindow != NULL) /* && DestroyWindow(GuiData->hWindow) */ - { - DestroyWindow(GuiData->hWindow); - - WindowCount = GetWindowLongW(hWnd, GWL_USERDATA); - WindowCount--; - SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); - if (0 == WindowCount) - { - NotifyWnd = NULL; - DestroyWindow(hWnd); - DPRINT("CONSRV: Going to quit the Gui Thread!!\n"); - PostQuitMessage(0); - } - } - - return 0; - } - - default: - return DefWindowProcW(hWnd, msg, wParam, lParam); - } -} - -static DWORD NTAPI -GuiConsoleGuiThread(PVOID Data) -{ - MSG msg; - PHANDLE GraphicsStartupEvent = (PHANDLE)Data; - - /* - * This thread dispatches all the console notifications to the notify window. - * It is common for all the console windows. - */ - - PrivateCsrssManualGuiCheck(+1); - - NotifyWnd = CreateWindowW(L"ConSrvCreateNotify", - L"", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - ConSrvDllInstance, - NULL); - if (NULL == NotifyWnd) - { - PrivateCsrssManualGuiCheck(-1); - SetEvent(*GraphicsStartupEvent); - return 1; - } - - SetEvent(*GraphicsStartupEvent); - - while (GetMessageW(&msg, NULL, 0, 0)) - { TranslateMessage(&msg); DispatchMessageW(&msg); } - DPRINT("CONSRV: Quit the Gui Thread!!\n"); - PrivateCsrssManualGuiCheck(-1); +Quit: + DPRINT("CONSRV: Quit the Input Thread!!\n"); + + hInputThread = NULL; + dwInputThreadId = 0; return 1; } @@ -305,83 +278,49 @@ static BOOL GuiInit(VOID) { - WNDCLASSEXW wc; - /* Exit if we were already initialized */ // if (ConsInitialized) return TRUE; /* - * Initialize and register the different window classes, if needed. + * Initialize and register the console window class, if needed. */ if (!ConsInitialized) { - /* Initialize the notification window class */ - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpszClassName = L"ConSrvCreateNotify"; - wc.lpfnWndProc = GuiConsoleNotifyWndProc; - wc.style = 0; - wc.hInstance = ConSrvDllInstance; - wc.hIcon = NULL; - wc.hIconSm = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClassExW(&wc) == 0) + if (!RegisterConWndClass(ConSrvDllInstance)) return FALSE; + ConsInitialized = TRUE; + } + + /* + * Set-up the console input thread + */ + if (hInputThread == NULL) + { + HANDLE GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + if (GraphicsStartupEvent == NULL) return FALSE; + + hInputThread = CreateThread(NULL, + 0, + GuiConsoleInputThread, + (PVOID)&GraphicsStartupEvent, + 0, + &dwInputThreadId); + if (hInputThread == NULL) { - DPRINT1("Failed to register GUI notify wndproc\n"); + CloseHandle(GraphicsStartupEvent); + DPRINT1("CONSRV: Failed to create graphics console thread.\n"); return FALSE; } - - /* Initialize the console window class */ - if (!RegisterConWndClass(ConSrvDllInstance)) - return FALSE; - - ConsInitialized = TRUE; - } - - /* - * Set-up the notification window - */ - if (NULL == NotifyWnd) - { - HANDLE ThreadHandle; - HANDLE GraphicsStartupEvent; - - GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if (NULL == GraphicsStartupEvent) return FALSE; - - ThreadHandle = CreateThread(NULL, - 0, - GuiConsoleGuiThread, - (PVOID)&GraphicsStartupEvent, - 0, - NULL); - if (NULL == ThreadHandle) - { - CloseHandle(GraphicsStartupEvent); - DPRINT1("CONSRV: Failed to create graphics console thread. Expect problems\n"); - return FALSE; - } - SetThreadPriority(ThreadHandle, THREAD_PRIORITY_HIGHEST); - CloseHandle(ThreadHandle); + SetThreadPriority(hInputThread, THREAD_PRIORITY_HIGHEST); + CloseHandle(hInputThread); WaitForSingleObject(GraphicsStartupEvent, INFINITE); CloseHandle(GraphicsStartupEvent); - - if (NULL == NotifyWnd) - { - DPRINT1("CONSRV: Failed to create notification window.\n"); - return FALSE; - } } // ConsInitialized = TRUE; return TRUE; } - /****************************************************************************** @@ -524,6 +463,11 @@ GuiData->LineSelection = FALSE; // Default to block selection // TODO: Retrieve the selection mode via the registry. + /* Finally, finish to initialize the frontend structure */ + This->Data = GuiData; + if (This->OldData) ConsoleFreeHeap(This->OldData); + This->OldData = NULL; + /* * We need to wait until the GUI has been fully initialized * to retrieve custom settings i.e. WindowSize etc... @@ -531,11 +475,12 @@ * yet implemented. */ GuiData->hGuiInitEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + GuiData->hGuiTermEvent = CreateEventW(NULL, FALSE, FALSE, NULL); DPRINT("GUI - Checkpoint\n"); /* Create the terminal window */ - PostMessageW(NotifyWnd, PM_CREATE_CONSOLE, GuiData->GuiInfo.ShowWindow, (LPARAM)GuiData); + PostThreadMessageW(dwInputThreadId, PM_CREATE_CONSOLE, 0, (LPARAM)GuiData); /* Wait until initialization has finished */ WaitForSingleObject(GuiData->hGuiInitEvent, INFINITE); @@ -551,11 +496,6 @@ return STATUS_UNSUCCESSFUL; } - /* Finally, finish to initialize the frontend structure */ - This->Data = GuiData; - if (This->OldData) ConsoleFreeHeap(This->OldData); - This->OldData = NULL; - return STATUS_SUCCESS; } @@ -564,7 +504,12 @@ { PGUI_CONSOLE_DATA GuiData = This->Data; - SendMessageW(NotifyWnd, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); + DPRINT("Send PM_DESTROY_CONSOLE message and wait on hGuiTermEvent...\n"); + PostThreadMessageW(dwInputThreadId, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); + WaitForSingleObject(GuiData->hGuiTermEvent, INFINITE); + DPRINT("hGuiTermEvent set\n"); + CloseHandle(GuiData->hGuiTermEvent); + GuiData->hGuiTermEvent = NULL; DPRINT("Destroying icons !! - GuiData->hIcon = 0x%p ; ghDefaultIcon = 0x%p ; GuiData->hIconSm = 0x%p ; ghDefaultIconSm = 0x%p\n", GuiData->hIcon, ghDefaultIcon, GuiData->hIconSm, ghDefaultIconSm); @@ -1116,10 +1061,10 @@ if (GuiInitInfo == NULL) return STATUS_NO_MEMORY; // HACK: We suppose that the pointers will be valid in GuiInitFrontEnd... + // If not, then copy exactly what we need in GuiInitInfo. GuiInitInfo->ConsoleInfo = ConsoleInfo; GuiInitInfo->ConsoleStartInfo = ConsoleInitInfo->ConsoleStartInfo; GuiInitInfo->ProcessId = ProcessId; - /* Finally, initialize the frontend structure */ FrontEnd->Vtbl = &GuiVtbl;
10 years, 3 months
1
0
0
0
[dquintana] 64084: [EXPLORER-NEW] * CMakeLists.txt: tabs to spaces
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Sep 8 14:04:49 2014 New Revision: 64084 URL:
http://svn.reactos.org/svn/reactos?rev=64084&view=rev
Log: [EXPLORER-NEW] * CMakeLists.txt: tabs to spaces Modified: branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt Modified: branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt [iso-8859-1] Mon Sep 8 14:04:49 2014 @@ -9,7 +9,7 @@ explorer.c rshell.c settings.c - shellservice.c + shellservice.c startmnu.c startup.c taskband.c @@ -31,7 +31,7 @@ ole32 oleaut32 shell32 - browseui + browseui shlwapi shdocvw version
10 years, 3 months
1
0
0
0
[dquintana] 64083: [PSDK] * Make shlwapi_undoc.h compatible with C code. [EXPLORER-NEW] * Link with browseui. * Use SHOpenNewFrame linked from browseui instead of explicitly loaded. * Make use of S...
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Sep 8 13:09:19 2014 New Revision: 64083 URL:
http://svn.reactos.org/svn/reactos?rev=64083&view=rev
Log: [PSDK] * Make shlwapi_undoc.h compatible with C code. [EXPLORER-NEW] * Link with browseui. * Use SHOpenNewFrame linked from browseui instead of explicitly loaded. * Make use of SHExplorerParseCmdLine. Does not yet open windows in an existing process when used through commandline. Modified: branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt branches/shell-experiments/base/shell/explorer-new/explorer.c branches/shell-experiments/include/psdk/shlwapi_undoc.h Modified: branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/CMakeLists.txt [iso-8859-1] Mon Sep 8 13:09:19 2014 @@ -31,6 +31,7 @@ ole32 oleaut32 shell32 + browseui shlwapi shdocvw version Modified: branches/shell-experiments/base/shell/explorer-new/explorer.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
============================================================================== --- branches/shell-experiments/base/shell/explorer-new/explorer.c [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/explorer-new/explorer.c [iso-8859-1] Mon Sep 8 13:09:19 2014 @@ -19,7 +19,7 @@ */ #include "precomp.h" - +#include <shlwapi_undoc.h> #include <winver.h> HINSTANCE hExplorerInstance; @@ -450,108 +450,28 @@ } else { - WCHAR root[MAX_PATH]; - HMODULE hBrowseui; HRESULT hr; - LPSHELLFOLDER pDesktopFolder = NULL; - LPITEMIDLIST pidlRoot = NULL; - typedef HRESULT(WINAPI *SH_OPEN_NEW_FRAME)(LPITEMIDLIST pidl, IUnknown *paramC, long param10, long param14); - SH_OPEN_NEW_FRAME SHOpenNewFrame; - - /* A shell is already loaded. Parse the command line arguments - and unless we need to do something specific simply display - the desktop in a separate explorer window */ - /* FIXME */ - - /* Commandline switches: - * - * /n Open a new window, even if an existing one still exists. - * /e Start with the explorer sidebar shown. - * /root,<object> Open a window for the given object path. - * /select,<object> Open a window with the given object selected. - */ - - /* FIXME: Do it right */ - WCHAR* tmp = wcsstr(lpCmdLine,L"/root,"); - if (tmp) - { - WCHAR* tmp2; - - tmp += 6; // skip to beginning of path - tmp2 = wcschr(tmp, L','); - - if (tmp2) - { - wcsncpy(root, tmp, tmp2 - tmp); - } - else - { - wcscpy(root, tmp); - } - } - else - { - wcscpy(root, lpCmdLine); - } - - if (root[0] == L'"') - { - int len = wcslen(root) - 2; - wcsncpy(root, root + 1, len); - root[len] = 0; - } - - if (wcslen(root) > 0) - { - LPITEMIDLIST pidl; - ULONG chEaten; - ULONG dwAttributes; - - if (SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder))) - { - hr = pDesktopFolder->lpVtbl->ParseDisplayName(pDesktopFolder, - NULL, - NULL, - root, - &chEaten, - &pidl, - &dwAttributes); - if (SUCCEEDED(hr)) - { - pidlRoot = pidl; - DbgPrint("Got PIDL for folder '%S'\n", root); - } - } - } - - if (!pidlRoot) - { - DbgPrint("No folder, getting PIDL for My Computer.\n", root); - hr = SHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidlRoot); + EXPLORER_CMDLINE_PARSE_RESULTS parseResults = { 0 }; + + if (!SHExplorerParseCmdLine(&parseResults)) + return 0; + + // TODO: Handle the case where .strPath was assigned instead of .pidlPath + + if (parseResults.dwFlags & SH_EXPLORER_CMDLINE_FLAG_IDLIST) + { + TRACE("Trying to open browser window... \n"); + + hr = SHOpenNewFrame(parseResults.pidlPath, NULL, 0, 0); if (FAILED(hr)) return 0; - } - - DbgPrint("Trying to open browser window... \n"); - - hBrowseui = LoadLibraryW(L"browseui.dll"); - if (!hBrowseui) - { - DbgPrint("Browseui not found.. \n"); + + /* FIXME: we should wait a bit here and see if a window was created. If not we should exit this process. */ + Sleep(1000); + ExitThread(0); + return 0; } - - SHOpenNewFrame = (SH_OPEN_NEW_FRAME) GetProcAddress(hBrowseui, (LPCSTR) 103); - - hr = SHOpenNewFrame(pidlRoot, (IUnknown*)pDesktopFolder, 0, 0); - if (FAILED(hr)) - return 0; - - /* FIXME: we should wait a bit here and see if a window was created. If not we should exit this process. */ - Sleep(1000); - ExitThread(0); - - return 0; } if (Tray != NULL) Modified: branches/shell-experiments/include/psdk/shlwapi_undoc.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/psdk/…
============================================================================== --- branches/shell-experiments/include/psdk/shlwapi_undoc.h [iso-8859-1] (original) +++ branches/shell-experiments/include/psdk/shlwapi_undoc.h [iso-8859-1] Mon Sep 8 13:09:19 2014 @@ -25,7 +25,7 @@ extern "C" { #endif /* defined(__cplusplus) */ -struct IEThreadParamBlock +typedef struct IEThreadParamBlock { long offset0; long offset4; @@ -43,9 +43,9 @@ char filler3[116]; // unknown contents IUnknown *offsetF8; // instance explorer long filler4; // unknown contents -}; +} IE_THREAD_PARAM_BLOCK, *PIE_THREAD_PARAM_BLOCK; -struct ExplorerCommandLineParseResults +typedef struct ExplorerCommandLineParseResults { LPWSTR strPath; LPITEMIDLIST pidlPath; @@ -61,7 +61,7 @@ DWORD unk_44; DWORD unk_48; GUID guidInproc; -}; +} EXPLORER_CMDLINE_PARSE_RESULTS, *PEXPLORER_CMDLINE_PARSE_RESULTS; #define SH_EXPLORER_CMDLINE_FLAG_ONE 0x00000001 #define SH_EXPLORER_CMDLINE_FLAG_S 0x00000002 @@ -122,18 +122,18 @@ BOOL WINAPI SHIsChildOrSelf(HWND hParent, HWND hChild); void WINAPI InitOCHostClass(long param8); -long WINAPI SHOpenFolderWindow(IEThreadParamBlock *param8); +long WINAPI SHOpenFolderWindow(PIE_THREAD_PARAM_BLOCK param8); void WINAPI SHCreateSavedWindows(void); long WINAPI SHCreateFromDesktop(long param8); -UINT WINAPI SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pParseResults); +UINT WINAPI SHExplorerParseCmdLine(PEXPLORER_CMDLINE_PARSE_RESULTS pParseResults); void WINAPI UEMRegisterNotify(long param8, long paramC); HRESULT WINAPI SHCreateBandForPidl(LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10); HRESULT WINAPI SHPidlFromDataObject(IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14); long WINAPI IDataObject_GetDeskBandState(long param8); -IEThreadParamBlock *WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14); -IEThreadParamBlock *WINAPI SHCloneIETHREADPARAM(IEThreadParamBlock *param); +PIE_THREAD_PARAM_BLOCK WINAPI SHCreateIETHREADPARAM(long param8, long paramC, IUnknown *param10, IUnknown *param14); +PIE_THREAD_PARAM_BLOCK WINAPI SHCloneIETHREADPARAM(PIE_THREAD_PARAM_BLOCK param); long WINAPI SHParseIECommandLine(long param8, long paramC); -void WINAPI SHDestroyIETHREADPARAM(IEThreadParamBlock *param); +void WINAPI SHDestroyIETHREADPARAM(PIE_THREAD_PARAM_BLOCK param); HRESULT WINAPI SHOnCWMCommandLine(long param8); LPITEMIDLIST WINAPI Channel_GetFolderPidl(void); IUnknown *WINAPI ChannelBand_Create(LPITEMIDLIST pidl);
10 years, 3 months
1
0
0
0
[cwittich] 64082: [apitest/crt] apply the same buffer size fix to _vsnwprintf test
by cwittich@svn.reactos.org
Author: cwittich Date: Mon Sep 8 07:00:00 2014 New Revision: 64082 URL:
http://svn.reactos.org/svn/reactos?rev=64082&view=rev
Log: [apitest/crt] apply the same buffer size fix to _vsnwprintf test Modified: trunk/rostests/apitests/crt/_vsnwprintf.c Modified: trunk/rostests/apitests/crt/_vsnwprintf.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/crt/_vsnwprintf.…
============================================================================== --- trunk/rostests/apitests/crt/_vsnwprintf.c [iso-8859-1] (original) +++ trunk/rostests/apitests/crt/_vsnwprintf.c [iso-8859-1] Mon Sep 8 07:00:00 2014 @@ -19,7 +19,7 @@ int ret; /* Test the basic functionality */ va_start(args, formatString); - ret = _vsnwprintf(buf, 255, formatString, args); + ret = _vsnwprintf(buf, buf_size, formatString, args); ok(expected_ret == ret, "Test failed: expected %i, got %i.\n", expected_ret, ret); }
10 years, 3 months
1
0
0
0
[dquintana] 64081: [BROWSEUI] * Initial implementation of the explorer command line parser. Not used by explorer-new, yet.
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Sep 8 01:59:18 2014 New Revision: 64081 URL:
http://svn.reactos.org/svn/reactos?rev=64081&view=rev
Log: [BROWSEUI] * Initial implementation of the explorer command line parser. Not used by explorer-new, yet. Added: branches/shell-experiments/dll/win32/browseui/parsecmdline.cpp (with props) Modified: branches/shell-experiments/dll/win32/browseui/CMakeLists.txt branches/shell-experiments/dll/win32/browseui/browseuiord.cpp branches/shell-experiments/include/psdk/shlwapi.h branches/shell-experiments/include/psdk/shlwapi_undoc.h Modified: branches/shell-experiments/dll/win32/browseui/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/CMakeLists.txt [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/CMakeLists.txt [iso-8859-1] Mon Sep 8 01:59:18 2014 @@ -24,6 +24,7 @@ commonbrowser.cpp globalfoldersettings.cpp internettoolbar.cpp + parsecmdline.cpp regtreeoptions.cpp shellbrowser.cpp toolsband.cpp Modified: branches/shell-experiments/dll/win32/browseui/browseuiord.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/browseuiord.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/browseui/browseuiord.cpp [iso-8859-1] Mon Sep 8 01:59:18 2014 @@ -58,10 +58,7 @@ /************************************************************************* * SHExplorerParseCmdLine [BROWSEUI.107] */ -extern "C" long WINAPI SHExplorerParseCmdLine(LPCTSTR commandLine) -{ - return -1; -} +/****** MOVED TO parsecmdline.cpp ******/ /************************************************************************* * UEMRegisterNotify [BROWSEUI.118] Added: branches/shell-experiments/dll/win32/browseui/parsecmdline.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
============================================================================== --- branches/shell-experiments/dll/win32/browseui/parsecmdline.cpp (added) +++ branches/shell-experiments/dll/win32/browseui/parsecmdline.cpp [iso-8859-1] Mon Sep 8 01:59:18 2014 @@ -0,0 +1,417 @@ +/* +* ReactOS browseui +* +* Copyright 2014 David Quintana <gigaherz(a)gmail.com> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precomp.h" +#include <strsafe.h> + +extern "C" +BOOL WINAPI GUIDFromStringW( + _In_ PCWSTR psz, + _Out_ LPGUID pguid + ); + +static BOOL _CopyAndUnquoteText(LPCWSTR strFieldSource, LPWSTR strField, size_t cchField) +{ + WCHAR cChar; + PWSTR tmpField = strField; + size_t lenField = 1; + BOOL inQuote = FALSE; + + // Remove leading whitespace + cChar = *strFieldSource; + while (cChar == L' ' || cChar == L'\t' || cChar == L'\n' || cChar == L'\r') + { + strFieldSource = CharNextW(strFieldSource); + cChar = *strFieldSource; + } + + while (cChar && cChar != L'=' && cChar != L',') + { + if (cChar == L'"') + { + // [1] is always valid read because of null-termination + if (inQuote && strFieldSource[1] == L'"') + { + if (lenField < cchField) + { + // Append + *(tmpField++) = L'"'; + ++lenField; + } + + // Skip second quote + strFieldSource++; + } + else + { + inQuote = !inQuote; + } + } + else + { + if (inQuote || (cChar != L'=' && cChar != L',')) + { + if (lenField < cchField) + { + // Append + *(tmpField++) = cChar; + ++lenField; + } + } + } + + strFieldSource = CharNextW(strFieldSource); + cChar = *strFieldSource; + } + + // Remove trailing whitespace + while (tmpField > strField) + { + tmpField = CharPrevW(strField, tmpField); + cChar = *tmpField; + if (cChar != L' ' && cChar != L'\t' && cChar != L'\n' && cChar != L'\r') + { + tmpField = CharNextW(tmpField); + break; + } + } + + // Terminate output string + *tmpField = 0; + + return TRUE; +} + +static BOOL _FindNextArg(PCWSTR * pstrFieldSource) +{ + PCWSTR strFieldSource = *pstrFieldSource; + WCHAR cChar = *strFieldSource; + BOOL inQuote = FALSE; + + while (cChar) + { + if (!inQuote && (cChar == L'=' || cChar == L',')) + break; + + if (cChar == L'"') + inQuote = !inQuote; + + strFieldSource = CharNextW(strFieldSource); + cChar = *strFieldSource; + } + + if (cChar == 0) + { + *pstrFieldSource = strFieldSource; + return FALSE; + } + + *pstrFieldSource = CharNextW(strFieldSource); + return TRUE; +} + +static PCWSTR _FindFirstField(PCWSTR strFieldSource) +{ + //Find end of first arg, because + // behaviour is different if the first separator is an '=' + BOOL inQuote = FALSE; + PCWSTR tmpArgs = strFieldSource; + WCHAR cChar = *tmpArgs; + while (cChar) + { + if (cChar == L'=') + break; + + if (cChar == L',') + break; + + if (cChar == L'\"') + inQuote = !inQuote; + + tmpArgs = CharNextW(tmpArgs); + cChar = *tmpArgs; + } + + // Skip the text before the first equal sign, if not quoted, unless the arg 0 was requested. + if (*tmpArgs == L'=' && !inQuote) + { + strFieldSource = ++tmpArgs; + TRACE("Skipped content before the first '=', remainder=%S\n", strFieldSource); + } + + return strFieldSource; +} + +static BOOL _ReadNextArg(PCWSTR * pstrFieldSource, PWSTR strField, size_t cchField) +{ + // Copy and unquote text + _CopyAndUnquoteText(*pstrFieldSource, strField, cchField); + + return _FindNextArg(pstrFieldSource); +} + +static LPITEMIDLIST _ILReadFromSharedMemory(PCWSTR strField) +{ + LPITEMIDLIST ret = NULL; + + // Ensure it really is an IDLIST-formatted parameter + // Format for IDLIST params: ":pid:shared" + if (*strField != L':') + return NULL; + + HANDLE hData = (HANDLE) StrToIntW(strField + 1); + PWSTR strSecond = StrChrW(strField + 1, L':'); + + if (strSecond) + { + int pid = StrToIntW(strSecond + 1); + void* pvShared = SHLockShared(hData, pid); + if (pvShared) + { + ret = ILClone((LPCITEMIDLIST) pvShared); + SHUnlockShared(pvShared); + SHFreeShared(hData, pid); + } + } + return ret; +} + +static HRESULT _ParsePathToPidl(PWSTR strPath, LPITEMIDLIST * pidl) +{ + CComPtr<IShellFolder> psfDesktop; + + HRESULT hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED(hr)) + return hr; + + return psfDesktop->ParseDisplayName(NULL, NULL, strPath, NULL, pidl, NULL); +} + +static LPITEMIDLIST _GetDocumentsPidl() +{ + CComPtr<IShellFolder> ppshf; + LPITEMIDLIST pidl; + WCHAR guid [] = L"::{450d8fba-ad25-11d0-98a8-0800361b1103}"; + + if (SUCCEEDED(SHGetSpecialFolderLocation(NULL, CSIDL_MYDOCUMENTS, &pidl))) + return pidl; + + if (FAILED(SHGetDesktopFolder(&ppshf))) + return NULL; + + if (FAILED(ppshf->ParseDisplayName(NULL, NULL, guid, NULL, &pidl, NULL))) + return NULL; + + return pidl; +} + +/************************************************************************* +* SHExplorerParseCmdLine [BROWSEUI.107] +*/ +extern "C" +UINT +WINAPI +SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pInfo) +{ + WCHAR strField[MAX_PATH]; + WCHAR strDir[MAX_PATH]; + + PCWSTR strCmdLine = GetCommandLineW(); + PCWSTR strFieldArray = PathGetArgsW(strCmdLine); + + if (!*strFieldArray) + { + pInfo->dwFlags = 9; + pInfo->pidlPath = _GetDocumentsPidl(); + if (!pInfo->pidlPath) + { + GetWindowsDirectoryW(strDir, MAX_PATH); + PathStripToRootW(strDir); + pInfo->pidlPath = ILCreateFromPathW(strDir); + } + return (LONG) (pInfo->pidlPath); + } + + PCWSTR strNextArg = _FindFirstField(strFieldArray); + + BOOL hasNext = TRUE; + + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + while (TRUE) + { + // Basic flags-only params first + if (!StrCmpIW(strField, L"/N")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_N | SH_EXPLORER_CMDLINE_FLAG_ONE; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/S")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_S; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/E")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_E; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/SELECT")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_SELECT; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/NOUI")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_NOUI; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"-embedding")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_EMBED; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/SEPARATE")) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_SEPARATE; + TRACE("CmdLine Parser: Parsed %S flag. dwFlags=%08lx\n", strField, pInfo->dwFlags); + } + else if (!StrCmpIW(strField, L"/INPROC")) + { + // No idea what Inproc is supposed to do, but it gets a GUID, and parses it. + + TRACE("CmdLine Parser: Found %S flag\n", strField); + + if (!hasNext) + return FALSE; + + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + + if (!GUIDFromStringW(strField, &(pInfo->guidInproc))) + return FALSE; + + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_INPROC; + + TRACE("CmdLine Parser: Parsed /INPROC flag. dwFlags=%08lx, guidInproc=%S\n", pInfo->dwFlags, strField); + } + else if (!StrCmpIW(strField, L"/ROOT")) + { + LPITEMIDLIST pidlRoot = NULL; + + // The window should be rooted + + TRACE("CmdLine Parser: Found %S flag\n", strField); + + if (!pInfo->pidlPath) + return FALSE; + + if (!hasNext) + return FALSE; + + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + + // Root may be a pidl + if (!StrCmpIW(strField, L"/IDLIST")) + { + if (hasNext) + { + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + } + pidlRoot = _ILReadFromSharedMemory(strField); + } + else + { + // Or just a path string + _ParsePathToPidl(strField, &pidlRoot); + } + + pInfo->pidlRoot = pidlRoot; + + // The root defaults to the desktop + if (!pidlRoot) + { + if (FAILED(SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, &(pInfo->pidlRoot)))) + pInfo->pidlRoot = NULL; + } + + // TODO: Create rooted PIDL from pInfo->pidlPath and pInfo->pidlRoot + + TRACE("CmdLine Parser: Parsed /ROOT flag. dwFlags=%08lx, pidlRoot=%p\n", pInfo->dwFlags, pInfo->pidlRoot); + } + else + { + // Anything else is part of the target path to browse to + TRACE("CmdLine Parser: Found target path %S\n", strField); + + // Which can be a shared-memory itemidlist + if (!StrCmpIW(strField, L"/IDLIST")) + { + LPITEMIDLIST pidlArg; + + if (!hasNext) + return FALSE; + + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + pidlArg = _ILReadFromSharedMemory(strField); + if (!pidlArg) + return FALSE; + + if (pInfo->pidlPath) + ILFree(pInfo->pidlPath); + pInfo->pidlPath = pidlArg; + + TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath); + } + else + { + // Or just a plain old string. + + LPITEMIDLIST pidlPath = ILCreateFromPathW(strField); + + pInfo->pidlPath = pidlPath; + + if (pidlPath) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_IDLIST; + TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, pidlPath=%p\n", pInfo->dwFlags, pInfo->pidlPath); + } + else + { + // The path could not be parsed into an ID List, + // so pass it on as a plain string. + + PWSTR field = StrDupW(strField); + pInfo->strPath = field; + if (field) + { + pInfo->dwFlags |= SH_EXPLORER_CMDLINE_FLAG_STRING; + TRACE("CmdLine Parser: Parsed target path. dwFlags=%08lx, strPath=%S\n", pInfo->dwFlags, field); + } + } + + } + } + + if (!hasNext) + break; + hasNext = _ReadNextArg(&strNextArg, strField, _countof(strField)); + } + + return TRUE; +} Propchange: branches/shell-experiments/dll/win32/browseui/parsecmdline.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/shell-experiments/include/psdk/shlwapi.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/psdk/…
============================================================================== --- branches/shell-experiments/include/psdk/shlwapi.h [iso-8859-1] (original) +++ branches/shell-experiments/include/psdk/shlwapi.h [iso-8859-1] Mon Sep 8 01:59:18 2014 @@ -1861,6 +1861,30 @@ HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct IStream**); #endif /* NO_SHLWAPI_STREAM */ + +#ifndef NO_SHLWAPI_SHARED + +PVOID +WINAPI +SHLockShared( + _In_ HANDLE hData, + _In_ DWORD dwProcessId + ); + +BOOL +WINAPI +SHUnlockShared( + _In_ void *pvData + ); + +BOOL +WINAPI +SHFreeShared( + _In_ HANDLE hData, + _In_ DWORD dwProcessId + ); + +#endif /* NO_SHLWAPI_SHARED */ /* SHAutoComplete flags */ #define SHACF_DEFAULT 0x00000000 Modified: branches/shell-experiments/include/psdk/shlwapi_undoc.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/psdk/…
============================================================================== --- branches/shell-experiments/include/psdk/shlwapi_undoc.h [iso-8859-1] (original) +++ branches/shell-experiments/include/psdk/shlwapi_undoc.h [iso-8859-1] Mon Sep 8 01:59:18 2014 @@ -45,6 +45,45 @@ long filler4; // unknown contents }; +struct ExplorerCommandLineParseResults +{ + LPWSTR strPath; + LPITEMIDLIST pidlPath; + DWORD dwFlags; + DWORD unk_12; + DWORD unk_16; + DWORD unk_20; + DWORD unk_24; + DWORD unk_28; + LPITEMIDLIST pidlRoot; + DWORD unk_36; + DWORD unk_40; + DWORD unk_44; + DWORD unk_48; + GUID guidInproc; +}; + +#define SH_EXPLORER_CMDLINE_FLAG_ONE 0x00000001 +#define SH_EXPLORER_CMDLINE_FLAG_S 0x00000002 +// unknown/unused 0x00000004 +#define SH_EXPLORER_CMDLINE_FLAG_E 0x00000008 +// unknown/unused 0x00000010 +// unknown/unused 0x00000020 +#define SH_EXPLORER_CMDLINE_FLAG_SELECT 0x00000040 +#define SH_EXPLORER_CMDLINE_FLAG_EMBED 0x00000080 +// unknown/unused 0x00000100 +#define SH_EXPLORER_CMDLINE_FLAG_IDLIST 0x00000200 +#define SH_EXPLORER_CMDLINE_FLAG_INPROC 0x00000400 +// unknown/unused 0x00000800 +#define SH_EXPLORER_CMDLINE_FLAG_NOUI 0x00001000 +// unknown/unused 0x00002000 +#define SH_EXPLORER_CMDLINE_FLAG_N 0x00004000 +// unknown/unused 0x00008000 +// unknown/unused 0x00010000 +#define SH_EXPLORER_CMDLINE_FLAG_SEPARATE 0x00020000 +#define SH_EXPLORER_CMDLINE_FLAG_STRING 0x02000000 + + BOOL WINAPI SHAboutInfoA(LPSTR lpszDest, DWORD dwDestLen); BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen); HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT* pCmdText); @@ -86,7 +125,7 @@ long WINAPI SHOpenFolderWindow(IEThreadParamBlock *param8); void WINAPI SHCreateSavedWindows(void); long WINAPI SHCreateFromDesktop(long param8); -long WINAPI SHExplorerParseCmdLine(LPCTSTR commandLine); +UINT WINAPI SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pParseResults); void WINAPI UEMRegisterNotify(long param8, long paramC); HRESULT WINAPI SHCreateBandForPidl(LPCITEMIDLIST param8, IUnknown *paramC, BOOL param10); HRESULT WINAPI SHPidlFromDataObject(IDataObject *param8, long *paramC, long param10, FILEDESCRIPTORW *param14);
10 years, 3 months
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
42
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Results per page:
10
25
50
100
200