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
November 2019
----- 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
24 participants
322 discussions
Start a n
N
ew thread
[reactos] 01/01: [SXS_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c02033b006ba3b35fcce…
commit 6c02033b006ba3b35fccedf50c67d8281a96d96a Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:58:10 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:58:10 2019 +0100 [SXS_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/sxs/CMakeLists.txt | 6 +- .../rostests/winetests/sxs/comtest_dll.manifest | 16 ++ .../rostests/winetests/sxs/comtest_exe.manifest | 11 + modules/rostests/winetests/sxs/interfaces.idl | 35 ++++ modules/rostests/winetests/sxs/resource.rc | 27 +++ modules/rostests/winetests/sxs/sxs.c | 224 +++++++++++++++++++++ modules/rostests/winetests/sxs/testlist.c | 2 + 7 files changed, 319 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/sxs/CMakeLists.txt b/modules/rostests/winetests/sxs/CMakeLists.txt index 53b538a2531..b8a2acfff72 100644 --- a/modules/rostests/winetests/sxs/CMakeLists.txt +++ b/modules/rostests/winetests/sxs/CMakeLists.txt @@ -1,6 +1,8 @@ add_definitions(-DUSE_WINE_TODOS) -add_executable(sxs_winetest cache.c name.c testlist.c) +add_idl_headers(sxs_winetest_idlheaders interfaces.idl) +add_executable(sxs_winetest cache.c name.c sxs.c testlist.c resource.rc) set_module_type(sxs_winetest win32cui) -add_importlibs(sxs_winetest sxs msvcrt kernel32) +add_importlibs(sxs_winetest sxs shlwapi msvcrt kernel32) add_rostests_file(TARGET sxs_winetest) +add_dependencies(sxs_winetest sxs_winetest_idlheaders) diff --git a/modules/rostests/winetests/sxs/comtest_dll.manifest b/modules/rostests/winetests/sxs/comtest_dll.manifest new file mode 100644 index 00000000000..ef6924de9e8 --- /dev/null +++ b/modules/rostests/winetests/sxs/comtest_dll.manifest @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity + name="comtest" + version="1.0.0.0" + type="win32" + /> + <clrClass + clsid="{2e106e50-e7a4-4489-8538-83643f100fdc}" + threadingModel="Both" + name="DLL.Test" + runtimeVersion="v4.0.0.0"> + </clrClass> + <file name="comtest.dll"> + </file> +</assembly> diff --git a/modules/rostests/winetests/sxs/comtest_exe.manifest b/modules/rostests/winetests/sxs/comtest_exe.manifest new file mode 100644 index 00000000000..bc9ce4c0457 --- /dev/null +++ b/modules/rostests/winetests/sxs/comtest_exe.manifest @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <dependency> + <dependentAssembly> + <assemblyIdentity + name="comtest" + version="1.0.0.0" + type="win32"/> + </dependentAssembly> + </dependency> +</assembly> diff --git a/modules/rostests/winetests/sxs/interfaces.idl b/modules/rostests/winetests/sxs/interfaces.idl new file mode 100644 index 00000000000..6f8ac615bf2 --- /dev/null +++ b/modules/rostests/winetests/sxs/interfaces.idl @@ -0,0 +1,35 @@ +/* + * Copyright 2018 Fabian Maurer + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep header + +#include "unknwn.idl" + +[ + object, + uuid(1dbc4491-080d-45c5-a15d-1e3c4610bdd9), + local +] +interface ITest : IUnknown { + HRESULT Func([in, out] int *i); +}; + +[ + uuid(2e106e50-e7a4-4489-8538-83643f100fdc), +] +coclass Test { interface ITest; }; diff --git a/modules/rostests/winetests/sxs/resource.rc b/modules/rostests/winetests/sxs/resource.rc new file mode 100644 index 00000000000..dd2c25bf37f --- /dev/null +++ b/modules/rostests/winetests/sxs/resource.rc @@ -0,0 +1,27 @@ +/* + * Resources for sxs test suite. + * + * Copyright 2018 Fabian Maurer + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" + +/* @makedep: comtest_exe.manifest */ +comtest_exe.manifest RCDATA comtest_exe.manifest + +/* @makedep: comtest_dll.manifest */ +comtest_dll.manifest RCDATA comtest_dll.manifest diff --git a/modules/rostests/winetests/sxs/sxs.c b/modules/rostests/winetests/sxs/sxs.c new file mode 100644 index 00000000000..eb54c6fa1d4 --- /dev/null +++ b/modules/rostests/winetests/sxs/sxs.c @@ -0,0 +1,224 @@ +/* + * Copyright 2018 Fabian Maurer + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdio.h> + +#define COBJMACROS + +#include <windows.h> +#include <winsxs.h> +#include <corerror.h> +#include "shlwapi.h" + +#include "wine/test.h" +#include "wine/heap.h" + +#include "initguid.h" +#include "interfaces.h" + +#define SXS_LOOKUP_CLR_GUID_USE_ACTCTX 0x00000001 +#define SXS_LOOKUP_CLR_GUID_FIND_SURROGATE 0x00010000 +#define SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS 0x00020000 +#define SXS_LOOKUP_CLR_GUID_FIND_ANY (SXS_LOOKUP_CLR_GUID_FIND_SURROGATE | SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS) + +#define SXS_GUID_INFORMATION_CLR_FLAG_IS_SURROGATE 0x00000001 +#define SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS 0x00000002 + +typedef struct _SXS_GUID_INFORMATION_CLR +{ + DWORD cbSize; + DWORD dwFlags; + PCWSTR pcwszRuntimeVersion; + PCWSTR pcwszTypeName; + PCWSTR pcwszAssemblyIdentity; +} SXS_GUID_INFORMATION_CLR; + +/* Defined in sxs.dll, but not found in any header */ +BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buffer, SIZE_T buffer_len, SIZE_T *buffer_len_required); + +static BOOL write_resource_file(const char *path_tmp, const char *name_res, const char *name_file, char *path_file) +{ + HRSRC rsrc; + void *rsrc_data; + DWORD rsrc_size; + BOOL ret; + HANDLE hfile; + + path_file[0] = 0; + rsrc = FindResourceA(GetModuleHandleA(NULL), name_res, (LPCSTR)RT_RCDATA); + if (!rsrc) return FALSE; + + rsrc_data = LockResource(LoadResource(GetModuleHandleA(NULL), rsrc)); + if (!rsrc_data) return FALSE; + + rsrc_size = SizeofResource(GetModuleHandleA(NULL), rsrc); + if (!rsrc_size) return FALSE; + + strcpy(path_file, path_tmp); + PathAppendA(path_file, name_file); + hfile = CreateFileA(path_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + if (hfile == INVALID_HANDLE_VALUE) return FALSE; + + ret = WriteFile(hfile, rsrc_data, rsrc_size, &rsrc_size, NULL); + + CloseHandle(hfile); + return ret; +} + +static void run_test(void) +{ + SIZE_T buffer_size; + BOOL ret; + SXS_GUID_INFORMATION_CLR *info; + WCHAR expected_type_name[] = {'D','L','L','.','T','e','s','t',0}; + WCHAR expected_runtime_version[] = {'v','4','.','0','.','0','.','0',0}; + WCHAR expected_assembly_identity[] = {'c','o','m','t','e','s','t',',','t','y','p','e','=','"','w','i','n','3','2','"',',','v','e','r','s','i','o','n','=','"','1','.','0','.','0','.','0','"',0}; + + ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, NULL, 0, &buffer_size); + ok(ret == FALSE, "Got %d\n", ret); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got %d\n", GetLastError()); + + info = heap_alloc(buffer_size); + ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, info, buffer_size, &buffer_size); + ok(ret == TRUE, "Got %d\n", ret); + ok(GetLastError() == 0, "Got %d\n", GetLastError()); + + ok(info->dwFlags == SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS, "Got %d\n", info->dwFlags); + ok(lstrcmpW(info->pcwszTypeName, expected_type_name) == 0, "Got %s\n", + wine_dbgstr_w(info->pcwszTypeName)); + ok(lstrcmpW(info->pcwszAssemblyIdentity, expected_assembly_identity) == 0, "Got %s\n", + wine_dbgstr_w(info->pcwszAssemblyIdentity)); + ok(lstrcmpW(info->pcwszRuntimeVersion, expected_runtime_version) == 0, "Got %s\n", + wine_dbgstr_w(info->pcwszRuntimeVersion)); + + heap_free(info); +} + +static void prepare_and_run_test(void) +{ + char path_tmp[MAX_PATH]; + char path_manifest_dll[MAX_PATH]; + char path_manifest_exe[MAX_PATH]; + BOOL success; + ACTCTXA context = {0}; + ULONG_PTR cookie; + HANDLE handle_context = INVALID_HANDLE_VALUE; + + GetTempPathA(MAX_PATH, path_tmp); + + if (!write_resource_file(path_tmp, "comtest_exe.manifest", "exe.manifest", path_manifest_exe)) + { + ok(0, "Failed to create file for testing\n"); + goto cleanup; + } + + if (!write_resource_file(path_tmp, "comtest_dll.manifest", "comtest.manifest", path_manifest_dll)) + { + ok(0, "Failed to create file for testing\n"); + goto cleanup; + } + + context.cbSize = sizeof(ACTCTXA); + context.lpSource = path_manifest_exe; + context.lpAssemblyDirectory = path_tmp; + context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID; + + handle_context = CreateActCtxA(&context); + ok(handle_context != INVALID_HANDLE_VALUE, "CreateActCtxA failed: %d\n", GetLastError()); + + if (handle_context == INVALID_HANDLE_VALUE) + { + ok(0, "Failed to create activation context\n"); + goto cleanup; + } + + success = ActivateActCtx(handle_context, &cookie); + ok(success, "ActivateActCtx failed: %d\n", GetLastError()); + + run_test(); + +cleanup: + if (handle_context != INVALID_HANDLE_VALUE) + { + success = DeactivateActCtx(0, cookie); + ok(success, "DeactivateActCtx failed: %d\n", GetLastError()); + ReleaseActCtx(handle_context); + } + if (*path_manifest_exe) + { + success = DeleteFileA(path_manifest_exe); + ok(success, "DeleteFileA failed: %d\n", GetLastError()); + } + if(*path_manifest_dll) + { + success = DeleteFileA(path_manifest_dll); + ok(success, "DeleteFileA failed: %d\n", GetLastError()); + } +} + +static void run_child_process(void) +{ + char cmdline[MAX_PATH]; + char exe[MAX_PATH]; + char **argv; + PROCESS_INFORMATION pi; + STARTUPINFOA si = { 0 }; + BOOL ret; + + winetest_get_mainargs(&argv); + + if (strstr(argv[0], ".exe")) + sprintf(exe, "%s", argv[0]); + else + sprintf(exe, "%s.exe", argv[0]); + sprintf(cmdline, "\"%s\" %s %s", argv[0], argv[1], "subtest"); + + si.cb = sizeof(si); + ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + ok(ret, "Could not create process: %u\n", GetLastError()); + + winetest_wait_child_process(pi.hProcess); + + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); +} + +static void test_SxsLookupClrGuid(void) +{ + SIZE_T buffer_size; + BOOL ret; + + ret = SxsLookupClrGuid(SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS, (GUID*)&CLSID_Test, NULL, NULL, 0, &buffer_size); + ok(ret == FALSE, "Expected FALSE, got %d\n", ret); + ok(GetLastError() == ERROR_NOT_FOUND, "Expected ERROR_NOT_FOUND, got %d\n", GetLastError()); + + run_child_process(); +} + +START_TEST(sxs) +{ + char **argv; + int argc = winetest_get_mainargs(&argv); + if (argc > 2) + { + prepare_and_run_test(); + return; + } + + test_SxsLookupClrGuid(); +} diff --git a/modules/rostests/winetests/sxs/testlist.c b/modules/rostests/winetests/sxs/testlist.c index ea4814e562c..d7888b52eeb 100644 --- a/modules/rostests/winetests/sxs/testlist.c +++ b/modules/rostests/winetests/sxs/testlist.c @@ -5,10 +5,12 @@ extern void func_cache(void); extern void func_name(void); +extern void func_sxs(void); const struct test winetest_testlist[] = { { "cache", func_cache }, { "name", func_name }, + { "sxs", func_sxs }, { 0, 0 } };
5 years
1
0
0
0
[reactos] 01/01: [SXS] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58895b70d0b0a266043f7…
commit 58895b70d0b0a266043f7fc9e8722cff4845abc0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:56:42 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:56:42 2019 +0100 [SXS] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/sxs/cache.c | 116 +++++++++++++++++----------------- dll/win32/sxs/name.c | 34 +++++----- dll/win32/sxs/precomp.h | 2 +- dll/win32/sxs/sxs.c | 150 ++++++++++++++++++++++++++++++++++++++++++++ dll/win32/sxs/sxs.spec | 1 + dll/win32/sxs/sxs_private.h | 4 +- media/doc/README.WINE | 2 +- 7 files changed, 231 insertions(+), 78 deletions(-) diff --git a/dll/win32/sxs/cache.c b/dll/win32/sxs/cache.c index 3cc26f29e8c..361c05789fb 100644 --- a/dll/win32/sxs/cache.c +++ b/dll/win32/sxs/cache.c @@ -19,6 +19,9 @@ */ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #define COBJMACROS #define INITGUID @@ -31,7 +34,6 @@ #include "wine/debug.h" #include "wine/list.h" -#include "wine/unicode.h" #include "sxs_private.h" WINE_DEFAULT_DEBUG_CHANNEL(sxs); @@ -112,16 +114,15 @@ static WCHAR *build_assembly_name( const WCHAR *arch, const WCHAR *name, const W static const WCHAR fmtW[] = {'%','s','_','%','s','_','%','s','_','%','s','_','n','o','n','e','_','d','e','a','d','b','e','e','f',0}; unsigned int buflen = ARRAY_SIZE(fmtW); - WCHAR *ret, *p; + WCHAR *ret; - buflen += strlenW( arch ); - buflen += strlenW( name ); - buflen += strlenW( token ); - buflen += strlenW( version ); + buflen += lstrlenW( arch ); + buflen += lstrlenW( name ); + buflen += lstrlenW( token ); + buflen += lstrlenW( version ); if (!(ret = HeapAlloc( GetProcessHeap(), 0, buflen * sizeof(WCHAR) ))) return NULL; - *len = sprintfW( ret, fmtW, arch, name, token, version ); - for (p = ret; *p; p++) *p = tolowerW( *p ); - return ret; + *len = swprintf( ret, fmtW, arch, name, token, version ); + return _wcslwr( ret ); } static WCHAR *build_manifest_path( const WCHAR *arch, const WCHAR *name, const WCHAR *token, @@ -140,7 +141,7 @@ static WCHAR *build_manifest_path( const WCHAR *arch, const WCHAR *name, const W HeapFree( GetProcessHeap(), 0, path ); return NULL; } - sprintfW( ret, fmtW, sxsdir, path ); + swprintf( ret, fmtW, sxsdir, path ); HeapFree( GetProcessHeap(), 0, path ); return ret; } @@ -151,15 +152,14 @@ static WCHAR *build_policy_name( const WCHAR *arch, const WCHAR *name, const WCH static const WCHAR fmtW[] = {'%','s','_','%','s','_','%','s','_','n','o','n','e','_','d','e','a','d','b','e','e','f',0}; unsigned int buflen = ARRAY_SIZE(fmtW); - WCHAR *ret, *p; + WCHAR *ret; - buflen += strlenW( arch ); - buflen += strlenW( name ); - buflen += strlenW( token ); + buflen += lstrlenW( arch ); + buflen += lstrlenW( name ); + buflen += lstrlenW( token ); if (!(ret = HeapAlloc( GetProcessHeap(), 0, buflen * sizeof(WCHAR) ))) return NULL; - *len = sprintfW( ret, fmtW, arch, name, token ); - for (p = ret; *p; p++) *p = tolowerW( *p ); - return ret; + *len = swprintf( ret, fmtW, arch, name, token ); + return _wcslwr( ret ); } static WCHAR *build_policy_path( const WCHAR *arch, const WCHAR *name, const WCHAR *token, @@ -173,13 +173,13 @@ static WCHAR *build_policy_path( const WCHAR *arch, const WCHAR *name, const WCH if (!(path = build_policy_name( arch, name, token, &len ))) return NULL; len += ARRAY_SIZE(fmtW); len += build_sxs_path( sxsdir ); - len += strlenW( version ); + len += lstrlenW( version ); if (!(ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) { HeapFree( GetProcessHeap(), 0, path ); return NULL; } - sprintfW( ret, fmtW, sxsdir, path, version ); + swprintf( ret, fmtW, sxsdir, path, version ); HeapFree( GetProcessHeap(), 0, path ); return ret; } @@ -235,8 +235,8 @@ static HRESULT WINAPI cache_QueryAssemblyInfo( } cache_lock( cache ); - if (!strcmpW( type, win32W )) path = build_manifest_path( arch, name, token, version ); - else if (!strcmpW( type, win32_policyW )) path = build_policy_path( arch, name, token, version ); + if (!wcscmp( type, win32W )) path = build_manifest_path( arch, name, token, version ); + else if (!wcscmp( type, win32_policyW )) path = build_policy_path( arch, name, token, version ); else { hr = HRESULT_FROM_WIN32( ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE ); @@ -253,8 +253,8 @@ static HRESULT WINAPI cache_QueryAssemblyInfo( info->dwAssemblyFlags = ASSEMBLYINFO_FLAG_INSTALLED; TRACE("assembly is installed\n"); } - if ((p = strrchrW( path, '\\' ))) *p = 0; - len = strlenW( path ) + 1; + if ((p = wcsrchr( path, '\\' ))) *p = 0; + len = lstrlenW( path ) + 1; if (info->pszCurrentAssemblyPathBuf) { if (info->cchBuf < len) @@ -262,7 +262,7 @@ static HRESULT WINAPI cache_QueryAssemblyInfo( info->cchBuf = len; hr = HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ); } - else strcpyW( info->pszCurrentAssemblyPathBuf, path ); + else lstrcpyW( info->pszCurrentAssemblyPathBuf, path ); } done: @@ -473,14 +473,14 @@ static HRESULT parse_assembly( IXMLDOMDocument *doc, struct assembly **assembly a->arch = get_attribute_value( attrs, architectureW ); a->token = get_attribute_value( attrs, tokenW ); - if (!a->type || (strcmpW( a->type, win32W ) && strcmpW( a->type, win32_policyW )) || + if (!a->type || (wcscmp( a->type, win32W ) && wcscmp( a->type, win32_policyW )) || !a->name || !a->version || !a->arch || !a->token) { WARN("invalid win32 assembly\n"); hr = ERROR_SXS_MANIFEST_FORMAT_ERROR; goto done; } - if (!strcmpW( a->type, win32W )) hr = parse_files( doc, a ); + if (!wcscmp( a->type, win32W )) hr = parse_files( doc, a ); done: if (attrs) IXMLDOMNamedNodeMap_Release( attrs ); @@ -502,21 +502,21 @@ static WCHAR *build_policy_filename( const WCHAR *arch, const WCHAR *name, const if (!(fullname = build_policy_name( arch, name, token, &len ))) return NULL; len += build_sxs_path( sxsdir ); len += ARRAY_SIZE(policiesW) - 1; - len += strlenW( version ); + len += lstrlenW( version ); len += ARRAY_SIZE(suffixW) - 1; if (!(ret = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) { HeapFree( GetProcessHeap(), 0, fullname ); return NULL; } - strcpyW( ret, sxsdir ); - strcatW( ret, policiesW ); + lstrcpyW( ret, sxsdir ); + lstrcatW( ret, policiesW ); CreateDirectoryW( ret, NULL ); - strcatW( ret, name ); + lstrcatW( ret, name ); CreateDirectoryW( ret, NULL ); - strcatW( ret, backslashW ); - strcatW( ret, version ); - strcatW( ret, suffixW ); + lstrcatW( ret, backslashW ); + lstrcatW( ret, version ); + lstrcatW( ret, suffixW ); HeapFree( GetProcessHeap(), 0, fullname ); return ret; @@ -549,16 +549,16 @@ static WCHAR *build_source_filename( const WCHAR *manifest, struct file *file ) const WCHAR *p; int len; - p = strrchrW( manifest, '\\' ); - if (!p) p = strrchrW( manifest, '/' ); + p = wcsrchr( manifest, '\\' ); + if (!p) p = wcsrchr( manifest, '/' ); if (!p) return strdupW( manifest ); len = p - manifest + 1; - if (!(src = HeapAlloc( GetProcessHeap(), 0, (len + strlenW( file->name ) + 1) * sizeof(WCHAR) ))) + if (!(src = HeapAlloc( GetProcessHeap(), 0, (len + lstrlenW( file->name ) + 1) * sizeof(WCHAR) ))) return NULL; memcpy( src, manifest, len * sizeof(WCHAR) ); - strcpyW( src + len, file->name ); + lstrcpyW( src + len, file->name ); return src; } @@ -579,10 +579,10 @@ static WCHAR *build_manifest_filename( const WCHAR *arch, const WCHAR *name, con HeapFree( GetProcessHeap(), 0, fullname ); return NULL; } - strcpyW( ret, sxsdir ); - strcatW( ret, manifestsW ); - strcatW( ret, fullname ); - strcatW( ret, suffixW ); + lstrcpyW( ret, sxsdir ); + lstrcatW( ret, manifestsW ); + lstrcatW( ret, fullname ); + lstrcatW( ret, suffixW ); HeapFree( GetProcessHeap(), 0, fullname ); return ret; @@ -639,19 +639,19 @@ static HRESULT install_assembly( const WCHAR *manifest, struct assembly *assembl { if (!(src = build_source_filename( manifest, file ))) goto done; - len = len_sxsdir + len_name + strlenW( file->name ); + len = len_sxsdir + len_name + lstrlenW( file->name ); if (!(dst = HeapAlloc( GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR) ))) { HeapFree( GetProcessHeap(), 0, src ); goto done; } - strcpyW( dst, sxsdir ); - strcatW( dst, name ); + lstrcpyW( dst, sxsdir ); + lstrcatW( dst, name ); CreateDirectoryW( dst, NULL ); - strcatW( dst, backslashW ); - strcatW( dst, file->name ); - for (p = dst; *p; p++) *p = tolowerW( *p ); + lstrcatW( dst, backslashW ); + lstrcatW( dst, file->name ); + for (p = dst; *p; p++) *p = towlower( *p ); ret = CopyFileW( src, dst, FALSE ); HeapFree( GetProcessHeap(), 0, src ); @@ -695,7 +695,7 @@ static HRESULT WINAPI cache_InstallAssembly( /* FIXME: verify name attributes */ - if (!strcmpW( assembly->type, win32_policyW )) + if (!wcscmp( assembly->type, win32_policyW )) hr = install_policy( path, assembly ); else hr = install_assembly( path, assembly ); @@ -720,16 +720,16 @@ static HRESULT uninstall_assembly( struct assembly *assembly ) if (!name) return E_OUTOFMEMORY; if (!(dirname = HeapAlloc( GetProcessHeap(), 0, (len_sxsdir + len_name + 1) * sizeof(WCHAR) ))) goto done; - strcpyW( dirname, sxsdir ); - strcpyW( dirname + len_sxsdir, name ); + lstrcpyW( dirname, sxsdir ); + lstrcpyW( dirname + len_sxsdir, name ); LIST_FOR_EACH_ENTRY( file, &assembly->files, struct file, entry ) { - len = len_sxsdir + len_name + 1 + strlenW( file->name ); + len = len_sxsdir + len_name + 1 + lstrlenW( file->name ); if (!(filename = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) goto done; - strcpyW( filename, dirname ); - strcatW( filename, backslashW ); - strcatW( filename, file->name ); + lstrcpyW( filename, dirname ); + lstrcatW( filename, backslashW ); + lstrcatW( filename, file->name ); if (!DeleteFileW( filename )) WARN( "failed to delete file %u\n", GetLastError() ); HeapFree( GetProcessHeap(), 0, filename ); @@ -782,8 +782,8 @@ static HRESULT WINAPI cache_UninstallAssembly( hr = E_INVALIDARG; goto done; } - if (!strcmpW( type, win32W )) path = build_manifest_filename( arch, name, token, version ); - else if (!strcmpW( type, win32_policyW )) path = build_policy_filename( arch, name, token, version ); + if (!wcscmp( type, win32W )) path = build_manifest_filename( arch, name, token, version ); + else if (!wcscmp( type, win32_policyW )) path = build_policy_filename( arch, name, token, version ); else { hr = E_INVALIDARG; @@ -798,12 +798,12 @@ static HRESULT WINAPI cache_UninstallAssembly( if ((hr = parse_assembly( doc, &assembly )) != S_OK) goto done; if (!DeleteFileW( path )) WARN( "unable to remove manifest file %u\n", GetLastError() ); - else if ((p = strrchrW( path, '\\' ))) + else if ((p = wcsrchr( path, '\\' ))) { *p = 0; RemoveDirectoryW( path ); } - if (!strcmpW( assembly->type, win32W )) hr = uninstall_assembly( assembly ); + if (!wcscmp( assembly->type, win32W )) hr = uninstall_assembly( assembly ); done: if (name_obj) IAssemblyName_Release( name_obj ); diff --git a/dll/win32/sxs/name.c b/dll/win32/sxs/name.c index e1090140b26..a4634a06b8a 100644 --- a/dll/win32/sxs/name.c +++ b/dll/win32/sxs/name.c @@ -19,6 +19,9 @@ */ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #define COBJMACROS @@ -28,7 +31,6 @@ #include "winsxs.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "sxs_private.h" WINE_DEFAULT_DEBUG_CHANNEL(sxs); @@ -143,22 +145,22 @@ static HRESULT WINAPI name_GetDisplayName( if (!buflen || flags) return E_INVALIDARG; - len = strlenW( name->name ) + 1; - if (name->arch) len += strlenW( archW ) + strlenW( name->arch ) + 4; - if (name->token) len += strlenW( tokenW ) + strlenW( name->token ) + 4; - if (name->type) len += strlenW( typeW ) + strlenW( name->type ) + 4; - if (name->version) len += strlenW( versionW ) + strlenW( version ) + 4; + len = lstrlenW( name->name ) + 1; + if (name->arch) len += lstrlenW( archW ) + lstrlenW( name->arch ) + 4; + if (name->token) len += lstrlenW( tokenW ) + lstrlenW( name->token ) + 4; + if (name->type) len += lstrlenW( typeW ) + lstrlenW( name->type ) + 4; + if (name->version) len += lstrlenW( versionW ) + lstrlenW( version ) + 4; if (len > *buflen) { *buflen = len; return HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ); } - strcpyW( buffer, name->name ); - len = strlenW( buffer ); - if (name->arch) len += sprintfW( buffer + len, fmtW, archW, name->arch ); - if (name->token) len += sprintfW( buffer + len, fmtW, tokenW, name->token ); - if (name->type) len += sprintfW( buffer + len, fmtW, typeW, name->type ); - if (name->version) len += sprintfW( buffer + len, fmtW, versionW, name->version ); + lstrcpyW( buffer, name->name ); + len = lstrlenW( buffer ); + if (name->arch) len += swprintf( buffer + len, fmtW, archW, name->arch ); + if (name->token) len += swprintf( buffer + len, fmtW, tokenW, name->token ); + if (name->type) len += swprintf( buffer + len, fmtW, typeW, name->type ); + if (name->version) len += swprintf( buffer + len, fmtW, versionW, name->version ); return S_OK; } @@ -211,13 +213,13 @@ static HRESULT WINAPI name_GetName( if (!buflen || !buffer) return E_INVALIDARG; name = get_name_attribute( iface, NAME_ATTR_ID_NAME ); - len = strlenW( name ) + 1; + len = lstrlenW( name ) + 1; if (len > *buflen) { *buflen = len; return HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ); } - strcpyW( buffer, name ); + lstrcpyW( buffer, name ); *buflen = len + 3; return S_OK; } @@ -232,9 +234,9 @@ static HRESULT parse_version( WCHAR *version, DWORD *high, DWORD *low ) for (i = 0, p = version; i < 4; i++) { if (!*p) break; - q = strchrW( p, '.' ); + q = wcschr( p, '.' ); if (q) *q = 0; - ver[i] = atolW( p ); + ver[i] = wcstol( p, NULL, 10 ); if (!q && i < 3) break; p = q + 1; } diff --git a/dll/win32/sxs/precomp.h b/dll/win32/sxs/precomp.h index 52a823b3d20..fad16879610 100644 --- a/dll/win32/sxs/precomp.h +++ b/dll/win32/sxs/precomp.h @@ -3,6 +3,7 @@ #define _SXS_PRECOMP_H_ #include <stdarg.h> +#include <wchar.h> #define WIN32_NO_STATUS #define _INC_WINDOWS @@ -16,7 +17,6 @@ #include <winsxs.h> #include <wine/debug.h> -#include <wine/unicode.h> #include "sxs_private.h" diff --git a/dll/win32/sxs/sxs.c b/dll/win32/sxs/sxs.c index 06e6672dbf7..5b2db1d997c 100644 --- a/dll/win32/sxs/sxs.c +++ b/dll/win32/sxs/sxs.c @@ -23,6 +23,10 @@ #include "windef.h" #include "winbase.h" +#include "wine/heap.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(sxs); /*********************************************************************** * DllMain (SXS.@) @@ -40,3 +44,149 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } return TRUE; } + +typedef struct _SXS_GUID_INFORMATION_CLR +{ + DWORD cbSize; + DWORD dwFlags; + PCWSTR pcwszRuntimeVersion; + PCWSTR pcwszTypeName; + PCWSTR pcwszAssemblyIdentity; +} SXS_GUID_INFORMATION_CLR, *PSXS_GUID_INFORMATION_CLR; + +#define SXS_GUID_INFORMATION_CLR_FLAG_IS_SURROGATE 0x1 +#define SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS 0x2 + +#define SXS_LOOKUP_CLR_GUID_USE_ACTCTX 0x00000001 +#define SXS_LOOKUP_CLR_GUID_FIND_SURROGATE 0x00010000 +#define SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS 0x00020000 + +struct comclassredirect_data +{ + ULONG size; + BYTE res; + BYTE miscmask; + BYTE res1[2]; + DWORD model; + GUID clsid; + GUID alias; + GUID clsid2; + GUID tlbid; + ULONG name_len; + ULONG name_offset; + ULONG progid_len; + ULONG progid_offset; + ULONG clrdata_len; + ULONG clrdata_offset; + DWORD miscstatus; + DWORD miscstatuscontent; + DWORD miscstatusthumbnail; + DWORD miscstatusicon; + DWORD miscstatusdocprint; +}; + +struct clrclass_data +{ + ULONG size; + DWORD res[2]; + ULONG module_len; + ULONG module_offset; + ULONG name_len; + ULONG name_offset; + ULONG version_len; + ULONG version_offset; + DWORD res2[2]; +}; + +BOOL WINAPI SxsLookupClrGuid(DWORD flags, GUID *clsid, HANDLE actctx, void *buffer, SIZE_T buffer_len, + SIZE_T *buffer_len_required) +{ + ACTCTX_SECTION_KEYED_DATA guid_info = { sizeof(ACTCTX_SECTION_KEYED_DATA) }; + ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *assembly_info; + SIZE_T bytes_assembly_info; + struct comclassredirect_data *redirect_data; + struct clrclass_data *class_data; + int len_version = 0, len_name, len_identity; + const void *ptr_name, *ptr_version, *ptr_identity; + SXS_GUID_INFORMATION_CLR *ret = buffer; + char *ret_strings; + + TRACE("(%x, %s, %p, %p, %08lx, %p): stub\n", flags, wine_dbgstr_guid(clsid), actctx, + buffer, buffer_len, buffer_len_required); + + if (flags & ~SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS) + FIXME("Ignored flags: %x\n", flags & ~SXS_LOOKUP_CLR_GUID_FIND_CLR_CLASS); + + if (!FindActCtxSectionGuid(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, 0, + ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION, clsid, &guid_info)) + { + SetLastError(ERROR_NOT_FOUND); + return FALSE; + } + + QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex, + AssemblyDetailedInformationInActivationContext, NULL, 0, &bytes_assembly_info); + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + ReleaseActCtx(guid_info.hActCtx); + return FALSE; + } + assembly_info = heap_alloc(bytes_assembly_info); + if(!QueryActCtxW(0, guid_info.hActCtx, &guid_info.ulAssemblyRosterIndex, + AssemblyDetailedInformationInActivationContext, assembly_info, + bytes_assembly_info, &bytes_assembly_info)) + { + heap_free(assembly_info); + ReleaseActCtx(guid_info.hActCtx); + return FALSE; + } + + redirect_data = guid_info.lpData; + class_data = (void *)((char*)redirect_data + redirect_data->clrdata_offset); + + ptr_identity = assembly_info->lpAssemblyEncodedAssemblyIdentity; + ptr_name = (char *)class_data + class_data->name_offset; + ptr_version = (char *)class_data + class_data->version_offset; + + len_identity = assembly_info->ulEncodedAssemblyIdentityLength + sizeof(WCHAR); + len_name = class_data->name_len + sizeof(WCHAR); + if (class_data->version_len > 0) + len_version = class_data->version_len + sizeof(WCHAR); + + *buffer_len_required = sizeof(SXS_GUID_INFORMATION_CLR) + len_identity + len_version + len_name; + if (!buffer || buffer_len < *buffer_len_required) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + heap_free(assembly_info); + ReleaseActCtx(guid_info.hActCtx); + return FALSE; + } + + ret->cbSize = sizeof(SXS_GUID_INFORMATION_CLR); + ret->dwFlags = SXS_GUID_INFORMATION_CLR_FLAG_IS_CLASS; + + /* Copy strings into buffer */ + ret_strings = (char *)ret + sizeof(SXS_GUID_INFORMATION_CLR); + + memcpy(ret_strings, ptr_identity, len_identity); + ret->pcwszAssemblyIdentity = (WCHAR *)ret_strings; + ret_strings += len_identity; + + memcpy(ret_strings, ptr_name, len_name); + ret->pcwszTypeName = (WCHAR *)ret_strings; + ret_strings += len_name; + + if (len_version > 0) + { + memcpy(ret_strings, ptr_version, len_version); + ret->pcwszRuntimeVersion = (WCHAR *)ret_strings; + } + else + ret->pcwszRuntimeVersion = NULL; + + SetLastError(0); + + ReleaseActCtx(guid_info.hActCtx); + heap_free(assembly_info); + return TRUE; +} diff --git a/dll/win32/sxs/sxs.spec b/dll/win32/sxs/sxs.spec index 2a273134279..138d68f7d73 100644 --- a/dll/win32/sxs/sxs.spec +++ b/dll/win32/sxs/sxs.spec @@ -1,2 +1,3 @@ @ stdcall CreateAssemblyCache(ptr long) @ stdcall CreateAssemblyNameObject(ptr wstr long ptr) +@ stdcall SxsLookupClrGuid(long ptr ptr ptr long ptr) diff --git a/dll/win32/sxs/sxs_private.h b/dll/win32/sxs/sxs_private.h index 1ceab265e33..006eb67f90d 100644 --- a/dll/win32/sxs/sxs_private.h +++ b/dll/win32/sxs/sxs_private.h @@ -34,7 +34,7 @@ static inline WCHAR *strdupW( const WCHAR *src ) WCHAR *dst; if (!src) return NULL; - dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) ); - if (dst) strcpyW( dst, src ); + dst = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( src ) + 1) * sizeof(WCHAR) ); + if (dst) lstrcpyW( dst, src ); return dst; } diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 623e539443d..a5878eb06ef 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -182,7 +182,7 @@ dll/win32/softpub # Synced to WineStaging-2.9 dll/win32/stdole2.tlb # Synced to WineStaging-3.3 dll/win32/stdole32.tlb # Synced to WineStaging-3.3 dll/win32/sti # Synced to WineStaging-4.18 -dll/win32/sxs # Synced to WineStaging-4.0 +dll/win32/sxs # Synced to WineStaging-4.18 dll/win32/t2embed # Synced to WineStaging-4.0 dll/win32/tapi32 # Synced to WineStaging-3.3 dll/win32/traffic # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [STI_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=074cec532bd2e636a3dad…
commit 074cec532bd2e636a3dad3a97bce35b631b3f16e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:56:15 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:56:15 2019 +0100 [STI_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/sti/sti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/winetests/sti/sti.c b/modules/rostests/winetests/sti/sti.c index fa4db8cf1ac..bd8b7b6b171 100644 --- a/modules/rostests/winetests/sti/sti.c +++ b/modules/rostests/winetests/sti/sti.c @@ -150,7 +150,7 @@ static void test_version_flag_versus_aw(void) if (SUCCEEDED(hr)) { ok(pUnknown == (IUnknown*)pStiW, "created interface was not IID_IStillImageW\n"); - IUnknown_Release((IUnknown*)pUnknown); + IUnknown_Release(pUnknown); } IUnknown_Release((IUnknown*)pStiW); }
5 years
1
0
0
0
[reactos] 01/01: [STI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=66b46b04f41e45f57728e…
commit 66b46b04f41e45f57728e1632ccb64fde9ea62a3 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 23 18:21:33 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:55:34 2019 +0100 [STI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/sti/sti.c | 10 ++++++---- media/doc/README.WINE | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dll/win32/sti/sti.c b/dll/win32/sti/sti.c index 41c94f57538..19feadcfeea 100644 --- a/dll/win32/sti/sti.c +++ b/dll/win32/sti/sti.c @@ -18,6 +18,9 @@ */ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #define COBJMACROS @@ -29,7 +32,6 @@ #include "sti.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(sti); @@ -149,11 +151,11 @@ static HRESULT WINAPI stillimagew_RegisterLaunchApplication(IStillImageW *iface, ret = RegCreateKeyW(HKEY_LOCAL_MACHINE, registeredAppsLaunchPath, ®isteredAppsKey); if (ret == ERROR_SUCCESS) { - WCHAR *value = HeapAlloc(GetProcessHeap(), 0, - (lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1) * sizeof(WCHAR)); + size_t len = lstrlenW(pwszCommandLine) + 1 + lstrlenW(commandLineSuffix) + 1; + WCHAR *value = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (value) { - sprintfW(value, format, pwszCommandLine, commandLineSuffix); + swprintf(value, format, pwszCommandLine, commandLineSuffix); ret = RegSetValueExW(registeredAppsKey, pwszAppName, 0, REG_SZ, (BYTE*)value, (lstrlenW(value)+1)*sizeof(WCHAR)); if (ret != ERROR_SUCCESS) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index af91d5cc817..623e539443d 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -181,7 +181,7 @@ dll/win32/snmpapi # Synced to WineStaging-4.18 dll/win32/softpub # Synced to WineStaging-2.9 dll/win32/stdole2.tlb # Synced to WineStaging-3.3 dll/win32/stdole32.tlb # Synced to WineStaging-3.3 -dll/win32/sti # Synced to WineStaging-3.3 +dll/win32/sti # Synced to WineStaging-4.18 dll/win32/sxs # Synced to WineStaging-4.0 dll/win32/t2embed # Synced to WineStaging-4.0 dll/win32/tapi32 # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [SNMPAPI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=21c2e3982d643b48264fe…
commit 21c2e3982d643b48264fea223faa47073d0aa307 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:51:23 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:51:23 2019 +0100 [SNMPAPI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/snmpapi/main.c | 2 -- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dll/win32/snmpapi/main.c b/dll/win32/snmpapi/main.c index 2101ec8d104..3c90ca20ec9 100644 --- a/dll/win32/snmpapi/main.c +++ b/dll/win32/snmpapi/main.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdio.h> #include <stdarg.h> diff --git a/media/doc/README.WINE b/media/doc/README.WINE index b38456e4a8e..af91d5cc817 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -177,7 +177,7 @@ dll/win32/shell32 # Forked at Wine-20071011 dll/win32/shfolder # Synced to WineStaging-3.3 dll/win32/shlwapi # Synced to WineStaging-3.3 dll/win32/slbcsp # Synced to WineStaging-4.18 -dll/win32/snmpapi # Synced to WineStaging-3.3 +dll/win32/snmpapi # Synced to WineStaging-4.18 dll/win32/softpub # Synced to WineStaging-2.9 dll/win32/stdole2.tlb # Synced to WineStaging-3.3 dll/win32/stdole32.tlb # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [SLBCSP] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=04c12ebdfa69c63d2395b…
commit 04c12ebdfa69c63d2395b6248b15196c60f8f25a Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:50:58 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:50:58 2019 +0100 [SLBCSP] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/slbcsp/main.c | 2 -- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dll/win32/slbcsp/main.c b/dll/win32/slbcsp/main.c index d0e74e68ade..4fd23be6442 100644 --- a/dll/win32/slbcsp/main.c +++ b/dll/win32/slbcsp/main.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #include "windef.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4336f2df7e6..b38456e4a8e 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -176,7 +176,7 @@ dll/win32/shdocvw # Synced to WineStaging-4.18 dll/win32/shell32 # Forked at Wine-20071011 dll/win32/shfolder # Synced to WineStaging-3.3 dll/win32/shlwapi # Synced to WineStaging-3.3 -dll/win32/slbcsp # Synced to WineStaging-3.3 +dll/win32/slbcsp # Synced to WineStaging-4.18 dll/win32/snmpapi # Synced to WineStaging-3.3 dll/win32/softpub # Synced to WineStaging-2.9 dll/win32/stdole2.tlb # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [SHLWAPI_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ffe58cf052be31dfbc7a…
commit 2ffe58cf052be31dfbc7a77e369c40914a1a3490 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:50:34 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:50:34 2019 +0100 [SHLWAPI_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/shlwapi/url.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/shlwapi/url.c b/modules/rostests/winetests/shlwapi/url.c index 2c1f044a990..14473f624f3 100644 --- a/modules/rostests/winetests/shlwapi/url.c +++ b/modules/rostests/winetests/shlwapi/url.c @@ -204,11 +204,15 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"///A/../B", URL_WININET_COMPATIBILITY, S_OK, "///B", FALSE}, {"A", 0, S_OK, "A", FALSE}, {"../A", 0, S_OK, "../A", FALSE}, - {".\\A", 0, S_OK, ".\\A", FALSE}, - {"A\\.\\B", 0, S_OK, "A\\.\\B", FALSE}, + {"./A", 0, S_OK, "A", FALSE}, + {"./A/./B", 0, S_OK, "A/B", FALSE}, + {"./A", URL_DONT_SIMPLIFY, S_OK, "./A", FALSE}, + {"A/./B", 0, S_OK, "A/B", TRUE}, {"A/../B", 0, S_OK, "B", TRUE}, {"A/../B/./../C", 0, S_OK, "C", TRUE}, {"A/../B/./../C", URL_DONT_SIMPLIFY, S_OK, "A/../B/./../C", FALSE}, + {".\\A", 0, S_OK, ".\\A", FALSE}, + {"A\\.\\B", 0, S_OK, "A\\.\\B", FALSE}, {".", 0, S_OK, "/", TRUE}, {"./A", 0, S_OK, "A", TRUE}, {"A/./B", 0, S_OK, "A/B", TRUE},
5 years
1
0
0
0
[reactos] 01/01: [SHELL32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8dc669cfeed6374dc0ad…
commit b8dc669cfeed6374dc0ad6dc5caea8e1bd898454 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:50:08 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:50:08 2019 +0100 [SHELL32_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/shell32/autocomplete.c | 19 +++++++- modules/rostests/winetests/shell32/shellole.c | 26 +++++++++- modules/rostests/winetests/shell32/shellpath.c | 3 ++ .../rostests/winetests/shell32/shfldr_special.c | 55 ++++++++++++++++++++++ modules/rostests/winetests/shell32/shlexec.c | 22 ++++----- modules/rostests/winetests/shell32/shlfileop.c | 15 ++++++ modules/rostests/winetests/shell32/shlfolder.c | 2 + 7 files changed, 127 insertions(+), 15 deletions(-) diff --git a/modules/rostests/winetests/shell32/autocomplete.c b/modules/rostests/winetests/shell32/autocomplete.c index 4ef124c9d2f..ce68d21f045 100644 --- a/modules/rostests/winetests/shell32/autocomplete.c +++ b/modules/rostests/winetests/shell32/autocomplete.c @@ -494,7 +494,7 @@ static void check_dropdown_(const char *file, UINT line, IAutoCompleteDropDown * } } -static void test_aclist_expand(HWND hwnd_edit, void *enumerator) +static void test_aclist_expand(HWND hwnd_edit, void *enumerator, IAutoCompleteDropDown *acdropdown) { struct string_enumerator *obj = (struct string_enumerator*)enumerator; static WCHAR str1[] = {'t','e','s','t',0}; @@ -502,6 +502,7 @@ static void test_aclist_expand(HWND hwnd_edit, void *enumerator) static WCHAR str2[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a',0}; static WCHAR str2a[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\',0}; static WCHAR str2b[] = {'t','e','s','t','\\','f','o','o','\\','b','a','r','\\','b','a','z','_','b','b','q','\\',0}; + HRESULT hr; obj->num_resets = 0; ok(obj->num_expand == 0, "Expected 0 expansions, got %u\n", obj->num_expand); @@ -546,6 +547,20 @@ static void test_aclist_expand(HWND hwnd_edit, void *enumerator) dispatch_messages(); ok(obj->num_expand == 4, "Expected 4 expansions, got %u\n", obj->num_expand); ok(obj->num_resets == 5, "Expected 5 resets, got %u\n", obj->num_resets); + SendMessageW(hwnd_edit, WM_SETTEXT, 0, (LPARAM)str1a); + SendMessageW(hwnd_edit, EM_SETSEL, ARRAY_SIZE(str1a) - 1, ARRAY_SIZE(str1a) - 1); + SendMessageW(hwnd_edit, WM_CHAR, 'f', 1); + dispatch_messages(); + ok(obj->num_expand == 5, "Expected 5 expansions, got %u\n", obj->num_expand); + ok(lstrcmpW(obj->last_expand, str1a) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str1a), wine_dbgstr_w(obj->last_expand)); + ok(obj->num_resets == 6, "Expected 6 resets, got %u\n", obj->num_resets); + hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); + ok(hr == S_OK, "IAutoCompleteDropDown_ResetEnumerator failed: %x\n", hr); + SendMessageW(hwnd_edit, WM_CHAR, 'o', 1); + dispatch_messages(); + ok(obj->num_expand == 6, "Expected 6 expansions, got %u\n", obj->num_expand); + ok(lstrcmpW(obj->last_expand, str1a) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str1a), wine_dbgstr_w(obj->last_expand)); + ok(obj->num_resets == 7, "Expected 7 resets, got %u\n", obj->num_resets); } static void test_prefix_filtering(HWND hwnd_edit) @@ -775,7 +790,7 @@ static void test_custom_source(void) SendMessageW(hwnd_edit, WM_GETTEXT, ARRAY_SIZE(buffer), (LPARAM)buffer); ok(lstrcmpW(str_aut, buffer) == 0, "Expected %s, got %s\n", wine_dbgstr_w(str_aut), wine_dbgstr_w(buffer)); - test_aclist_expand(hwnd_edit, enumerator); + test_aclist_expand(hwnd_edit, enumerator, acdropdown); obj->num_resets = 0; hr = IAutoCompleteDropDown_ResetEnumerator(acdropdown); diff --git a/modules/rostests/winetests/shell32/shellole.c b/modules/rostests/winetests/shell32/shellole.c index 27964afcd36..15d85f93029 100644 --- a/modules/rostests/winetests/shell32/shellole.c +++ b/modules/rostests/winetests/shell32/shellole.c @@ -747,6 +747,7 @@ static void test_SHCreateQueryCancelAutoPlayMoniker(void) IMoniker_Release(mon); } +#define WM_EXPECTED_VALUE WM_APP #define DROPTEST_FILENAME "c:\\wintest.bin" struct DragParam { HWND hwnd; @@ -755,11 +756,20 @@ struct DragParam { static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + static BOOL expected; + switch (msg) { + case WM_EXPECTED_VALUE: + { + expected = lparam; + break; + } case WM_DROPFILES: { HDROP hDrop = (HDROP)wparam; char filename[MAX_PATH] = "dummy"; + POINT pt; + BOOL r; UINT num; num = DragQueryFileA(hDrop, 0xffffffff, NULL, 0); ok(num == 1, "expected 1, got %u\n", num); @@ -768,6 +778,10 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA num = DragQueryFileA(hDrop, 0, filename, sizeof(filename)); ok(num == strlen(DROPTEST_FILENAME), "got %u\n", num); ok(!strcmp(filename, DROPTEST_FILENAME), "got %s\n", filename); + r = DragQueryPoint(hDrop, &pt); + ok(r == expected, "expected %d, got %d\n", expected, r); + ok(pt.x == 10, "expected 10, got %d\n", pt.x); + ok(pt.y == 20, "expected 20, got %d\n", pt.y); DragFinish(hDrop); return 0; } @@ -822,7 +836,7 @@ static DWORD WINAPI drop_window_therad(void *arg) return 0; } -static void test_DragQueryFile(void) +static void test_DragQueryFile(BOOL non_client_flag) { struct DragParam param; HANDLE hThread; @@ -841,6 +855,9 @@ static void test_DragQueryFile(void) hDrop = GlobalAlloc(GHND, sizeof(DROPFILES) + (strlen(DROPTEST_FILENAME) + 2) * sizeof(WCHAR)); pDrop = GlobalLock(hDrop); + pDrop->pt.x = 10; + pDrop->pt.y = 20; + pDrop->fNC = non_client_flag; pDrop->pFiles = sizeof(DROPFILES); ret = MultiByteToWideChar(CP_ACP, 0, DROPTEST_FILENAME, -1, (LPWSTR)(pDrop + 1), strlen(DROPTEST_FILENAME) + 1); @@ -848,6 +865,9 @@ static void test_DragQueryFile(void) pDrop->fWide = TRUE; GlobalUnlock(hDrop); + r = PostMessageA(param.hwnd, WM_EXPECTED_VALUE, 0, !non_client_flag); + ok(r, "got %d\n", r); + r = PostMessageA(param.hwnd, WM_DROPFILES, (WPARAM)hDrop, 0); ok(r, "got %d\n", r); @@ -860,6 +880,7 @@ static void test_DragQueryFile(void) CloseHandle(param.ready); CloseHandle(hThread); } +#undef WM_EXPECTED_VALUE #undef DROPTEST_FILENAME static void test_SHCreateSessionKey(void) @@ -938,7 +959,8 @@ START_TEST(shellole) test_SHPropStg_functions(); test_SHCreateQueryCancelAutoPlayMoniker(); - test_DragQueryFile(); + test_DragQueryFile(TRUE); + test_DragQueryFile(FALSE); test_SHCreateSessionKey(); test_dragdrophelper(); diff --git a/modules/rostests/winetests/shell32/shellpath.c b/modules/rostests/winetests/shell32/shellpath.c index 38b56f01d37..f768f44c8b7 100644 --- a/modules/rostests/winetests/shell32/shellpath.c +++ b/modules/rostests/winetests/shell32/shellpath.c @@ -1875,7 +1875,10 @@ if (0) { /* crashes */ path = NULL; hr = pSHGetKnownFolderPath(folder_id, KF_FLAG_DEFAULT, NULL, &path); if (FAILED(hr)) + { + ok(path == NULL, "expected path == NULL\n"); continue; + } ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(path != NULL, "expected path != NULL\n"); diff --git a/modules/rostests/winetests/shell32/shfldr_special.c b/modules/rostests/winetests/shell32/shfldr_special.c index 09d82f088ba..e2a29d73db3 100644 --- a/modules/rostests/winetests/shell32/shfldr_special.c +++ b/modules/rostests/winetests/shell32/shfldr_special.c @@ -31,6 +31,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include "shellapi.h" +#include "shlwapi.h" #include "shlobj.h" #include "wine/test.h" @@ -240,10 +241,64 @@ static void test_desktop_folder(void) IShellFolder_Release(psf); } +static void test_desktop_displaynameof(void) +{ + static WCHAR MyComputer[] = { ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 }; + static WCHAR MyDocuments[] = { ':',':','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-','1','1','D','0','-','9','8','A','8','-','0','8','0','0','3','6','1','B','1','1','0','3','}', 0 }; + static WCHAR RecycleBin[] = { ':',':','{','6','4','5','F','F','0','4','0','-','5','0','8','1','-','1','0','1','B','-','9','F','0','8','-','0','0','A','A','0','0','2','F','9','5','4','E','}', 0 }; + static WCHAR ControlPanel[]= { ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}','\\', + ':',':','{','2','1','E','C','2','0','2','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','D','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 }; + static WCHAR *folders[] = { MyComputer, MyDocuments, RecycleBin, ControlPanel }; + IShellFolder *desktop; + ITEMIDLIST *pidl; + STRRET strret; + DWORD eaten; + HRESULT hr; + UINT i; + + hr = SHGetDesktopFolder(&desktop); + ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%08x\n", hr); + if (FAILED(hr)) return; + + for (i = 0; i < ARRAY_SIZE(folders); i++) + { + WCHAR name1[MAX_PATH], name2[MAX_PATH]; + + hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, folders[i], &eaten, &pidl, NULL); + ok(hr == S_OK, "IShellFolder::ParseDisplayName failed with error 0x%08x\n", hr); + if (FAILED(hr)) continue; + + hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER, &strret); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1)); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + + hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING | SHGDN_FORADDRESSBAR, &strret); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + hr = StrRetToBufW(&strret, pidl, name2, ARRAY_SIZE(name2)); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + + ok(!lstrcmpW(name1, name2), "the display names are not equal: %s vs %s\n", wine_dbgstr_w(name1), wine_dbgstr_w(name2)); + ok(name1[0] != ':' || name1[1] != ':', "display name is a GUID: %s\n", wine_dbgstr_w(name1)); + + hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &strret); + ok(hr == S_OK, "IShellFolder::GetDisplayNameOf failed with error 0x%08x\n", hr); + hr = StrRetToBufW(&strret, pidl, name1, ARRAY_SIZE(name1)); + ok(hr == S_OK, "StrRetToBuf failed with error 0x%08x\n", hr); + + ok(lstrcmpW(name1, name2), "the display names are equal: %s\n", wine_dbgstr_w(name1)); + ok(name1[0] == ':' && name1[1] == ':', "display name is not a GUID: %s\n", wine_dbgstr_w(name1)); + + ILFree(pidl); + } + IShellFolder_Release(desktop); +} + START_TEST(shfldr_special) { test_parse_for_entire_network(); test_parse_for_control_panel(); test_printers_folder(); test_desktop_folder(); + test_desktop_displaynameof(); } diff --git a/modules/rostests/winetests/shell32/shlexec.c b/modules/rostests/winetests/shell32/shlexec.c index b140280a5e0..af4b8e33850 100644 --- a/modules/rostests/winetests/shell32/shlexec.c +++ b/modules/rostests/winetests/shell32/shlexec.c @@ -119,15 +119,15 @@ static char* decodeA(const char* str) return ptr; } -static void WINETEST_PRINTF_ATTR(2,3) childPrintf(HANDLE h, const char* fmt, ...) +static void WINAPIV WINETEST_PRINTF_ATTR(2,3) childPrintf(HANDLE h, const char* fmt, ...) { - va_list valist; + __ms_va_list valist; char buffer[1024]; DWORD w; - va_start(valist, fmt); + __ms_va_start(valist, fmt); vsprintf(buffer, fmt, valist); - va_end(valist); + __ms_va_end(valist); WriteFile(h, buffer, strlen(buffer), &w, NULL); } @@ -353,16 +353,16 @@ static void dump_child_(const char* file, int line) ***/ static char shell_call[2048]; -static void WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...) +static void WINAPIV WINETEST_PRINTF_ATTR(2,3) _okShell(int condition, const char *msg, ...) { - va_list valist; + __ms_va_list valist; char buffer[2048]; strcpy(buffer, shell_call); strcat(buffer, " "); - va_start(valist, msg); + __ms_va_start(valist, msg); vsprintf(buffer+strlen(buffer), msg, valist); - va_end(valist); + __ms_va_end(valist); winetest_ok(condition, "%s", buffer); } #define okShell_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : _okShell @@ -2831,7 +2831,7 @@ static void test_directory(void) okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); - todo_wine okChildPath("longPath", path); + okChildPath("longPath", path); SetCurrentDirectoryA(curdir); rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, @@ -2844,7 +2844,7 @@ static void test_directory(void) okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); - todo_wine okChildPath("longPath", path); + okChildPath("longPath", path); /* Specify it through an environment variable */ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI, @@ -2856,7 +2856,7 @@ static void test_directory(void) okShell(rc > 32, "returned %lu\n", rc); okChildInt("argcA", 4); okChildString("argvA3", "Exec"); - todo_wine okChildPath("longPath", path); + okChildPath("longPath", path); /* Not a colon-separated directory list */ sprintf(dirpath, "%s:%s", curdir, tmpdir); diff --git a/modules/rostests/winetests/shell32/shlfileop.c b/modules/rostests/winetests/shell32/shlfileop.c index 9768e18de33..32870dc93ed 100644 --- a/modules/rostests/winetests/shell32/shlfileop.c +++ b/modules/rostests/winetests/shell32/shlfileop.c @@ -2547,6 +2547,7 @@ static void test_unicode(void) int ret; HANDLE file; static const WCHAR UNICODE_PATH_TO[] = {'c',':','\\',0x00ae,0x00ae,'\0'}; + HWND hwnd; shfoW.hwnd = NULL; shfoW.wFunc = FO_DELETE; @@ -2637,6 +2638,20 @@ static void test_unicode(void) ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == ERROR_INVALID_HANDLE), /* WinXp, win2k3 */ "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + + /* Check SHCreateDirectoryExW with a Hwnd + * returns ERROR_ALREADY_EXISTS where a directory already exists */ + /* Get any window handle */ + hwnd = FindWindowA(NULL, NULL); + ok(hwnd != 0, "FindWindowA failed to produce a hwnd\n"); + ret = SHCreateDirectoryExW(hwnd, UNICODE_PATH, NULL); + ok(!ret, "SHCreateDirectoryExW returned %d\n", ret); + /* Create already-existing directory */ + ok(file_existsW(UNICODE_PATH), "The directory was not created\n"); + ret = SHCreateDirectoryExW(hwnd, UNICODE_PATH, NULL); + ok(ret == ERROR_ALREADY_EXISTS, + "Expected ERROR_ALREADY_EXISTS, got %d\n", ret); + RemoveDirectoryW(UNICODE_PATH); } static void diff --git a/modules/rostests/winetests/shell32/shlfolder.c b/modules/rostests/winetests/shell32/shlfolder.c index f2bd6408ab7..4f22273c452 100644 --- a/modules/rostests/winetests/shell32/shlfolder.c +++ b/modules/rostests/winetests/shell32/shlfolder.c @@ -3859,6 +3859,8 @@ static void test_ShellItemArrayEnumItems(void) for(i = 0; i < done; i++) ILFree(apidl[i]); } + + IShellFolder_Release(psf); }
5 years
1
0
0
0
[reactos] 01/01: [SHDOCVW] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=09ad24e1f4c505f6e91e7…
commit 09ad24e1f4c505f6e91e71f4873c0168123db801 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:49:41 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:49:41 2019 +0100 [SHDOCVW] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/shdocvw/precomp.h | 2 -- dll/win32/shdocvw/shdocvw.h | 1 - dll/win32/shdocvw/shdocvw_main.c | 6 +++--- dll/win32/shdocvw/shlinstobj.c | 1 - media/doc/README.WINE | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dll/win32/shdocvw/precomp.h b/dll/win32/shdocvw/precomp.h index 48f0f297162..d506e87bb61 100644 --- a/dll/win32/shdocvw/precomp.h +++ b/dll/win32/shdocvw/precomp.h @@ -2,8 +2,6 @@ #ifndef _SHDOCVW_PRECOMP_H #define _SHDOCVW_PRECOMP_H -#include <wine/config.h> - #define WIN32_NO_STATUS #define _INC_WINDOWS #define COM_NO_WINDOWS_H diff --git a/dll/win32/shdocvw/shdocvw.h b/dll/win32/shdocvw/shdocvw.h index 8cac5073217..568fbadfbd6 100644 --- a/dll/win32/shdocvw/shdocvw.h +++ b/dll/win32/shdocvw/shdocvw.h @@ -34,7 +34,6 @@ #include "shlobj.h" #include "exdisp.h" -#include "wine/unicode.h" #include "wine/heap.h" #include "wine/list.h" diff --git a/dll/win32/shdocvw/shdocvw_main.c b/dll/win32/shdocvw/shdocvw_main.c index e699b4c2c9d..d52961909fc 100644 --- a/dll/win32/shdocvw/shdocvw_main.c +++ b/dll/win32/shdocvw/shdocvw_main.c @@ -20,17 +20,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #include <stdio.h> -#include "wine/unicode.h" #include "wine/debug.h" #include "shdocvw.h" #include "winreg.h" +#ifdef __REACTOS__ +#include "winnls.h" +#endif #include "shlwapi.h" #include "wininet.h" #include "isguids.h" diff --git a/dll/win32/shdocvw/shlinstobj.c b/dll/win32/shdocvw/shlinstobj.c index 6f6786bdb57..189c27cad58 100644 --- a/dll/win32/shdocvw/shlinstobj.c +++ b/dll/win32/shdocvw/shlinstobj.c @@ -35,7 +35,6 @@ #include "shdocvw.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 86634472cde..4336f2df7e6 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -172,7 +172,7 @@ dll/win32/security # Forked (different .spec) dll/win32/sensapi # Synced to WineStaging-4.18 dll/win32/setupapi # Forked at Wine-20050524 dll/win32/shdoclc # Synced to WineStaging-3.3 -dll/win32/shdocvw # Synced to WineStaging-4.0 +dll/win32/shdocvw # Synced to WineStaging-4.18 dll/win32/shell32 # Forked at Wine-20071011 dll/win32/shfolder # Synced to WineStaging-3.3 dll/win32/shlwapi # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [SENSAPI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d44df9b83ddaa5a834dec…
commit d44df9b83ddaa5a834dece9d3e89d3c9a2e653f0 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 30 14:49:13 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 30 14:49:13 2019 +0100 [SENSAPI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/sensapi/sensapi.c | 3 --- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dll/win32/sensapi/sensapi.c b/dll/win32/sensapi/sensapi.c index 0d2f2128cec..0588036609c 100644 --- a/dll/win32/sensapi/sensapi.c +++ b/dll/win32/sensapi/sensapi.c @@ -22,8 +22,6 @@ * connections. For Wine we just report that we are always connected. */ -#include "config.h" - #include <stdarg.h> #include <stdio.h> @@ -39,7 +37,6 @@ #include "uuids.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(sensapi); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 29f24b6e112..86634472cde 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -169,7 +169,7 @@ dll/win32/schannel # Synced to WineStaging-3.3 dll/win32/scrrun # Synced to WineStaging-4.18 dll/win32/secur32 # Forked dll/win32/security # Forked (different .spec) -dll/win32/sensapi # Synced to WineStaging-3.3 +dll/win32/sensapi # Synced to WineStaging-4.18 dll/win32/setupapi # Forked at Wine-20050524 dll/win32/shdoclc # Synced to WineStaging-3.3 dll/win32/shdocvw # Synced to WineStaging-4.0
5 years
1
0
0
0
← Newer
1
2
3
4
...
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