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 2018
----- 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
26 participants
322 discussions
Start a n
N
ew thread
[reactos] 01/01: [DESK][SHELL32] Allow Desk.cpl to run standalone on WinXP/2003 again CORE-15412
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f8cb05cad142a8679872…
commit 6f8cb05cad142a8679872e695f317dc1f9728d55 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Mon Dec 17 22:01:49 2018 +0100 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Mon Dec 17 22:01:49 2018 +0100 [DESK][SHELL32] Allow Desk.cpl to run standalone on WinXP/2003 again CORE-15412 addendum to 0.4.10-dev-502-g d559ca9c982f9766acc5db3ea887ef2bc27acdff That copy-paste was done once intentionally to keep our imports similar to 2003. It's worth reading the conversation in PR #748: Getequ seems to be ok with this. The ideal solution most likely would be to instead *statically* link against RegLoadMUIStringW() from advapi32_vista when WINNT=0x502. For now the stuff runs again at least. I left the func existing in advapi32_vista.dll. --- dll/cpl/desk/CMakeLists.txt | 6 +- dll/cpl/desk/desk.h | 9 ++ dll/cpl/desk/muireg.c | 144 ++++++++++++++++++++++++++ dll/win32/shell32/CMakeLists.txt | 3 +- dll/win32/shell32/vista.c | 218 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 375 insertions(+), 5 deletions(-) diff --git a/dll/cpl/desk/CMakeLists.txt b/dll/cpl/desk/CMakeLists.txt index 24d9bb1e60..ae7fb83825 100644 --- a/dll/cpl/desk/CMakeLists.txt +++ b/dll/cpl/desk/CMakeLists.txt @@ -2,9 +2,6 @@ add_definitions(-D_WIN32) spec2def(desk.cpl desk.spec) -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - list(APPEND SOURCE advmon.c appearance.c @@ -23,6 +20,7 @@ list(APPEND SOURCE general.c draw.c theme.c + muireg.c desk.h) file(GLOB desk_rc_deps resources/*.*) @@ -36,6 +34,6 @@ add_library(desk SHARED set_module_type(desk cpl UNICODE) target_link_libraries(desk uuid) -add_importlibs(desk user32 advapi32 advapi32_vista gdi32 comctl32 comdlg32 ole32 setupapi shell32 shlwapi uxtheme gdiplus msvcrt kernel32 ntdll) +add_importlibs(desk user32 advapi32 gdi32 comctl32 comdlg32 ole32 setupapi shell32 shlwapi uxtheme gdiplus msvcrt kernel32 ntdll) add_pch(desk desk.h SOURCE) add_cd_file(TARGET desk DESTINATION reactos/system32 FOR all) diff --git a/dll/cpl/desk/desk.h b/dll/cpl/desk/desk.h index 3bb02f3a74..3c479251cf 100644 --- a/dll/cpl/desk/desk.h +++ b/dll/cpl/desk/desk.h @@ -122,4 +122,13 @@ HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*); INT_PTR CALLBACK AdvGeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +LONG +RegLoadMUIStringW(IN HKEY hKey, + IN LPCWSTR pszValue OPTIONAL, + OUT LPWSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCWSTR pszDirectory OPTIONAL); + #endif /* _DESK_H */ diff --git a/dll/cpl/desk/muireg.c b/dll/cpl/desk/muireg.c new file mode 100644 index 0000000000..8754b43655 --- /dev/null +++ b/dll/cpl/desk/muireg.c @@ -0,0 +1,144 @@ +#include "desk.h" + +/****************************************************************************** + * load_string [Internal] + * + * This is basically a copy of user32/resource.c's LoadStringW. Necessary to + * avoid importing user32, which is higher level than advapi32. Helper for + * RegLoadMUIString. + */ +static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars) +{ + HGLOBAL hMemory; + HRSRC hResource; + WCHAR *pString; + int idxString; + + /* Negative values have to be inverted. */ + if (HIWORD(resId) == 0xffff) + resId = (UINT)(-((INT)resId)); + + /* Load the resource into memory and get a pointer to it. */ + hResource = FindResourceW(hModule, MAKEINTRESOURCEW(LOWORD(resId >> 4) + 1), (LPWSTR)RT_STRING); + if (!hResource) return 0; + hMemory = LoadResource(hModule, hResource); + if (!hMemory) return 0; + pString = LockResource(hMemory); + + /* Strings are length-prefixed. Lowest nibble of resId is an index. */ + idxString = resId & 0xf; + while (idxString--) pString += *pString + 1; + + /* If no buffer is given, return length of the string. */ + if (!pwszBuffer) return *pString; + + /* Else copy over the string, respecting the buffer size. */ + cMaxChars = (*pString < cMaxChars) ? *pString : (cMaxChars - 1); + if (cMaxChars >= 0) + { + memcpy(pwszBuffer, pString+1, cMaxChars * sizeof(WCHAR)); + pwszBuffer[cMaxChars] = L'\0'; + } + + return cMaxChars; +} + + +/************************************************************************ + * RegLoadMUIStringW + * + * @implemented + */ +LONG +RegLoadMUIStringW(IN HKEY hKey, + IN LPCWSTR pszValue OPTIONAL, + OUT LPWSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCWSTR pszDirectory OPTIONAL) +{ + DWORD dwValueType, cbData; + LPWSTR pwszTempBuffer = NULL, pwszExpandedBuffer = NULL; + LONG result; + + /* Parameter sanity checks. */ + if (!hKey || !pszOutBuf) + return ERROR_INVALID_PARAMETER; + + if (pszDirectory && *pszDirectory) + { + //FIXME("BaseDir parameter not yet supported!\n"); + return ERROR_INVALID_PARAMETER; + } + + /* Check for value existence and correctness of it's type, allocate a buffer and load it. */ + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, NULL, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + if (!(dwValueType == REG_SZ || dwValueType == REG_EXPAND_SZ) || !cbData) + { + result = ERROR_FILE_NOT_FOUND; + goto cleanup; + } + pwszTempBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszTempBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, (LPBYTE)pwszTempBuffer, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + + /* Expand environment variables, if appropriate, or copy the original string over. */ + if (dwValueType == REG_EXPAND_SZ) + { + cbData = ExpandEnvironmentStringsW(pwszTempBuffer, NULL, 0) * sizeof(WCHAR); + if (!cbData) goto cleanup; + pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszExpandedBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + ExpandEnvironmentStringsW(pwszTempBuffer, pwszExpandedBuffer, cbData); + } + else + { + pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + memcpy(pwszExpandedBuffer, pwszTempBuffer, cbData); + } + + /* If the value references a resource based string, parse the value and load the string. + * Else just copy over the original value. */ + result = ERROR_SUCCESS; + if (*pwszExpandedBuffer != L'@') /* '@' is the prefix for resource based string entries. */ + { + lstrcpynW(pszOutBuf, pwszExpandedBuffer, cbOutBuf / sizeof(WCHAR)); + } + else + { + WCHAR *pComma = wcsrchr(pwszExpandedBuffer, L','); + UINT uiStringId; + HMODULE hModule; + + /* Format of the expanded value is 'path_to_dll,-resId' */ + if (!pComma || pComma[1] != L'-') + { + result = ERROR_BADKEY; + goto cleanup; + } + + uiStringId = _wtoi(pComma+2); + *pComma = L'\0'; + + hModule = LoadLibraryExW(pwszExpandedBuffer + 1, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (!hModule || !load_string(hModule, uiStringId, pszOutBuf, cbOutBuf / sizeof(WCHAR))) + result = ERROR_BADKEY; + FreeLibrary(hModule); + } + +cleanup: + HeapFree(GetProcessHeap(), 0, pwszTempBuffer); + HeapFree(GetProcessHeap(), 0, pwszExpandedBuffer); + return result; +} diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 08933dda35..78ee1af531 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -102,6 +102,7 @@ add_library(shell32 SHARED wine/shellstring.c wine/shlmenu.c wine/shpolicy.c + vista.c shell32.rc ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/shell32.def) @@ -113,7 +114,7 @@ set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT set_module_type(shell32 win32dll UNICODE) target_link_libraries(shell32 shellmenu shelldesktop atlnew wine uuid recyclebin) add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs) -add_importlibs(shell32 advapi32 advapi32_vista gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll) +add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll) add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb add_pch(shell32 precomp.h SOURCE) add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/shell32/vista.c b/dll/win32/shell32/vista.c new file mode 100644 index 0000000000..9f1a8335a3 --- /dev/null +++ b/dll/win32/shell32/vista.c @@ -0,0 +1,218 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: Copied from advapi32/reg/reg.c + * PURPOSE: Registry functions + * PROGRAMMER: Ariadne ( ariadne(a)xs4all.nl) + * Thomas Weidenmueller <w3seek(a)reactos.com> + * UPDATE HISTORY: + * Created 01/11/98 + * 19990309 EA Stubs + * 20050502 Fireball imported some stuff from WINE + */ + +#include <stdarg.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include <windef.h> +#include <winbase.h> +#include <winreg.h> +#include <winuser.h> +#define NTOS_MODE_USER +#include <ndk/rtlfuncs.h> + +#include <wine/debug.h> +#include <wine/unicode.h> + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/****************************************************************************** + * load_string [Internal] + * + * This is basically a copy of user32/resource.c's LoadStringW. Necessary to + * avoid importing user32, which is higher level than advapi32. Helper for + * RegLoadMUIString. + */ +static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars) +{ + HGLOBAL hMemory; + HRSRC hResource; + WCHAR *pString; + int idxString; + + /* Negative values have to be inverted. */ + if (HIWORD(resId) == 0xffff) + resId = (UINT)(-((INT)resId)); + + /* Load the resource into memory and get a pointer to it. */ + hResource = FindResourceW(hModule, MAKEINTRESOURCEW(LOWORD(resId >> 4) + 1), (LPWSTR)RT_STRING); + if (!hResource) return 0; + hMemory = LoadResource(hModule, hResource); + if (!hMemory) return 0; + pString = LockResource(hMemory); + + /* Strings are length-prefixed. Lowest nibble of resId is an index. */ + idxString = resId & 0xf; + while (idxString--) pString += *pString + 1; + + /* If no buffer is given, return length of the string. */ + if (!pwszBuffer) return *pString; + + /* Else copy over the string, respecting the buffer size. */ + cMaxChars = (*pString < cMaxChars) ? *pString : (cMaxChars - 1); + if (cMaxChars >= 0) + { + memcpy(pwszBuffer, pString+1, cMaxChars * sizeof(WCHAR)); + pwszBuffer[cMaxChars] = L'\0'; + } + + return cMaxChars; +} + +/************************************************************************ + * RegLoadMUIStringW + * + * @implemented + */ +LONG WINAPI +RegLoadMUIStringW(IN HKEY hKey, + IN LPCWSTR pszValue OPTIONAL, + OUT LPWSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCWSTR pszDirectory OPTIONAL) +{ + DWORD dwValueType, cbData; + LPWSTR pwszTempBuffer = NULL, pwszExpandedBuffer = NULL; + LONG result; + + /* Parameter sanity checks. */ + if (!hKey || !pszOutBuf) + return ERROR_INVALID_PARAMETER; + + if (pszDirectory && *pszDirectory) + { + FIXME("BaseDir parameter not yet supported!\n"); + return ERROR_INVALID_PARAMETER; + } + + /* Check for value existence and correctness of it's type, allocate a buffer and load it. */ + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, NULL, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + if (!(dwValueType == REG_SZ || dwValueType == REG_EXPAND_SZ) || !cbData) + { + result = ERROR_FILE_NOT_FOUND; + goto cleanup; + } + pwszTempBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszTempBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, (LPBYTE)pwszTempBuffer, &cbData); + if (result != ERROR_SUCCESS) goto cleanup; + + /* Expand environment variables, if appropriate, or copy the original string over. */ + if (dwValueType == REG_EXPAND_SZ) + { + cbData = ExpandEnvironmentStringsW(pwszTempBuffer, NULL, 0) * sizeof(WCHAR); + if (!cbData) goto cleanup; + pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + if (!pwszExpandedBuffer) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + ExpandEnvironmentStringsW(pwszTempBuffer, pwszExpandedBuffer, cbData); + } + else + { + pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData); + memcpy(pwszExpandedBuffer, pwszTempBuffer, cbData); + } + + /* If the value references a resource based string, parse the value and load the string. + * Else just copy over the original value. */ + result = ERROR_SUCCESS; + if (*pwszExpandedBuffer != L'@') /* '@' is the prefix for resource based string entries. */ + { + lstrcpynW(pszOutBuf, pwszExpandedBuffer, cbOutBuf / sizeof(WCHAR)); + } + else + { + WCHAR *pComma = wcsrchr(pwszExpandedBuffer, L','); + UINT uiStringId; + HMODULE hModule; + + /* Format of the expanded value is 'path_to_dll,-resId' */ + if (!pComma || pComma[1] != L'-') + { + result = ERROR_BADKEY; + goto cleanup; + } + + uiStringId = _wtoi(pComma+2); + *pComma = L'\0'; + + hModule = LoadLibraryExW(pwszExpandedBuffer + 1, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (!hModule || !load_string(hModule, uiStringId, pszOutBuf, cbOutBuf / sizeof(WCHAR))) + result = ERROR_BADKEY; + FreeLibrary(hModule); + } + +cleanup: + HeapFree(GetProcessHeap(), 0, pwszTempBuffer); + HeapFree(GetProcessHeap(), 0, pwszExpandedBuffer); + return result; +} + +/************************************************************************ + * RegLoadMUIStringA + * + * @implemented + */ +LONG WINAPI +RegLoadMUIStringA(IN HKEY hKey, + IN LPCSTR pszValue OPTIONAL, + OUT LPSTR pszOutBuf, + IN DWORD cbOutBuf, + OUT LPDWORD pcbData OPTIONAL, + IN DWORD Flags, + IN LPCSTR pszDirectory OPTIONAL) +{ + UNICODE_STRING valueW, baseDirW; + WCHAR *pwszBuffer; + DWORD cbData = cbOutBuf * sizeof(WCHAR); + LONG result; + + valueW.Buffer = baseDirW.Buffer = pwszBuffer = NULL; + if (!RtlCreateUnicodeStringFromAsciiz(&valueW, pszValue) || + !RtlCreateUnicodeStringFromAsciiz(&baseDirW, pszDirectory) || + !(pwszBuffer = HeapAlloc(GetProcessHeap(), 0, cbData))) + { + result = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + + result = RegLoadMUIStringW(hKey, valueW.Buffer, pwszBuffer, cbData, NULL, Flags, + baseDirW.Buffer); + + if (result == ERROR_SUCCESS) + { + cbData = WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszOutBuf, cbOutBuf, NULL, NULL); + if (pcbData) + *pcbData = cbData; + } + +cleanup: + HeapFree(GetProcessHeap(), 0, pwszBuffer); + RtlFreeUnicodeString(&baseDirW); + RtlFreeUnicodeString(&valueW); + + return result; +}
6 years
1
0
0
0
[reactos] 02/02: [BROWSEUI] Add ITaskbarList implementation CORE-15424
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c8f216eafdf97937dbab2…
commit c8f216eafdf97937dbab2ee746418137128a2b33 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Dec 15 16:23:22 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Dec 17 20:38:38 2018 +0100 [BROWSEUI] Add ITaskbarList implementation CORE-15424 --- dll/win32/browseui/CMakeLists.txt | 2 + dll/win32/browseui/CTaskbarList.cpp | 94 ++++++++++++++++++++++++++++++++++ dll/win32/browseui/CTaskbarList.h | 49 ++++++++++++++++++ dll/win32/browseui/browseui.cpp | 1 + dll/win32/browseui/browseui.rc | 1 + dll/win32/browseui/precomp.h | 1 + dll/win32/browseui/res/taskbarlist.rgs | 13 +++++ dll/win32/browseui/resource.h | 1 + 8 files changed, 162 insertions(+) diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt index 677544bc5f..8c0de76cf7 100644 --- a/dll/win32/browseui/CMakeLists.txt +++ b/dll/win32/browseui/CMakeLists.txt @@ -23,6 +23,8 @@ list(APPEND SOURCE browseui.cpp browseuiord.cpp CAutoComplete.cpp + CTaskbarList.cpp + CTaskbarList.h commonbrowser.cpp desktopipc.cpp explorerband.cpp diff --git a/dll/win32/browseui/CTaskbarList.cpp b/dll/win32/browseui/CTaskbarList.cpp new file mode 100644 index 0000000000..24f6f34b99 --- /dev/null +++ b/dll/win32/browseui/CTaskbarList.cpp @@ -0,0 +1,94 @@ +/* + * PROJECT: browseui + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: ITaskbarList implementation + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include "precomp.h" + + +/*********************************************************************** + * ITaskbarList2 implementation + */ + +#define TWM_GETTASKSWITCH (WM_USER + 236) + +CTaskbarList::CTaskbarList() + : m_hTaskWnd(NULL) +{ + m_ShellHookMsg = RegisterWindowMessageW(L"SHELLHOOK"); +} + +CTaskbarList::~CTaskbarList() +{ +} + +HWND CTaskbarList::TaskWnd() +{ + HWND hTrayWnd; + if (m_hTaskWnd && ::IsWindow(m_hTaskWnd)) + return m_hTaskWnd; + + hTrayWnd = FindWindowW(L"Shell_TrayWnd", NULL); + if (hTrayWnd) + { + m_hTaskWnd = (HWND)SendMessageW(hTrayWnd, TWM_GETTASKSWITCH, 0L, 0L); + } + return m_hTaskWnd; +} + +void CTaskbarList::SendTaskWndShellHook(WPARAM wParam, HWND hWnd) +{ + HWND hTaskWnd = TaskWnd(); + if (hTaskWnd && m_ShellHookMsg) + ::SendMessageW(hTaskWnd, m_ShellHookMsg, wParam, (LPARAM)hWnd); +} + + +HRESULT WINAPI CTaskbarList::MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +/*********************************************************************** + * ITaskbarList implementation + */ + +HRESULT WINAPI CTaskbarList::HrInit() +{ + if (m_ShellHookMsg == NULL) + return E_OUTOFMEMORY; + + if (!TaskWnd()) + return E_HANDLE; + + return S_OK; +} + +HRESULT WINAPI CTaskbarList::AddTab(HWND hwnd) +{ + SendTaskWndShellHook(HSHELL_WINDOWCREATED, hwnd); + return S_OK; +} + +HRESULT WINAPI CTaskbarList::DeleteTab(HWND hwnd) +{ + SendTaskWndShellHook(HSHELL_WINDOWDESTROYED, hwnd); + return S_OK; +} + +HRESULT WINAPI CTaskbarList::ActivateTab(HWND hwnd) +{ + SendTaskWndShellHook(HSHELL_WINDOWACTIVATED, hwnd); + return S_OK; +} + +HRESULT WINAPI CTaskbarList::SetActiveAlt(HWND hwnd) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + diff --git a/dll/win32/browseui/CTaskbarList.h b/dll/win32/browseui/CTaskbarList.h new file mode 100644 index 0000000000..60cc51abb7 --- /dev/null +++ b/dll/win32/browseui/CTaskbarList.h @@ -0,0 +1,49 @@ +/* + * PROJECT: browseui + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: ITaskbarList header + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#ifndef _CTASKBARLIST_H_ +#define _CTASKBARLIST_H_ + +class CTaskbarList : + public CComCoClass<CTaskbarList, &CLSID_TaskbarList>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public ITaskbarList2 +{ + HWND m_hTaskWnd; + UINT m_ShellHookMsg; + + HWND TaskWnd(); + void SendTaskWndShellHook(WPARAM wParam, HWND hWnd); + +public: + CTaskbarList(); + virtual ~CTaskbarList(); + + /*** ITaskbarList2 methods ***/ + virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen); + + /*** ITaskbarList methods ***/ + virtual HRESULT STDMETHODCALLTYPE HrInit(); + virtual HRESULT STDMETHODCALLTYPE AddTab(HWND hwnd); + virtual HRESULT STDMETHODCALLTYPE DeleteTab(HWND hwnd); + virtual HRESULT STDMETHODCALLTYPE ActivateTab(HWND hwnd); + virtual HRESULT STDMETHODCALLTYPE SetActiveAlt(HWND hwnd); + + + DECLARE_REGISTRY_RESOURCEID(IDR_TASKBARLIST) + DECLARE_NOT_AGGREGATABLE(CTaskbarList) + + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CTaskbarList) + COM_INTERFACE_ENTRY_IID(IID_ITaskbarList2, ITaskbarList2) + COM_INTERFACE_ENTRY_IID(IID_ITaskbarList, ITaskbarList) + END_COM_MAP() +}; + + +#endif // _CTASKBARLIST_H_ diff --git a/dll/win32/browseui/browseui.cpp b/dll/win32/browseui/browseui.cpp index 98a94c2369..46272d48fd 100644 --- a/dll/win32/browseui/browseui.cpp +++ b/dll/win32/browseui/browseui.cpp @@ -141,6 +141,7 @@ OBJECT_ENTRY(CLSID_CCommonBrowser, CCommonBrowser) OBJECT_ENTRY(CLSID_GlobalFolderSettings, CGlobalFolderSettings) OBJECT_ENTRY(CLSID_InternetToolbar, CInternetToolbar) OBJECT_ENTRY(CLSID_CRegTreeOptions, CRegTreeOptions) +OBJECT_ENTRY(CLSID_TaskbarList, CTaskbarList) OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand) OBJECT_ENTRY(CLSID_ProgressDialog, CProgressDialog) OBJECT_ENTRY(CLSID_ISFBand, CISFBand) diff --git a/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc index aa8c3435a9..28899d1cea 100644 --- a/dll/win32/browseui/browseui.rc +++ b/dll/win32/browseui/browseui.rc @@ -47,6 +47,7 @@ IDR_AUTOCOMPLETE REGISTRY "res/autocomplete.rgs" IDR_ACLISTISF REGISTRY "res/shellautocomplete.rgs" IDR_ISFBAND REGISTRY "res/isfband.rgs" IDR_ACLCUSTOMMRU REGISTRY "res/custommru.rgs" +IDR_TASKBARLIST REGISTRY "res/taskbarlist.rgs" #include <reactos/manifest_dll.rc> diff --git a/dll/win32/browseui/precomp.h b/dll/win32/browseui/precomp.h index 5ee3ee0745..e646759ef0 100644 --- a/dll/win32/browseui/precomp.h +++ b/dll/win32/browseui/precomp.h @@ -51,6 +51,7 @@ #include "commonbrowser.h" #include "globalfoldersettings.h" #include "regtreeoptions.h" +#include "CTaskbarList.h" #include "explorerband.h" #include "CProgressDialog.h" #include "browseui.h" diff --git a/dll/win32/browseui/res/taskbarlist.rgs b/dll/win32/browseui/res/taskbarlist.rgs new file mode 100644 index 0000000000..607b4070d9 --- /dev/null +++ b/dll/win32/browseui/res/taskbarlist.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {56FDF344-FD6D-11D0-958A-006097C9A090} = s 'Task bar communication' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/browseui/resource.h b/dll/win32/browseui/resource.h index dc0d8e62c6..1d9f96af77 100644 --- a/dll/win32/browseui/resource.h +++ b/dll/win32/browseui/resource.h @@ -104,6 +104,7 @@ #define IDR_ACLISTISF 142 #define IDR_ISFBAND 143 #define IDR_ACLCUSTOMMRU 144 +#define IDR_TASKBARLIST 145 #define IDS_SMALLICONS 12301 #define IDS_LARGEICONS 12302
6 years
1
0
0
0
[reactos] 01/02: [EXPLORER] Add TWM_GETTASKSWITCH, which seems to be used on windows to get a handle to the task switch control. This can then be used to send messages to it, like hiding/showing buttons CORE-15424
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6940d9fdf0cde5575ecfa…
commit 6940d9fdf0cde5575ecfaa947c76a5bd61910203 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 16 01:21:53 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Dec 17 20:38:38 2018 +0100 [EXPLORER] Add TWM_GETTASKSWITCH, which seems to be used on windows to get a handle to the task switch control. This can then be used to send messages to it, like hiding/showing buttons CORE-15424 --- base/shell/explorer/precomp.h | 1 + base/shell/explorer/traywnd.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h index 0f49ee6b5e..e62b6efbb7 100644 --- a/base/shell/explorer/precomp.h +++ b/base/shell/explorer/precomp.h @@ -130,6 +130,7 @@ HRESULT WINAPI _CBandSite_CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void * traywnd.c */ +#define TWM_GETTASKSWITCH (WM_USER + 236) #define TWM_OPENSTARTMENU (WM_USER + 260) #define TWM_SETTINGSCHANGED (WM_USER + 300) diff --git a/base/shell/explorer/traywnd.cpp b/base/shell/explorer/traywnd.cpp index ebea58e150..466e766da1 100644 --- a/base/shell/explorer/traywnd.cpp +++ b/base/shell/explorer/traywnd.cpp @@ -2801,6 +2801,12 @@ HandleTrayContextMenu: return TRUE; } + LRESULT OnGetTaskSwitch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + bHandled = TRUE; + return (LRESULT)m_TaskSwitch; + } + LRESULT OnHotkey(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { return HandleHotKey(wParam); @@ -3119,6 +3125,7 @@ HandleTrayContextMenu: MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged) MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu) MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows) + MESSAGE_HANDLER(TWM_GETTASKSWITCH, OnGetTaskSwitch) ALT_MSG_MAP(1) END_MSG_MAP()
6 years
1
0
0
0
[reactos] 01/01: [OLE32] Don't free handles that are just copied in the inproc case. This imports wine commit 25b136d40080a80c006b89e02708d2e248504a42, by Huw Davies and Zebediah Figura CORE-14696
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=959994b67cefbbfae862a…
commit 959994b67cefbbfae862a7461c8ac25d486aab68 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 16 22:03:26 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Dec 17 20:36:05 2018 +0100 [OLE32] Don't free handles that are just copied in the inproc case. This imports wine commit 25b136d40080a80c006b89e02708d2e248504a42, by Huw Davies and Zebediah Figura CORE-14696 --- dll/win32/ole32/usrmarshal.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/dll/win32/ole32/usrmarshal.c b/dll/win32/ole32/usrmarshal.c index 8d36e13441..3d1284a431 100644 --- a/dll/win32/ole32/usrmarshal.c +++ b/dll/win32/ole32/usrmarshal.c @@ -2036,11 +2036,29 @@ unsigned char * __RPC_USER STGMEDIUM_UserUnmarshal(ULONG *pFlags, unsigned char * which the first parameter is a ULONG. * This function is only intended to be called by the RPC runtime. */ -void __RPC_USER STGMEDIUM_UserFree(ULONG *pFlags, STGMEDIUM *pStgMedium) +void __RPC_USER STGMEDIUM_UserFree(ULONG *flags, STGMEDIUM *med) { - TRACE("(%s, %p\n", debugstr_user_flags(pFlags), pStgMedium); + TRACE("(%s, %p)\n", debugstr_user_flags(flags), med); - ReleaseStgMedium(pStgMedium); + switch (med->tymed) + { + case TYMED_NULL: + case TYMED_FILE: + case TYMED_ISTREAM: + case TYMED_ISTORAGE: + ReleaseStgMedium(med); + break; + case TYMED_HGLOBAL: + case TYMED_GDI: + case TYMED_MFPICT: + case TYMED_ENHMF: + if (LOWORD(*flags) == MSHCTX_INPROC) + med->tymed = TYMED_NULL; + ReleaseStgMedium(med); + break; + default: + RaiseException(DV_E_TYMED, 0, 0, NULL); + } } ULONG __RPC_USER ASYNC_STGMEDIUM_UserSize(ULONG *pFlags, ULONG StartingSize, ASYNC_STGMEDIUM *pStgMedium)
6 years
1
0
0
0
[reactos] 01/01: [KMTESTS:CC] Add some tests regarding small pinning size (< PAGE_SIZE)
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7375173b7fc050ce36ed5…
commit 7375173b7fc050ce36ed5796cf4d46530af87379 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Mon Dec 17 20:29:31 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Mon Dec 17 20:31:24 2018 +0100 [KMTESTS:CC] Add some tests regarding small pinning size (< PAGE_SIZE) CORE-15384 --- modules/rostests/kmtests/ntos_cc/CcPinRead_drv.c | 84 ++++++++++++++++++++++- modules/rostests/kmtests/ntos_cc/CcPinRead_user.c | 3 +- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/modules/rostests/kmtests/ntos_cc/CcPinRead_drv.c b/modules/rostests/kmtests/ntos_cc/CcPinRead_drv.c index c242f442a2..d6edb96d15 100644 --- a/modules/rostests/kmtests/ntos_cc/CcPinRead_drv.c +++ b/modules/rostests/kmtests/ntos_cc/CcPinRead_drv.c @@ -32,6 +32,7 @@ static PFILE_OBJECT TestFileObject; static PDEVICE_OBJECT TestDeviceObject; static KMT_IRP_HANDLER TestIrpHandler; static KMT_MESSAGE_HANDLER TestMessageHandler; +static BOOLEAN TestWriteCalled = FALSE; NTSTATUS TestEntry( @@ -52,6 +53,7 @@ TestEntry( TESTENTRY_NO_READONLY_DEVICE; KmtRegisterIrpHandler(IRP_MJ_READ, NULL, TestIrpHandler); + KmtRegisterIrpHandler(IRP_MJ_WRITE, NULL, TestIrpHandler); KmtRegisterMessageHandler(0, NULL, TestMessageHandler); @@ -112,6 +114,12 @@ static CC_FILE_SIZES FileSizes = { RTL_CONSTANT_LARGE_INTEGER((LONGLONG)0x4000) // .ValidDataLength }; +static CC_FILE_SIZES SmallFileSizes = { + RTL_CONSTANT_LARGE_INTEGER((LONGLONG)512), // .AllocationSize + RTL_CONSTANT_LARGE_INTEGER((LONGLONG)496), // .FileSize + RTL_CONSTANT_LARGE_INTEGER((LONGLONG)496) // .ValidDataLength +}; + static PVOID MapAndLockUserBuffer( @@ -387,7 +395,14 @@ PerformTest( TestFileObject->SectionObjectPointer = &Fcb->SectionObjectPointers; KmtStartSeh(); - CcInitializeCacheMap(TestFileObject, &FileSizes, PinAccess, &Callbacks, NULL); + if (TestId < 6) + { + CcInitializeCacheMap(TestFileObject, &FileSizes, PinAccess, &Callbacks, NULL); + } + else + { + CcInitializeCacheMap(TestFileObject, &SmallFileSizes, PinAccess, &Callbacks, NULL); + } KmtEndSeh(STATUS_SUCCESS); if (!skip(CcIsFileCached(TestFileObject) == TRUE, "CcInitializeCacheMap failed\n")) @@ -541,6 +556,24 @@ PerformTest( CcUnpinData(Bcb); } } + else if (TestId == 6) + { + Ret = FALSE; + Offset.QuadPart = 0; + + KmtStartSeh(); + Ret = CcPinRead(TestFileObject, &Offset, FileSizes.FileSize.QuadPart, PIN_WAIT, &Bcb, (PVOID *)&Buffer); + KmtEndSeh(STATUS_SUCCESS); + + if (!skip(Ret == TRUE, "CcPinRead failed\n")) + { + ok_bcb(Bcb, PAGE_SIZE * 4, Offset.QuadPart); + RtlFillMemory(Buffer, 0xbd, FileSizes.FileSize.LowPart); + CcSetDirtyPinnedData(Bcb, NULL); + + CcUnpinData(Bcb); + } + } } } } @@ -575,12 +608,22 @@ CleanupTest( TestFileObject->SectionObjectPointer = NULL; } + if (TestTestId == 6) + { + ok_bool_true(TestWriteCalled, "Write was not called!\n"); + } + else + { + ok_bool_false(TestWriteCalled, "Write was unexpectedly called\n"); + } + ObDereferenceObject(TestFileObject); } TestFileObject = NULL; TestDeviceObject = NULL; TestTestId = -1; + TestWriteCalled = FALSE; } @@ -631,7 +674,8 @@ TestIrpHandler( PAGED_CODE(); DPRINT("IRP %x/%x\n", IoStack->MajorFunction, IoStack->MinorFunction); - ASSERT(IoStack->MajorFunction == IRP_MJ_READ); + ASSERT(IoStack->MajorFunction == IRP_MJ_READ || + IoStack->MajorFunction == IRP_MJ_WRITE); FsRtlEnterFileSystem(); @@ -677,6 +721,42 @@ TestIrpHandler( Irp->IoStatus.Information = Length; } + else if (IoStack->MajorFunction == IRP_MJ_WRITE) + { + PMDL Mdl; + ULONG Length; + PVOID Buffer; + LARGE_INTEGER Offset; + + Offset = IoStack->Parameters.Write.ByteOffset; + Length = IoStack->Parameters.Write.Length; + + ok(TestTestId == 6, "Unexpected test id: %d\n", TestTestId); + ok_eq_pointer(DeviceObject, TestDeviceObject); + ok_eq_pointer(IoStack->FileObject, TestFileObject); + + ok(FlagOn(Irp->Flags, IRP_NOCACHE), "Not coming from Cc\n"); + + ok_irql(PASSIVE_LEVEL); + ok(Offset.QuadPart == 0, "Offset is not null: %I64i\n", Offset.QuadPart); + ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length); + ok(Length == PAGE_SIZE * 4, "Length is not MappedLength-sized: %I64i\n", Length); + + Buffer = MapAndLockUserBuffer(Irp, Length); + ok(Buffer != NULL, "Null pointer!\n"); + + Mdl = Irp->MdlAddress; + ok(Mdl != NULL, "Null pointer for MDL!\n"); + ok((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0, "MDL not locked\n"); + ok((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0, "MDL from non paged\n"); + ok((Irp->Flags & IRP_PAGING_IO) != 0, "Non paging IO\n"); + + ok_bool_false(TestWriteCalled, "Write has been unexpectedly called twice!\n"); + TestWriteCalled = TRUE; + + Status = STATUS_SUCCESS; + Irp->IoStatus.Information = Length; + } if (Status == STATUS_PENDING) { diff --git a/modules/rostests/kmtests/ntos_cc/CcPinRead_user.c b/modules/rostests/kmtests/ntos_cc/CcPinRead_user.c index e8e78cbc44..c0878435fe 100644 --- a/modules/rostests/kmtests/ntos_cc/CcPinRead_user.c +++ b/modules/rostests/kmtests/ntos_cc/CcPinRead_user.c @@ -22,8 +22,9 @@ START_TEST(CcPinRead) * 1 test for BCB * 1 test for pinning access * 1 test for length/offset + * 1 test for read/write size */ - for (TestId = 0; TestId < 6; ++TestId) + for (TestId = 0; TestId < 7; ++TestId) { Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId); ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
6 years
1
0
0
0
[reactos] 01/01: [SHELL32] Add backslash if path was like C: (#1152)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=932a812c66a6ee041f2f0…
commit 932a812c66a6ee041f2f032fd25c2344c6a09db3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 17 22:42:18 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 17 22:42:18 2018 +0900 [SHELL32] Add backslash if path was like C: (#1152) CORE-15434 --- dll/win32/shell32/shlexec.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp index 6b7878d6f2..b745d40de1 100644 --- a/dll/win32/shell32/shlexec.cpp +++ b/dll/win32/shell32/shlexec.cpp @@ -2422,6 +2422,11 @@ HRESULT WINAPI ShellExecCmdLine( else { pchParams = SplitParams(lpCommand, szFile, _countof(szFile)); + if (szFile[0] != UNICODE_NULL && szFile[1] == L':' && + szFile[2] == UNICODE_NULL) + { + PathAddBackslashW(szFile); + } if (SearchPathW(NULL, szFile, NULL, _countof(szFile2), szFile2, NULL) || SearchPathW(NULL, szFile, wszExe, _countof(szFile2), szFile2, NULL) || SearchPathW(NULL, szFile, wszCom, _countof(szFile2), szFile2, NULL) ||
6 years
1
0
0
0
[reactos] 01/01: [SHELL32] 'Run' dialog box should accept URL (#1153)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c94ca8128d7c93f3d513a…
commit c94ca8128d7c93f3d513a9d9ff2f9605c9523c13 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 17 22:37:51 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 17 22:37:51 2018 +0900 [SHELL32] 'Run' dialog box should accept URL (#1153) Fix ShellExecCmdLine function. CORE-15455, CORE-11772 --- dll/win32/shell32/shlexec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp index 09ccfec0a3..6b7878d6f2 100644 --- a/dll/win32/shell32/shlexec.cpp +++ b/dll/win32/shell32/shlexec.cpp @@ -2414,7 +2414,7 @@ HRESULT WINAPI ShellExecCmdLine( } } - if (UrlIsFileUrlW(lpCommand)) + if (PathIsURLW(lpCommand) || UrlIsW(lpCommand, URLIS_APPLIABLE)) { StringCchCopyW(szFile, _countof(szFile), lpCommand); pchParams = NULL;
6 years
1
0
0
0
[reactos] 01/01: [SHELL32] Add CDefView::DefMessageSFVCB (Retrial of #1145) (#1151)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5525c81b2f0663cfabff3…
commit 5525c81b2f0663cfabff3773d8099c5f7cdcf3ab Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 17 19:22:31 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 17 19:22:31 2018 +0900 [SHELL32] Add CDefView::DefMessageSFVCB (Retrial of #1145) (#1151) CORE-14976 --- dll/win32/shell32/CDefView.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index 640bb143ff..b382dcd31f 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -128,6 +128,7 @@ class CDefView : BOOL CreateList(); void UpdateListColors(); BOOL InitList(); + HRESULT DefMessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam); static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData); PCUITEMID_CHILD _PidlByItem(int i); @@ -3263,13 +3264,29 @@ HRESULT CDefView::_MergeToolbar() return S_OK; } +// The default processing of IShellFolderView callbacks +HRESULT CDefView::DefMessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + // TODO: SFVM_GET_CUSTOMVIEWINFO, SFVM_WINDOWCREATED + TRACE("CDefView::DefMessageSFVCB uMsg=%u\n", uMsg); + return E_NOTIMPL; +} + HRESULT CDefView::_DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam) { + HRESULT hr = E_NOTIMPL; + if (m_pShellFolderViewCB) { - return m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam); + hr = m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam); } - return E_NOINTERFACE; + + if (hr == E_NOTIMPL) + { + hr = DefMessageSFVCB(uMsg, wParam, lParam); + } + + return hr; } HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID * ppvOut)
6 years
1
0
0
0
[reactos] 01/01: [VCDCONTROLTOOL] Add Russian translation
by Oleg Dubinskiy
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=21a0846affe90c1c1e755…
commit 21a0846affe90c1c1e755b551867272eea209134 Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua> AuthorDate: Mon Dec 17 09:09:08 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Mon Dec 17 08:09:08 2018 +0100 [VCDCONTROLTOOL] Add Russian translation --- .../applications/vcdcontroltool/lang/ru-RU.rc | 62 ++++++++++++++++++++++ .../applications/vcdcontroltool/vcdcontroltool.rc | 3 ++ 2 files changed, 65 insertions(+) diff --git a/modules/rosapps/applications/vcdcontroltool/lang/ru-RU.rc b/modules/rosapps/applications/vcdcontroltool/lang/ru-RU.rc new file mode 100644 index 0000000000..5dab9a720d --- /dev/null +++ b/modules/rosapps/applications/vcdcontroltool/lang/ru-RU.rc @@ -0,0 +1,62 @@ +LANGUAGE LANG_RUSSIAN, SUBLANG_NEUTRAL + +IDD_MAINWINDOW DIALOGEX 0, 0, 320, 200 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Панель управления виртуальным CDRom" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "OK", IDC_MAINOK, 214, 179, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_MAINDEVICES, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 7, 7, 306, 83 + GROUPBOX "Геометрия диска", IDC_STATIC, 7, 101, 153, 74, BS_GROUPBOX | WS_CHILD | WS_VISIBLE + LTEXT "Количество секторов", IDC_STATIC, 15, 115, 71, 9, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Размер сектора", IDC_STATIC, 15, 127, 52, 9, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Свободно кластеров", IDC_STATIC, 15, 139, 69, 9, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Всего кластеров", IDC_STATIC, 15, 151, 55, 9, WS_CHILD | WS_VISIBLE | WS_GROUP + EDITTEXT IDC_MAINSECTORS, 88, 115, 49, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_MAINSIZE, 88, 127, 49, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_MAINFREE, 88, 139, 49, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_MAINTOTAL, 88, 151, 49, 12, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP + PUSHBUTTON "&Добавить диск", IDC_MAINADD, 173, 123, 64, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Удалить диск", IDC_MAINREMOVE, 240, 123, 64, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Монтировать", IDC_MAINMOUNT, 173, 142, 64, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Извлечь", IDC_MAINEJECT, 173, 161, 131, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Перемонтировать", IDC_MAINREMOUNT, 240, 142, 64, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Управление драйвером ...", IDC_MAINCONTROL, 173, 105, 131, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_MOUNTWINDOW DIALOG 0, 0, 187, 97 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Особые опции монтирования" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "OK", IDC_MOUNTOK, 130, 59, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Отменить", IDC_MOUNTCANCEL, 130, 76, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + EDITTEXT IDC_MOUNTIMAGE, 7, 17, 173, 14, ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP + LTEXT "Образ для монтирования", IDC_STATIC, 7, 7, 173, 10, SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE | WS_GROUP + AUTOCHECKBOX "Подавление UDF", IDC_MOUNTUDF, 7, 40, 114, 10, BS_FLAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP + AUTOCHECKBOX "Подавление Joliet", IDC_MOUNTJOLIET, 7, 56, 111, 9, BS_FLAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP + AUTOCHECKBOX "Постоянное монтирование", IDC_MOUNTPERSIST, 7, 71, 111, 9, BS_FLAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +IDD_DRIVERWINDOW DIALOG 0, 0, 194, 123 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Управление драйвером виртуального CD-ROM" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "OK", IDC_DRIVEROK, 13, 98, 165, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Установить драйвер ...", IDC_DRIVERINSTALL, 13, 61, 81, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Запустить", IDC_DRIVERSTART, 13, 79, 81, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Остановить", IDC_DRIVERSTOP, 97, 79, 81, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "Удалить драйвер", IDC_DRIVERREMOVE, 97, 61, 81, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + EDITTEXT IDC_DRIVERINFO, 7, 7, 178, 50, ES_CENTER | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP +END + +STRINGTABLE +BEGIN + IDS_DRIVE "Диск" + IDS_MAPPEDIMAGE "Сопоставленный образ" + IDS_NOMOUNTED "Нет примонтированного образа. Последний был - %s" + IDS_NONE "Нет" + IDS_FILTER "Все поддерживаемые образы (*.udf; *.cdfs; *.jo; *.iso; *.rock)\0*.udf;*.cdfs;*.jo;*.iso;*.rock\0" +END diff --git a/modules/rosapps/applications/vcdcontroltool/vcdcontroltool.rc b/modules/rosapps/applications/vcdcontroltool/vcdcontroltool.rc index 4edbf8ce8f..969f3e407d 100644 --- a/modules/rosapps/applications/vcdcontroltool/vcdcontroltool.rc +++ b/modules/rosapps/applications/vcdcontroltool/vcdcontroltool.rc @@ -22,3 +22,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_FR_FR #include "lang/fr-FR.rc" #endif +#ifdef LANGUAGE_RU_RU + #include "lang/ru-RU.rc" +#endif
6 years
1
0
0
0
[reactos] 01/01: [KBDROST][NTDLL_APITEST] Revert #1135 (Delete UTF-8 BOM) (#1149)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e2e63e10d15e29921272…
commit 2e2e63e10d15e299212720cdab0ea753bd9e6ee8 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Dec 17 11:29:35 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Dec 17 11:29:35 2018 +0900 [KBDROST][NTDLL_APITEST] Revert #1135 (Delete UTF-8 BOM) (#1149) CORE-15447 --- dll/keyboard/kbdrost/kbdrost.c | 2 +- modules/rostests/apitests/ntdll/RtlGenerate8dot3Name.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/keyboard/kbdrost/kbdrost.c b/dll/keyboard/kbdrost/kbdrost.c index 419c964721..99a12188c2 100644 --- a/dll/keyboard/kbdrost/kbdrost.c +++ b/dll/keyboard/kbdrost/kbdrost.c @@ -1,4 +1,4 @@ -/* +/* * ReactOS Romanian (Standard) Keyboard layout * Copyright (C) 2018 ReactOS * Author: Ștefan Fulea (stefan dot fulea at mail dot com) diff --git a/modules/rostests/apitests/ntdll/RtlGenerate8dot3Name.c b/modules/rostests/apitests/ntdll/RtlGenerate8dot3Name.c index ec16e7d4ac..0c1da43bc9 100644 --- a/modules/rostests/apitests/ntdll/RtlGenerate8dot3Name.c +++ b/modules/rostests/apitests/ntdll/RtlGenerate8dot3Name.c @@ -1,4 +1,4 @@ -/* +/* * PROJECT: ReactOS api tests * LICENSE: GPLv2+ - See COPYING in the top level directory * PURPOSE: Test for RtlGenerate8dot3Name
6 years
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
33
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Results per page:
10
25
50
100
200