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: [BROWSEUI] Add backslash for directory (#1121)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c64d31e9b86eec94d0c1a…
commit c64d31e9b86eec94d0c1abcd296bc74b15fd5250 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 13 20:04:02 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 13 20:04:02 2018 +0900 [BROWSEUI] Add backslash for directory (#1121) CORE-15434 --- dll/win32/browseui/parsecmdline.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dll/win32/browseui/parsecmdline.cpp b/dll/win32/browseui/parsecmdline.cpp index 855c089079..4ea538a4b9 100644 --- a/dll/win32/browseui/parsecmdline.cpp +++ b/dll/win32/browseui/parsecmdline.cpp @@ -382,6 +382,9 @@ SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pInfo) { // Or just a plain old string. + if (PathIsDirectoryW(strField)) + PathAddBackslash(strField); + WCHAR szPath[MAX_PATH]; DWORD result = GetFullPathNameW(strField, _countof(szPath), szPath, NULL);
6 years
1
0
0
0
[reactos] 01/01: [REGEDIT] Set background brush to child window (#1122)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63a0ac04612a1a3f51543…
commit 63a0ac04612a1a3f51543d4a2c35b71bfb1ebc0c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Dec 13 20:00:27 2018 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Thu Dec 13 20:00:27 2018 +0900 [REGEDIT] Set background brush to child window (#1122) This commit fixes a problem with drawing of splitter. CORE-15442 --- base/applications/regedit/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c index fc187689ec..e85e62f51b 100644 --- a/base/applications/regedit/main.c +++ b/base/applications/regedit/main.c @@ -83,6 +83,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) wcChild.hInstance = hInstance; wcChild.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_REGEDIT)); wcChild.hCursor = LoadCursorW(NULL, IDC_ARROW); + wcChild.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); wcChild.lpszClassName = szChildClass; wcChild.hIconSm = (HICON)LoadImageW(hInstance, MAKEINTRESOURCEW(IDI_REGEDIT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
6 years
1
0
0
0
[reactos] 01/01: [ROSAUTOTEST] Force HTTPS
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec96bf8e5c040e844b697…
commit ec96bf8e5c040e844b6975b980ed0c73d25bba77 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Thu Dec 13 11:54:59 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Thu Dec 13 11:54:59 2018 +0100 [ROSAUTOTEST] Force HTTPS ONLINE-855 --- modules/rostests/rosautotest/CWebService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/rosautotest/CWebService.cpp b/modules/rostests/rosautotest/CWebService.cpp index 2a01baa9cb..850b466117 100644 --- a/modules/rostests/rosautotest/CWebService.cpp +++ b/modules/rostests/rosautotest/CWebService.cpp @@ -69,7 +69,7 @@ CWebService::DoRequest(const string& InputData) DWORD DataLength; /* Post our test results to the web service */ - m_hHTTPRequest = HttpOpenRequestW(m_hHTTP, L"POST", szServerFile, NULL, NULL, NULL, INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0); + m_hHTTPRequest = HttpOpenRequestW(m_hHTTP, L"POST", szServerFile, NULL, NULL, NULL, INTERNET_FLAG_SECURE | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0); if(!m_hHTTPRequest) FATAL("HttpOpenRequestW failed\n");
6 years
1
0
0
0
[reactos] 01/01: [ROSAUTOTEST] Forget about HTTP, go over HTTPS directly
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a062160b295ff62d36aca…
commit a062160b295ff62d36aca0642888478c7872a047 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Thu Dec 13 11:49:13 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Thu Dec 13 11:49:13 2018 +0100 [ROSAUTOTEST] Forget about HTTP, go over HTTPS directly ONLINE-855 --- modules/rostests/rosautotest/CWebService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/rosautotest/CWebService.cpp b/modules/rostests/rosautotest/CWebService.cpp index c3c1605bf9..2a01baa9cb 100644 --- a/modules/rostests/rosautotest/CWebService.cpp +++ b/modules/rostests/rosautotest/CWebService.cpp @@ -26,7 +26,7 @@ CWebService::CWebService() if(!m_hInet) FATAL("InternetOpenW failed\n"); - m_hHTTP = InternetConnectW(m_hInet, szHostname, INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); + m_hHTTP = InternetConnectW(m_hInet, szHostname, INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); if(!m_hHTTP) FATAL("InternetConnectW failed\n");
6 years
1
0
0
0
[reactos] 01/01: [ROSAUTOTEST] Allow transparent redirection to HTTPS URLs
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d223627411a0622cec53…
commit 1d223627411a0622cec53b545c0bd3f4972443ce Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Thu Dec 13 11:45:43 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Thu Dec 13 11:45:43 2018 +0100 [ROSAUTOTEST] Allow transparent redirection to HTTPS URLs ONLINE-855 --- modules/rostests/rosautotest/CWebService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/rosautotest/CWebService.cpp b/modules/rostests/rosautotest/CWebService.cpp index 5d1e03ab07..c3c1605bf9 100644 --- a/modules/rostests/rosautotest/CWebService.cpp +++ b/modules/rostests/rosautotest/CWebService.cpp @@ -69,7 +69,7 @@ CWebService::DoRequest(const string& InputData) DWORD DataLength; /* Post our test results to the web service */ - m_hHTTPRequest = HttpOpenRequestW(m_hHTTP, L"POST", szServerFile, NULL, NULL, NULL, INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0); + m_hHTTPRequest = HttpOpenRequestW(m_hHTTP, L"POST", szServerFile, NULL, NULL, NULL, INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0); if(!m_hHTTPRequest) FATAL("HttpOpenRequestW failed\n");
6 years
1
0
0
0
[reactos] 01/01: [MAINTAINERS] Add the vcdcontroltool app
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63b00d81463b5c4686fa8…
commit 63b00d81463b5c4686fa80c6e6386408a0e0de20 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Wed Dec 12 21:12:39 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Wed Dec 12 21:12:39 2018 +0100 [MAINTAINERS] Add the vcdcontroltool app --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 28ae7ee4de..84334c354f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -208,6 +208,7 @@ Virtual CD-ROM M: HeisSpiter, Pierre Schweitzer S: Maintained F: modules/rosapps/applications/cmdutils/vcdcli/ + F: modules/rosapps/applications/vcdcontroltool/ F: modules/rosapps/drivers/vcdrom/ Virtual Floppy Disk
6 years
1
0
0
0
[reactos] 01/01: [WS2_32_APITEST] Fix 'inialialization' typo, in comments (#1119)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4918271a3c24755b0bba5…
commit 4918271a3c24755b0bba5c48576851d661b38b4d Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Wed Dec 12 20:24:07 2018 +0100 Commit: Robert Naumann <gonzomdx(a)gmail.com> CommitDate: Wed Dec 12 20:24:07 2018 +0100 [WS2_32_APITEST] Fix 'inialialization' typo, in comments (#1119) --- modules/rostests/apitests/ws2_32/WSAAsync.c | 8 ++++---- modules/rostests/apitests/ws2_32/nonblocking.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/rostests/apitests/ws2_32/WSAAsync.c b/modules/rostests/apitests/ws2_32/WSAAsync.c index 6d784f1e16..13db2219ea 100644 --- a/modules/rostests/apitests/ws2_32/WSAAsync.c +++ b/modules/rostests/apitests/ws2_32/WSAAsync.c @@ -91,13 +91,13 @@ START_TEST(WSAAsync) server_addr_in.sin_port = htons(SVR_PORT); memcpy(&server_addr_in.sin_addr.S_un.S_addr, ent->h_addr_list[0], 4); - // server inialialization + // Server initialization. trace("Initializing server and client connections ...\n"); ok(bind(ServerSocket, (struct sockaddr*)&server_addr_in, sizeof(server_addr_in)) == 0, "ERROR: server bind failed\n"); ok(ioctlsocket(ServerSocket, FIONBIO, &ulValue) == 0, "ERROR: server ioctlsocket FIONBIO failed\n"); ok(WSAEventSelect(ServerSocket, ServerEvent, FD_ACCEPT | FD_CLOSE) == 0, "ERROR: server accept EventSelect failed\n"); - // client inialialization + // Client initialization. ok(WSAEventSelect(ClientSocket, ClientEvent, FD_CONNECT | FD_CLOSE) == 0, "ERROR: client EventSelect failed\n"); ok(ioctlsocket(ClientSocket, FIONBIO, &ulValue) == 0, "ERROR: client ioctlsocket FIONBIO failed\n"); @@ -193,12 +193,12 @@ START_TEST(WSAAsync) server_addr_in.sin_port = htons(SVR_PORT); memcpy(&server_addr_in.sin_addr.S_un.S_addr, ent->h_addr_list[0], 4); - // server inialialization + // Server initialization. trace("Initializing server and client connections ...\n"); ok(bind(ServerSocket, (struct sockaddr*)&server_addr_in, sizeof(server_addr_in)) == 0, "ERROR: server bind failed\n"); ok(ioctlsocket(ServerSocket, FIONBIO, &ulValue) == 0, "ERROR: server ioctlsocket FIONBIO failed\n"); - // client inialialization + // Client initialization. ok(ioctlsocket(ClientSocket, FIONBIO, &ulValue) == 0, "ERROR: client ioctlsocket FIONBIO failed\n"); // listen diff --git a/modules/rostests/apitests/ws2_32/nonblocking.c b/modules/rostests/apitests/ws2_32/nonblocking.c index 29e6e38ac1..31db502f23 100644 --- a/modules/rostests/apitests/ws2_32/nonblocking.c +++ b/modules/rostests/apitests/ws2_32/nonblocking.c @@ -58,14 +58,14 @@ START_TEST(nonblocking) server_addr_in.sin_addr.s_addr = INADDR_ANY; server_addr_in.sin_port = htons(SVR_PORT); - // server inialialization + // Server initialization. trace("Initializing server and client connections ...\n"); err = bind(ServerSocket, (struct sockaddr*)&server_addr_in, sizeof(server_addr_in)); ok(err == 0, "ERROR: server bind failed\n"); err = ioctlsocket(ServerSocket, FIONBIO, &ulValue); ok(err == 0, "ERROR: server ioctlsocket FIONBIO failed\n"); - // client inialialization + // Client initialization. err = ioctlsocket(ClientSocket, FIONBIO, &ulValue); ok(err == 0, "ERROR: client ioctlsocket FIONBIO failed\n");
6 years
1
0
0
0
[reactos] 01/01: [SFC_APITEST] Initial test for SfcIsFileProtected and SfcGetFiles
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f386a6ec410eb778deb7f…
commit f386a6ec410eb778deb7f999fc5805092cc139f8 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Nov 25 19:52:20 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Wed Dec 12 19:33:44 2018 +0100 [SFC_APITEST] Initial test for SfcIsFileProtected and SfcGetFiles --- modules/rostests/apitests/CMakeLists.txt | 1 + modules/rostests/apitests/sfc/CMakeLists.txt | 10 ++ modules/rostests/apitests/sfc/SfcGetFiles.c | 83 +++++++++++++++ modules/rostests/apitests/sfc/SfcIsFileProtected.c | 116 +++++++++++++++++++++ modules/rostests/apitests/sfc/testlist.c | 12 +++ 5 files changed, 222 insertions(+) diff --git a/modules/rostests/apitests/CMakeLists.txt b/modules/rostests/apitests/CMakeLists.txt index 5312b2838f..ec5048551e 100644 --- a/modules/rostests/apitests/CMakeLists.txt +++ b/modules/rostests/apitests/CMakeLists.txt @@ -29,6 +29,7 @@ add_subdirectory(pefile) add_subdirectory(powrprof) add_subdirectory(sdk) add_subdirectory(setupapi) +add_subdirectory(sfc) add_subdirectory(shell32) add_subdirectory(shlwapi) add_subdirectory(spoolss) diff --git a/modules/rostests/apitests/sfc/CMakeLists.txt b/modules/rostests/apitests/sfc/CMakeLists.txt new file mode 100644 index 0000000000..1d51f0b6a1 --- /dev/null +++ b/modules/rostests/apitests/sfc/CMakeLists.txt @@ -0,0 +1,10 @@ + +list(APPEND SOURCE + SfcGetFiles.c + SfcIsFileProtected.c + testlist.c) + +add_executable(sfc_apitest ${SOURCE}) +set_module_type(sfc_apitest win32cui) +add_importlibs(sfc_apitest msvcrt user32 kernel32 ntdll) +add_rostests_file(TARGET sfc_apitest) diff --git a/modules/rostests/apitests/sfc/SfcGetFiles.c b/modules/rostests/apitests/sfc/SfcGetFiles.c new file mode 100644 index 0000000000..edcf3cb7e0 --- /dev/null +++ b/modules/rostests/apitests/sfc/SfcGetFiles.c @@ -0,0 +1,83 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for SfcGetFiles + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include <apitest.h> +#include <strsafe.h> +#include <ndk/umtypes.h> + +typedef struct _PROTECT_FILE_ENTRY { + PWSTR SourceFileName; + PWSTR FileName; + PWSTR InfName; +} PROTECT_FILE_ENTRY, *PPROTECT_FILE_ENTRY; + +NTSTATUS (WINAPI *SfcGetFiles)(PPROTECT_FILE_ENTRY* ProtFileData, PULONG FileCount); + +PCWSTR wszEnvVars[] = +{ + L"%systemroot%", + L"%commonprogramfiles%", + L"%ProgramFiles%", + L"%systemdrive%" +}; + +static void Test_GetFiles() +{ + PPROTECT_FILE_ENTRY FileData; + PCWSTR Ptr; + ULONG FileCount, n, j; + NTSTATUS Status; + + Status = SfcGetFiles(&FileData, &FileCount); + ok(NT_SUCCESS(Status), "SfcGetFiles failed: 0x%lx\n", Status); + + if (!NT_SUCCESS(Status)) + return; + + for (n = 0; n < FileCount; ++n) + { + PPROTECT_FILE_ENTRY Entry = FileData + n; + + ok(Entry->FileName != NULL, "Entry %lu without FileName!", n); + if (Entry->FileName) + { + Ptr = NULL; + for (j = 0; j < _countof(wszEnvVars); ++j) + { + Ptr = wcsstr(Entry->FileName, wszEnvVars[j]); + if (Ptr) + break; + } + ok(Ptr != NULL, "Expected to find one match from wszEnvVars in %s\n", wine_dbgstr_w(Entry->FileName)); + } + if (Entry->InfName) + { + Ptr = wcsstr(Entry->InfName, L".inf"); + ok(Ptr == (Entry->InfName + wcslen(Entry->InfName) - 4), + ".inf not found in %s\n", wine_dbgstr_w(Entry->InfName)); + } + } +} + +START_TEST(SfcGetFiles) +{ + HMODULE mod; + + mod = LoadLibraryA("sfcfiles.dll"); + if (!mod) + { + skip("sfcfiles.dll not found\n"); + return; + } + + SfcGetFiles = (void*)GetProcAddress(mod, "SfcGetFiles"); + ok(SfcGetFiles != NULL, "Function not exported!\n"); + if (!SfcGetFiles) + return; + + Test_GetFiles(); +} diff --git a/modules/rostests/apitests/sfc/SfcIsFileProtected.c b/modules/rostests/apitests/sfc/SfcIsFileProtected.c new file mode 100644 index 0000000000..6bcf7e904d --- /dev/null +++ b/modules/rostests/apitests/sfc/SfcIsFileProtected.c @@ -0,0 +1,116 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for SfcIsFileProtected + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include <apitest.h> +#include <strsafe.h> +#include <ndk/umtypes.h> +#include <ndk/rtlfuncs.h> + +BOOL (WINAPI *SfcIsFileProtected)(HANDLE RpcHandle,LPCWSTR ProtFileName); +static DWORD g_WinVersion; + +typedef struct _osrange +{ + DWORD Min; + DWORD Max; +} osrange; + +typedef struct _testdata +{ + PCWSTR Path; + BOOL Expand; + osrange Success; +} testdata; + + +#define _WIN32_WINNT_MINVER 0x0001 + +#define MAKERANGE(from, to) \ + { _WIN32_WINNT_ ## from, _WIN32_WINNT_ ## to } + +#define PASS(from, to) \ + MAKERANGE(from, to) + +static testdata tests[] = +{ + { L"%systemroot%\\system32\\kernel32.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%SYSTEMROOT%\\SYSTEM32\\KERNEL32.DLL", TRUE, PASS(MINVER, WIN10) }, + /* Paths are normalized on newer windows */ + { L"%systemroot%//system32\\kernel32.dll", TRUE, PASS(VISTA, WIN10) }, + { L"%systemroot%\\system32\\..\\system32\\kernel32.dll", TRUE, PASS(VISTA, WIN10) }, + + /* These are rejected as-is */ + { L"kernel32.dll", FALSE, PASS(MINVER, MINVER) }, + { L"%systemroot%//system32\\kernel32.dll", FALSE, PASS(MINVER, MINVER) }, + /* Environment strings are expanded on older windows */ + { L"%systemroot%\\system32\\kernel32.dll", FALSE, PASS(MINVER, WS03) }, + { L"%SYSTEMROOT%\\SYSTEM32\\KERNEL32.DLL", FALSE, PASS(MINVER, WS03) }, + + /* Show some files under SFC protection */ + { L"%systemroot%\\system32\\user32.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\shell32.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\browseui.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\apphelp.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\sfc.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\sfc_os.dll", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\sdbinst.exe", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\AppPatch\\sysmain.sdb", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\fonts\\tahoma.ttf", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\fonts\\tahomabd.ttf", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\ntoskrnl.exe", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\system32\\c_1252.nls", TRUE, PASS(MINVER, WIN10) }, + { L"%systemroot%\\NOTEPAD.EXE", TRUE, PASS(MINVER, WIN10) }, +}; + + +static void Test_ProtectedFiles() +{ + ULONG n; + BOOL Protected; + WCHAR Buffer[MAX_PATH * 3]; + + for (n = 0; n < _countof(tests); ++n) + { + if (tests[n].Expand) + ExpandEnvironmentStringsW(tests[n].Path, Buffer, _countof(Buffer)); + else + StringCchCopyW(Buffer, _countof(Buffer), tests[n].Path); + + Protected = SfcIsFileProtected(NULL, Buffer); + + if (g_WinVersion >= tests[n].Success.Min && g_WinVersion <= tests[n].Success.Max) + { + ok(Protected, "[%lu,0x%04lx]: Failed: %S\n", n, g_WinVersion, Buffer); + } + else + { + ok(!Protected, "[%lu,0x%04lx]: Succeeded: %S\n", n, g_WinVersion, Buffer); + } + } +} + + +START_TEST(SfcIsFileProtected) +{ + RTL_OSVERSIONINFOW rtlinfo = { sizeof(rtlinfo) }; + HMODULE mod; + + mod = LoadLibraryA("sfc_os.dll"); + ok(mod != NULL, "Unable to load sfc_os: 0x%lu\n", GetLastError()); + if (!mod) + return; + + SfcIsFileProtected = (void*)GetProcAddress(mod, "SfcIsFileProtected"); + ok(SfcIsFileProtected != NULL, "Unable to resolve SfcIsFileProtected: 0x%lu\n", GetLastError()); + if (!SfcIsFileProtected) + return; + + RtlGetVersion(&rtlinfo); + g_WinVersion = (rtlinfo.dwMajorVersion << 8) | rtlinfo.dwMinorVersion; + + Test_ProtectedFiles(); +} diff --git a/modules/rostests/apitests/sfc/testlist.c b/modules/rostests/apitests/sfc/testlist.c new file mode 100644 index 0000000000..d75f811458 --- /dev/null +++ b/modules/rostests/apitests/sfc/testlist.c @@ -0,0 +1,12 @@ +#define STANDALONE +#include <apitest.h> + +extern void func_SfcGetFiles(void); +extern void func_SfcIsFileProtected(void); + +const struct test winetest_testlist[] = +{ + { "SfcGetFiles", func_SfcGetFiles }, + { "SfcIsFileProtected", func_SfcIsFileProtected }, + { 0, 0 } +};
6 years
1
0
0
0
[reactos] 03/03: [SHELL32] Add IActiveDesktop stub CORE-15424
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc2f0a8868ed4b1825604…
commit cc2f0a8868ed4b182560459bfca4738e148f56c8 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 9 16:11:14 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Wed Dec 12 19:29:09 2018 +0100 [SHELL32] Add IActiveDesktop stub CORE-15424 --- dll/win32/shell32/CActiveDesktop.cpp | 156 ++++++++++++++++++++++++++++ dll/win32/shell32/CActiveDesktop.h | 65 ++++++++++++ dll/win32/shell32/CMakeLists.txt | 2 + dll/win32/shell32/precomp.h | 2 + dll/win32/shell32/res/rgs/activedesktop.rgs | 13 +++ dll/win32/shell32/rgs_res.rc | 1 + dll/win32/shell32/shell32.cpp | 1 + dll/win32/shell32/shresdef.h | 1 + 8 files changed, 241 insertions(+) diff --git a/dll/win32/shell32/CActiveDesktop.cpp b/dll/win32/shell32/CActiveDesktop.cpp new file mode 100644 index 0000000000..abc47e3e15 --- /dev/null +++ b/dll/win32/shell32/CActiveDesktop.cpp @@ -0,0 +1,156 @@ +/* + * PROJECT: shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: IActiveDesktop stub + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include "precomp.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell_ad); + +/*********************************************************************** +* IActiveDesktop implementation +*/ + +CActiveDesktop::CActiveDesktop() +{ + UNIMPLEMENTED; +} + +CActiveDesktop::~CActiveDesktop() +{ + UNIMPLEMENTED; +} + +HRESULT WINAPI CActiveDesktop::ApplyChanges(DWORD dwFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::SetPattern(PCWSTR pwszPattern, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetDesktopItemCount(int *pcItems, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + + +/*********************************************************************** +* IPropertyBag implementation +*/ + +HRESULT WINAPI CActiveDesktop::Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT WINAPI CActiveDesktop::Write(LPCOLESTR pszPropName, VARIANT *pVar) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + diff --git a/dll/win32/shell32/CActiveDesktop.h b/dll/win32/shell32/CActiveDesktop.h new file mode 100644 index 0000000000..d11f751b26 --- /dev/null +++ b/dll/win32/shell32/CActiveDesktop.h @@ -0,0 +1,65 @@ +/* + * PROJECT: shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: IActiveDesktop header + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#ifndef _CACTIVEDESKTOP_H_ +#define _CACTIVEDESKTOP_H_ + +#undef AddDesktopItem + +class CActiveDesktop : + public CComCoClass<CActiveDesktop, &CLSID_ActiveDesktop>, + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IActiveDesktop, + //public IActiveDesktopP, + //public IADesktopP2, + public IPropertyBag +{ +public: + CActiveDesktop(); + virtual ~CActiveDesktop(); + + /*** IActiveDesktop methods ***/ + virtual HRESULT WINAPI ApplyChanges(DWORD dwFlags); + virtual HRESULT WINAPI GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags); + virtual HRESULT WINAPI SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved); + virtual HRESULT WINAPI GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved); + virtual HRESULT WINAPI SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved); + virtual HRESULT WINAPI GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved); + virtual HRESULT WINAPI SetPattern(PCWSTR pwszPattern, DWORD dwReserved); + virtual HRESULT WINAPI GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved); + virtual HRESULT WINAPI SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved); + virtual HRESULT WINAPI AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags); + virtual HRESULT WINAPI RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI GetDesktopItemCount(int *pcItems, DWORD dwReserved); + virtual HRESULT WINAPI GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved); + virtual HRESULT WINAPI AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags); + virtual HRESULT WINAPI GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved); + + /*** IPropertyBag methods ***/ + virtual HRESULT STDMETHODCALLTYPE Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog); + virtual HRESULT STDMETHODCALLTYPE Write(LPCOLESTR pszPropName, VARIANT *pVar); + + +DECLARE_REGISTRY_RESOURCEID(IDR_ACTIVEDESKTOP) +DECLARE_NOT_AGGREGATABLE(CActiveDesktop) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CActiveDesktop) + COM_INTERFACE_ENTRY_IID(IID_IActiveDesktop, IActiveDesktop) + //COM_INTERFACE_ENTRY_IID(IID_IActiveDesktopP, IActiveDesktopP) + //COM_INTERFACE_ENTRY_IID(IID_IADesktopP2, IADesktopP2) + COM_INTERFACE_ENTRY_IID(IID_IPropertyBag, IPropertyBag) +END_COM_MAP() +}; + + +#endif // _CACTIVEDESKTOP_H_ diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index c5d247abba..08933dda35 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -25,6 +25,8 @@ include_directories( ${REACTOS_SOURCE_DIR}) list(APPEND SOURCE + CActiveDesktop.cpp + CActiveDesktop.h CIDLDataObj.cpp CQueryAssociations.cpp debughlp.cpp diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index 4e694f7b86..62aad907b1 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -20,6 +20,7 @@ #include <userenv.h> #include <shlwapi.h> +#include <wininet.h> #include <shlobj.h> #include <shobjidl.h> #include <ndk/rtlfuncs.h> @@ -54,6 +55,7 @@ #include "wine/shell32_main.h" #include "shresdef.h" #include "wine/cpanel.h" +#include "CActiveDesktop.h" #include "CEnumIDListBase.h" #include "shfldr.h" #include "CShellItem.h" diff --git a/dll/win32/shell32/res/rgs/activedesktop.rgs b/dll/win32/shell32/res/rgs/activedesktop.rgs new file mode 100644 index 0000000000..1f80872c5c --- /dev/null +++ b/dll/win32/shell32/res/rgs/activedesktop.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {75048700-EF1F-11D0-9888-006097DEACF9} = s 'ActiveDesktop' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc index 67e072d530..c50480d3fd 100644 --- a/dll/win32/shell32/rgs_res.rc +++ b/dll/win32/shell32/rgs_res.rc @@ -28,3 +28,4 @@ IDR_MERGEDFOLDER REGISTRY "res/rgs/mergedfolder.rgs" IDR_REBARBANDSITE REGISTRY "res/rgs/rebarbandsite.rgs" IDR_USERNOTIFICATION REGISTRY "res/rgs/usernotification.rgs" IDR_SHELL REGISTRY "res/rgs/shell.rgs" +IDR_ACTIVEDESKTOP REGISTRY "res/rgs/activedesktop.rgs" diff --git a/dll/win32/shell32/shell32.cpp b/dll/win32/shell32/shell32.cpp index a1d11c27ff..d75dccd596 100644 --- a/dll/win32/shell32/shell32.cpp +++ b/dll/win32/shell32/shell32.cpp @@ -271,6 +271,7 @@ public: BEGIN_OBJECT_MAP(ObjectMap) + OBJECT_ENTRY(CLSID_ActiveDesktop, CActiveDesktop) OBJECT_ENTRY(CLSID_ShellFSFolder, CFSFolder) OBJECT_ENTRY(CLSID_MyComputer, CDrivesFolder) OBJECT_ENTRY(CLSID_ShellDesktop, CDesktopFolder) diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 037d1fc0be..2fa3e090f1 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -804,3 +804,4 @@ #define IDR_REBARBANDSITE 154 #define IDR_USERNOTIFICATION 155 #define IDR_SHELL 156 +#define IDR_ACTIVEDESKTOP 157
6 years
1
0
0
0
[reactos] 02/03: [COM_APITEST] Add a test for CLSID_ActiveDesktop CORE-15424
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6378c836635bbe965f821…
commit 6378c836635bbe965f821134b8688d3c1fd233ec Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 9 15:58:35 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Wed Dec 12 19:29:09 2018 +0100 [COM_APITEST] Add a test for CLSID_ActiveDesktop CORE-15424 --- modules/rostests/apitests/com/shell32.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/rostests/apitests/com/shell32.c b/modules/rostests/apitests/com/shell32.c index 76769e6c62..96cea6dbe5 100644 --- a/modules/rostests/apitests/com/shell32.c +++ b/modules/rostests/apitests/com/shell32.c @@ -12,6 +12,16 @@ static const CLASS_AND_INTERFACES ExpectedInterfaces[] = { + { + ID_NAME(CLSID_ActiveDesktop), + { + { 0x0, &IID_IActiveDesktop }, + { 0x0, &IID_IUnknown }, + { 0x4, &IID_IActiveDesktopP }, + { 0x8, &IID_IADesktopP2 }, + { 0xc, &IID_IPropertyBag }, + } + }, { ID_NAME(CLSID_CDBurn), {
6 years
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
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