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
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
March 2022
----- 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
20 participants
436 discussions
Start a n
N
ew thread
[reactos] 331/360: [WINESYNC] msi: Remove CDECL on static functions where not needed.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c239da3a8a87ae66c4495…
commit c239da3a8a87ae66c4495da8bffcbd66ae17321e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:53:15 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:40 2022 +0100 [WINESYNC] msi: Remove CDECL on static functions where not needed. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id b60e4064508e79ca6fdb2937ca8cfd3f58423f79 by Francois Gouget <fgouget(a)free.fr> --- dll/win32/msi/media.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/msi/media.c b/dll/win32/msi/media.c index 41c82af1b59..cc4648481ba 100644 --- a/dll/win32/msi/media.c +++ b/dll/win32/msi/media.c @@ -271,7 +271,7 @@ static LONG CDECL cabinet_seek_stream( INT_PTR hf, LONG dist, int seektype ) return -1; } -static UINT CDECL msi_media_get_disk_info(MSIPACKAGE *package, MSIMEDIAINFO *mi) +static UINT msi_media_get_disk_info(MSIPACKAGE *package, MSIMEDIAINFO *mi) { MSIRECORD *row;
2 years, 7 months
1
0
0
0
[reactos] 330/360: [WINESYNC] msi: Fix ASCII / ANSI mixups in comments.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=026a2db6146eab7cb736f…
commit 026a2db6146eab7cb736fe8f9b3ad63300e8fe87 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:53:14 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:39 2022 +0100 [WINESYNC] msi: Fix ASCII / ANSI mixups in comments. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 45fb4ac4e2f94486e36d6d271c08b59feee4d12e by Francois Gouget <fgouget(a)free.fr> --- dll/win32/msi/msipriv.h | 2 +- dll/win32/msi/package.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h index ea4bd0a20e3..e3b808db89a 100644 --- a/dll/win32/msi/msipriv.h +++ b/dll/win32/msi/msipriv.h @@ -735,7 +735,7 @@ struct tagMSIMIME #define MSIHANDLE_MAGIC 0x4d434923 -/* handle unicode/ascii output in the Msi* API functions */ +/* handle unicode/ansi output in the Msi* API functions */ typedef struct { BOOL unicode; union { diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index f1b0d7d8866..7e28e111b7b 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -1813,7 +1813,7 @@ INT MSI_ProcessMessageVerbatim(MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSI_FormatRecordW(package, record, message, &len); } - /* convert it to ASCII */ + /* convert it to ANSI */ len = WideCharToMultiByte( CP_ACP, 0, message, -1, NULL, 0, NULL, NULL ); msg = msi_alloc( len ); WideCharToMultiByte( CP_ACP, 0, message, -1, msg, len, NULL, NULL );
2 years, 7 months
1
0
0
0
[reactos] 329/360: [WINESYNC] include: Fix size of MsiEnumClientsEx[AW]'s array argument (GCC).
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a1c22503d3fa93d95d0f…
commit 0a1c22503d3fa93d95d0f86626ddc3a1df3928f3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:44:03 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:39 2022 +0100 [WINESYNC] include: Fix size of MsiEnumClientsEx[AW]'s array argument (GCC). Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 14e205ff502ec7275d2c4cf59b1446ac0a294416 by Alex Henrie <alexhenrie24(a)gmail.com> --- sdk/include/psdk/msi.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/include/psdk/msi.h b/sdk/include/psdk/msi.h index f1a19177ed6..b79efaea5c6 100644 --- a/sdk/include/psdk/msi.h +++ b/sdk/include/psdk/msi.h @@ -604,6 +604,10 @@ MsiEnumClientsW( #define MsiEnumClients WINELIB_NAME_AW(MsiEnumClients) +UINT WINAPI MsiEnumClientsExA(_In_ LPCSTR szComponent, _In_opt_ LPCSTR szUserSid, _In_ DWORD dwContext, _In_ DWORD dwProductIndex, _Out_opt_ CHAR szProductBuf[39], _Out_opt_ MSIINSTALLCONTEXT* pdwInstalledContext, _Out_opt_ LPSTR szSid, _Inout_opt_ LPDWORD pcchSid); +UINT WINAPI MsiEnumClientsExW(_In_ LPCWSTR szComponent, _In_opt_ LPCWSTR szUserSid, _In_ DWORD dwContext, _In_ DWORD dwProductIndex, _Out_opt_ WCHAR szProductBuf[39], _Out_opt_ MSIINSTALLCONTEXT* pdwInstalledContext, _Out_opt_ LPWSTR szSid, _Inout_opt_ LPDWORD pcchSid); +#define MsiEnumClientsEx WINELIB_NAME_AW(MsiEnumClientsEx) + UINT WINAPI MsiOpenPackageA(_In_ LPCSTR, _Out_ MSIHANDLE*); UINT WINAPI MsiOpenPackageW(_In_ LPCWSTR, _Out_ MSIHANDLE*); #define MsiOpenPackage WINELIB_NAME_AW(MsiOpenPackage)
2 years, 7 months
1
0
0
0
[reactos] 328/360: [WINESYNC] msiexec: Enable visual styles.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8f4759920fb776b26c09…
commit a8f4759920fb776b26c09a52f5bdcfeb4f6faebb Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:18 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:39 2022 +0100 [WINESYNC] msiexec: Enable visual styles. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 76e448bd7dc147443191b9f652f2f274f44e9fbe by Zhiyi Zhang <zzhang(a)codeweavers.com> --- base/system/msiexec/CMakeLists.txt | 2 +- base/system/msiexec/msiexec.c | 3 +++ base/system/msiexec/msiexec.manifest | 16 ++++++++++++++++ base/system/msiexec/rsrc.rc | 3 +++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/base/system/msiexec/CMakeLists.txt b/base/system/msiexec/CMakeLists.txt index 626055cb55d..2c704510e2a 100644 --- a/base/system/msiexec/CMakeLists.txt +++ b/base/system/msiexec/CMakeLists.txt @@ -12,6 +12,6 @@ add_rc_deps(rsrc.rc ${CMAKE_CURRENT_SOURCE_DIR}/msiexec.ico) add_executable(msiexec ${SOURCE} rsrc.rc) set_module_type(msiexec win32gui) target_link_libraries(msiexec uuid wine) -add_importlibs(msiexec user32 advapi32 ole32 msi msvcrt kernel32 ntdll) +add_importlibs(msiexec user32 advapi32 ole32 comctl32 msi msvcrt kernel32 ntdll) add_pch(msiexec precomp.h SOURCE) add_cd_file(TARGET msiexec DESTINATION reactos/system32 FOR all) diff --git a/base/system/msiexec/msiexec.c b/base/system/msiexec/msiexec.c index 12ff7e7dc4e..5e0e1b107e8 100644 --- a/base/system/msiexec/msiexec.c +++ b/base/system/msiexec/msiexec.c @@ -22,6 +22,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> +#include <commctrl.h> #include <msi.h> #include <winsvc.h> #include <objbase.h> @@ -626,6 +627,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine int argc; LPWSTR *argvW = NULL; + InitCommonControls(); + /* parse the command line */ process_args( GetCommandLineW(), &argc, &argvW ); diff --git a/base/system/msiexec/msiexec.manifest b/base/system/msiexec/msiexec.manifest new file mode 100644 index 00000000000..a4a17a5397d --- /dev/null +++ b/base/system/msiexec/msiexec.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 type="win32" name="Wine.Msiexec" version="0.0.0.0"/> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/base/system/msiexec/rsrc.rc b/base/system/msiexec/rsrc.rc index 91c3df8d7ec..9cc45a446ee 100644 --- a/base/system/msiexec/rsrc.rc +++ b/base/system/msiexec/rsrc.rc @@ -33,3 +33,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: msiexec.ico */ 1 ICON msiexec.ico + +/* @makedep: msiexec.manifest */ +1 RT_MANIFEST msiexec.manifest
2 years, 7 months
1
0
0
0
[reactos] 327/360: [WINESYNC] msi: Check for a NULL return from deformat_string() when checking for failure.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de80f2a3c11778003e075…
commit de80f2a3c11778003e075a4cb655d82f45b5208b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:13 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:39 2022 +0100 [WINESYNC] msi: Check for a NULL return from deformat_string() when checking for failure. An empty string is valid, and can occur if e.g. a nonexistent property is expanded. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51091
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 814f18ab756cd69158ce893c4f7898e14d3e46dc by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/action.c | 69 +++++++++++++++++++++------------ modules/rostests/winetests/msi/action.c | 8 +++- 2 files changed, 52 insertions(+), 25 deletions(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index 40d0596a717..f7186446203 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -6818,25 +6818,34 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param ) if (res != ERROR_SUCCESS || !value) goto done; - if (value && !deformat_string(package, value, &deformatted)) + if (value) { - res = ERROR_OUTOFMEMORY; - goto done; - } + DWORD len = deformat_string( package, value, &deformatted ); + if (!deformatted) + { + res = ERROR_OUTOFMEMORY; + goto done; + } - if ((value = deformatted)) - { - if (flags & ENV_MOD_PREFIX) + if (len) { - p = wcsrchr( value, ';' ); - len_value = p - value; + value = deformatted; + if (flags & ENV_MOD_PREFIX) + { + p = wcsrchr( value, ';' ); + len_value = p - value; + } + else if (flags & ENV_MOD_APPEND) + { + value = wcschr( value, ';' ) + 1; + len_value = lstrlenW( value ); + } + else len_value = lstrlenW( value ); } - else if (flags & ENV_MOD_APPEND) + else { - value = wcschr( value, ';' ) + 1; - len_value = lstrlenW( value ); + value = NULL; } - else len_value = lstrlenW( value ); } res = open_env_key( flags, &env ); @@ -7025,22 +7034,34 @@ static UINT ITERATE_RemoveEnvironmentString( MSIRECORD *rec, LPVOID param ) return ERROR_SUCCESS; } - if (value && !deformat_string( package, value, &deformatted )) - return ERROR_OUTOFMEMORY; - - if ((value = deformatted)) + if (value) { - if (flags & ENV_MOD_PREFIX) + DWORD len = deformat_string( package, value, &deformatted ); + if (!deformatted) + { + res = ERROR_OUTOFMEMORY; + goto done; + } + + if (len) { - p = wcschr( value, ';' ); - len_value = p - value; + value = deformatted; + if (flags & ENV_MOD_PREFIX) + { + p = wcsrchr( value, ';' ); + len_value = p - value; + } + else if (flags & ENV_MOD_APPEND) + { + value = wcschr( value, ';' ) + 1; + len_value = lstrlenW( value ); + } + else len_value = lstrlenW( value ); } - else if (flags & ENV_MOD_APPEND) + else { - value = wcschr( value, ';' ) + 1; - len_value = lstrlenW( value ); + value = NULL; } - else len_value = lstrlenW( value ); } r = open_env_key( flags, &env ); diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index ce3b47cfe02..2c5f5b0dc40 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -252,7 +252,9 @@ static const char env_environment_dat[] = "Var27\t+-MSITESTVAR21\t[~];1\tOne\n" "Var28\t-MSITESTVAR22\t1\tOne\n" "Var29\t-MSITESTVAR23\t2\tOne\n" - "Var30\t*MSITESTVAR100\t1\tOne\n"; + "Var30\t*MSITESTVAR100\t1\tOne\n" + "Var31\t-=MSITESTVAR24\t[SERVNAME]\tOne\n" + "Var32\t-=MSITESTVAR25\t[bogus_prop]\tOne\n"; static const char service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t" @@ -5047,6 +5049,7 @@ static void test_envvar(void) CHECK_REG_STR(env, "MSITESTVAR19", "1"); CHECK_REG_STR(env, "MSITESTVAR20", "1"); CHECK_REG_STR(env, "MSITESTVAR21", "1"); + CHECK_REG_STR(env, "MSITESTVAR24", "TestService"); CHECK_REG_STR(env2, "MSITESTVAR100", "1"); res = RegSetValueExA(env, "MSITESTVAR22", 0, REG_SZ, (const BYTE *)"1", 2); @@ -5055,6 +5058,9 @@ static void test_envvar(void) res = RegSetValueExA(env, "MSITESTVAR23", 0, REG_SZ, (const BYTE *)"1", 2); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + res = RegDeleteValueA(env, "MSITESTVAR25"); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(!r, "got %u\n", r);
2 years, 7 months
1
0
0
0
[reactos] 326/360: [WINESYNC] msi/tests: Make check_reg_* helpers more verbose.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8975937c00c2267a6f4b7…
commit 8975937c00c2267a6f4b78d1a9c384c95f207a26 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:12 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:39 2022 +0100 [WINESYNC] msi/tests: Make check_reg_* helpers more verbose. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id a0f54eee2a5dc985d7e16c382516c8b66e61e54f by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/action.c | 129 ++++++++++++++------------------ 1 file changed, 57 insertions(+), 72 deletions(-) diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index 4ee73ec1fc1..ce3b47cfe02 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -2505,7 +2505,7 @@ static void delete_pfmsitest_files(void) RemoveDirectoryA(path); } -static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, DWORD line) +static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, BOOL todo, DWORD line) { char val[MAX_PATH]; DWORD size, type; @@ -2513,19 +2513,16 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase size = MAX_PATH; val[0] = '\0'; - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size); - - if (res != ERROR_SUCCESS || - (type != REG_SZ && type != REG_EXPAND_SZ)) + res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size); + ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); + ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %u\n", type); + todo_wine_if (todo) { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; + if (bcase) + ok_(__FILE__, line)(!strcmp(val, expected), "got %s\n", debugstr_a(val)); + else + ok_(__FILE__, line)(!strcasecmp(val, expected), "got %s\n", debugstr_a(val)); } - - if (bcase) - ok_(__FILE__, line)(!strcmp(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); - else - ok_(__FILE__, line)(!strcasecmp(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); } static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, DWORD line) @@ -2542,49 +2539,46 @@ static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, size = MAX_PATH; val[0] = '\0'; res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size); - - if (res != ERROR_SUCCESS || type != REG_MULTI_SZ) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - + ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); + ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %u\n", type); ok_(__FILE__, line)(size == expect_size, "expected size %u, got %u\n", expect_size, size); ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size)); } -static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD line) +static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, BOOL todo, DWORD line) { DWORD val, size, type; LONG res; size = sizeof(DWORD); - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size); - - if (res != ERROR_SUCCESS || type != REG_DWORD) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val); + res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)&val, &size); + ok_(__FILE__, line)(!res, "Failed to query value, error %u\n", res); + ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %u\n", type); + todo_wine_if (todo) + ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val); } #define CHECK_REG_STR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, TRUE, __LINE__); + check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__); #define CHECK_DEL_REG_STR(prodkey, name, expected) \ do { \ - check_reg_str(prodkey, name, expected, TRUE, __LINE__); \ + check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__); \ + RegDeleteValueA(prodkey, name); \ + } while(0) + +#define CHECK_DEL_REG_STR_TODO(prodkey, name, expected) \ + do { \ + check_reg_str(prodkey, name, expected, TRUE, TRUE, __LINE__); \ RegDeleteValueA(prodkey, name); \ } while(0) #define CHECK_REG_ISTR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, FALSE, __LINE__); + check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__); #define CHECK_DEL_REG_ISTR(prodkey, name, expected) \ do { \ - check_reg_str(prodkey, name, expected, FALSE, __LINE__); \ + check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__); \ RegDeleteValueA(prodkey, name); \ } while(0) @@ -2598,11 +2592,20 @@ static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD lin } while(0) #define CHECK_REG_DWORD(prodkey, name, expected) \ - check_reg_dword(prodkey, name, expected, __LINE__); + check_reg_dword(prodkey, name, expected, FALSE, __LINE__); + +#define CHECK_REG_DWORD_TODO(prodkey, name, expected) \ + check_reg_dword(prodkey, name, expected, TRUE, __LINE__); #define CHECK_DEL_REG_DWORD(prodkey, name, expected) \ do { \ - check_reg_dword(prodkey, name, expected, __LINE__); \ + check_reg_dword(prodkey, name, expected, FALSE, __LINE__); \ + RegDeleteValueA(prodkey, name); \ + } while(0) + +#define CHECK_DEL_REG_DWORD_TODO(prodkey, name, expected) \ + do { \ + check_reg_dword(prodkey, name, expected, TRUE, __LINE__); \ RegDeleteValueA(prodkey, name); \ } while(0) @@ -2726,8 +2729,7 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -2768,8 +2770,7 @@ static void test_register_product(void) CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(props, ""); ok(!res, "got %d\n", res); @@ -2833,8 +2834,7 @@ todo_wine CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -2875,8 +2875,7 @@ todo_wine CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(props, ""); ok(!res, "got %d\n", res); @@ -2947,8 +2946,7 @@ todo_wine CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -2989,8 +2987,7 @@ todo_wine CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); - todo_wine - CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size()); + CHECK_DEL_REG_DWORD_TODO(props, "EstimatedSize", get_estimated_size()); res = RegDeleteKeyA(props, ""); ok(!res, "got %d\n", res); @@ -3115,11 +3112,9 @@ static void test_publish_product(void) ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res); + if (!res) CHECK_DEL_REG_STR(patches, "AllPatches", ""); - } delete_key(patches, "", access); RegCloseKey(patches); @@ -3196,11 +3191,9 @@ currentuser: ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + todo_wine ok(!res, "Expected ERROR_SUCCESS, got %d\n", res); + if (!res) CHECK_DEL_REG_STR(patches, "AllPatches", ""); - } delete_key(patches, "", access); RegCloseKey(patches); @@ -3217,7 +3210,7 @@ machprod: CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); if (!old_installer) CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0); - todo_wine CHECK_DEL_REG_DWORD(hkey, "Assignment", 1); + CHECK_DEL_REG_DWORD_TODO(hkey, "Assignment", 1); CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0"); @@ -3863,8 +3856,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -3968,8 +3960,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -4050,8 +4041,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -4109,8 +4099,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -4168,8 +4157,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -4250,8 +4238,7 @@ static void test_publish(void) CHECK_REG_DWORD(prodkey, "VersionMajor", 1); CHECK_REG_DWORD(prodkey, "VersionMinor", 1); CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - CHECK_REG_DWORD(prodkey, "EstimatedSize", get_estimated_size()); + CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size()); RegCloseKey(prodkey); @@ -5075,10 +5062,8 @@ static void test_envvar(void) CHECK_DEL_REG_STR(env, "MSITESTVAR14", ";1;"); CHECK_DEL_REG_STR(env, "MSITESTVAR15", ";;1;;"); CHECK_DEL_REG_STR(env, "MSITESTVAR16", " 1 "); -todo_wine { - CHECK_DEL_REG_STR(env, "MSITESTVAR17", "1"); - CHECK_DEL_REG_STR(env, "MSITESTVAR18", "1"); -} + CHECK_DEL_REG_STR_TODO(env, "MSITESTVAR17", "1"); + CHECK_DEL_REG_STR_TODO(env, "MSITESTVAR18", "1"); CHECK_DEL_REG_STR(env, "MSITESTVAR23", "1"); for (i = 1; i <= 23; i++)
2 years, 7 months
1
0
0
0
[reactos] 325/360: [WINESYNC] msi/tests: Always explicitly test REG_MULTI_SZ strings.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c5955053769e586f8de76…
commit c5955053769e586f8de76a3f57c16388e75975f3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:12 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:38 2022 +0100 [WINESYNC] msi/tests: Always explicitly test REG_MULTI_SZ strings. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 80426fdc76597768b787a38644f1c53110b26f05 by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/action.c | 38 ++++++++++++++++++++++----------- sdk/include/reactos/wine/test.h | 1 + 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index 35bdeecfa1a..4ee73ec1fc1 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -2516,7 +2516,7 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size); if (res != ERROR_SUCCESS || - (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_MULTI_SZ)) + (type != REG_SZ && type != REG_EXPAND_SZ)) { ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); return; @@ -2531,9 +2531,14 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, DWORD line) { char val[MAX_PATH]; - DWORD size, type; + DWORD expect_size = 0, size, type; + const char *p; LONG res; + for (p = expect; *p; p += strlen(p) + 1) + ; + expect_size = (p + 1) - expect; + size = MAX_PATH; val[0] = '\0'; res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size); @@ -2544,7 +2549,8 @@ static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, return; } - ok_(__FILE__, line)(!memcmp(val, expect, size), "wrong data\n"); + ok_(__FILE__, line)(size == expect_size, "expected size %u, got %u\n", expect_size, size); + ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size)); } static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD line) @@ -2585,6 +2591,12 @@ static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD lin #define CHECK_REG_MULTI(key, name, expect) \ check_reg_multi(key, name, expect, __LINE__); +#define CHECK_DEL_REG_MULTI(key, name, expect) \ + do { \ + check_reg_multi(key, name, expect, __LINE__); \ + RegDeleteValueA(key, name); \ + } while(0) + #define CHECK_REG_DWORD(prodkey, name, expected) \ check_reg_dword(prodkey, name, expected, __LINE__); @@ -3127,7 +3139,7 @@ currentuser: CHECK_DEL_REG_DWORD(hkey, "Assignment", 0); CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); - CHECK_DEL_REG_STR(hkey, "Clients", ":"); + CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0"); res = RegOpenKeyA(hkey, "SourceList", &sourcelist); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3208,7 +3220,7 @@ machprod: todo_wine CHECK_DEL_REG_DWORD(hkey, "Assignment", 1); CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); - CHECK_DEL_REG_STR(hkey, "Clients", ":"); + CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0"); res = RegOpenKeyExA(hkey, "SourceList", 0, access, &sourcelist); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -6361,24 +6373,24 @@ static void test_publish_assemblies(void) res = RegOpenKeyA(HKEY_CURRENT_USER, path_dotnet, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); + CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0"); RegCloseKey(hkey); path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox"); + CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0"); RegCloseKey(hkey); res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%"); + CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0"); RegCloseKey(hkey); path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local; res = RegOpenKeyA(HKEY_CURRENT_USER, path, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!"); + CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0"); RegCloseKey(hkey); /* No registration is done for a local assembly with no matching file */ @@ -6425,24 +6437,24 @@ static void test_publish_assemblies(void) res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey); } ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]"); + CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0"); RegCloseKey(hkey); path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox"); + CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0"); RegCloseKey(hkey); res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_win32, 0, access, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%"); + CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0"); RegCloseKey(hkey); path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local; res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!"); + CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0"); RegCloseKey(hkey); /* No registration is done for a local assembly with no matching file */ diff --git a/sdk/include/reactos/wine/test.h b/sdk/include/reactos/wine/test.h index 423d7ac3637..45578f1a65d 100644 --- a/sdk/include/reactos/wine/test.h +++ b/sdk/include/reactos/wine/test.h @@ -85,6 +85,7 @@ extern const char *wine_dbgstr_rect( const RECT *rect ); extern const char *wine_dbgstr_longlong( ULONGLONG ll ); #endif static inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); } +static inline const char *debugstr_an( const CHAR *s, intptr_t n ) { return wine_dbgstr_an( s, n ); } static inline const char *wine_dbgstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); } static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
2 years, 7 months
1
0
0
0
[reactos] 324/360: [WINESYNC] msi: Write "Clients" value as REG_MULTI_SZ in PublishProduct.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d3876e40f3f50b5fa6cf…
commit 9d3876e40f3f50b5fa6cf9ae78a7097b9912b3c3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:12 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:38 2022 +0100 [WINESYNC] msi: Write "Clients" value as REG_MULTI_SZ in PublishProduct. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 1951853d06144e67b8a3d9d63c835e06a7232588 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index c628239e676..40d0596a717 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -4065,7 +4065,7 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey) msi_reg_set_val_dword(hkey, L"Assignment", 0); msi_reg_set_val_dword(hkey, L"AdvertiseFlags", 0x184); msi_reg_set_val_dword(hkey, INSTALLPROPERTY_INSTANCETYPEW, 0); - msi_reg_set_val_str(hkey, L"Clients", L":"); + msi_reg_set_val_multi_str(hkey, L"Clients", L":\0"); if (!(guids = msi_get_package_code(package->db))) return ERROR_OUTOFMEMORY; if ((ptr = wcschr(guids, ';'))) *ptr = 0;
2 years, 7 months
1
0
0
0
[reactos] 323/360: [WINESYNC] msi/tests: Pass an empty string to check_reg_str() instead of special-casing NULL.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c80eb17f5afdcd07adc6…
commit 8c80eb17f5afdcd07adc6c9b855d81983476134e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 23:41:11 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:38 2022 +0100 [WINESYNC] msi/tests: Pass an empty string to check_reg_str() instead of special-casing NULL. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 2052d03fdf82ea9112c6ce3719936e245834eeb7 by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/action.c | 265 ++++++++++++++++---------------- 1 file changed, 130 insertions(+), 135 deletions(-) diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index cd4e2fd4c6c..35bdeecfa1a 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -2522,15 +2522,10 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase return; } - if (!expected) - ok_(__FILE__, line)(!val[0], "Expected empty string, got %s\n", val); + if (bcase) + ok_(__FILE__, line)(!strcmp(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); else - { - if (bcase) - ok_(__FILE__, line)(!lstrcmpA(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); - else - ok_(__FILE__, line)(!lstrcmpiA(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); - } + ok_(__FILE__, line)(!strcasecmp(val, expected), "Expected \"%s\", got \"%s\"\n", expected, val); } static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, DWORD line) @@ -2703,17 +2698,17 @@ static void test_register_product(void) CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(hkey, "Comments", NULL); - CHECK_DEL_REG_STR(hkey, "Contact", NULL); - CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); - CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(hkey, "Comments", ""); + CHECK_DEL_REG_STR(hkey, "Contact", ""); + CHECK_DEL_REG_STR(hkey, "HelpLink", ""); + CHECK_DEL_REG_STR(hkey, "HelpTelephone", ""); + CHECK_DEL_REG_STR(hkey, "InstallLocation", ""); CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); - CHECK_DEL_REG_STR(hkey, "Readme", NULL); - CHECK_DEL_REG_STR(hkey, "Size", NULL); - CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(hkey, "Readme", ""); + CHECK_DEL_REG_STR(hkey, "Size", ""); + CHECK_DEL_REG_STR(hkey, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(hkey, "Language", 1033); CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); @@ -2745,17 +2740,17 @@ static void test_register_product(void) CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "Publisher", "Wine"); CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(props, "Comments", NULL); - CHECK_DEL_REG_STR(props, "Contact", NULL); - CHECK_DEL_REG_STR(props, "HelpLink", NULL); - CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(props, "Comments", ""); + CHECK_DEL_REG_STR(props, "Contact", ""); + CHECK_DEL_REG_STR(props, "HelpLink", ""); + CHECK_DEL_REG_STR(props, "HelpTelephone", ""); + CHECK_DEL_REG_STR(props, "InstallLocation", ""); CHECK_DEL_REG_DWORD(props, "NoModify", 1); - CHECK_DEL_REG_STR(props, "Readme", NULL); - CHECK_DEL_REG_STR(props, "Size", NULL); - CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(props, "Readme", ""); + CHECK_DEL_REG_STR(props, "Size", ""); + CHECK_DEL_REG_STR(props, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(props, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(props, "Language", 1033); CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); @@ -2785,7 +2780,7 @@ todo_wine res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", ""); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -2810,17 +2805,17 @@ todo_wine CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(hkey, "Comments", NULL); - CHECK_DEL_REG_STR(hkey, "Contact", NULL); - CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); - CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(hkey, "Comments", ""); + CHECK_DEL_REG_STR(hkey, "Contact", ""); + CHECK_DEL_REG_STR(hkey, "HelpLink", ""); + CHECK_DEL_REG_STR(hkey, "HelpTelephone", ""); + CHECK_DEL_REG_STR(hkey, "InstallLocation", ""); CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); - CHECK_DEL_REG_STR(hkey, "Readme", NULL); - CHECK_DEL_REG_STR(hkey, "Size", NULL); - CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(hkey, "Readme", ""); + CHECK_DEL_REG_STR(hkey, "Size", ""); + CHECK_DEL_REG_STR(hkey, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(hkey, "Language", 1033); CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); @@ -2852,17 +2847,17 @@ todo_wine CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "Publisher", "Wine"); CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(props, "Comments", NULL); - CHECK_DEL_REG_STR(props, "Contact", NULL); - CHECK_DEL_REG_STR(props, "HelpLink", NULL); - CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(props, "Comments", ""); + CHECK_DEL_REG_STR(props, "Contact", ""); + CHECK_DEL_REG_STR(props, "HelpLink", ""); + CHECK_DEL_REG_STR(props, "HelpTelephone", ""); + CHECK_DEL_REG_STR(props, "InstallLocation", ""); CHECK_DEL_REG_DWORD(props, "NoModify", 1); - CHECK_DEL_REG_STR(props, "Readme", NULL); - CHECK_DEL_REG_STR(props, "Size", NULL); - CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(props, "Readme", ""); + CHECK_DEL_REG_STR(props, "Size", ""); + CHECK_DEL_REG_STR(props, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(props, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(props, "Language", 1033); CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); @@ -2892,7 +2887,7 @@ todo_wine res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", ""); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -2924,17 +2919,17 @@ todo_wine CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(hkey, "Comments", NULL); - CHECK_DEL_REG_STR(hkey, "Contact", NULL); - CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); - CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); + CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(hkey, "Comments", ""); + CHECK_DEL_REG_STR(hkey, "Contact", ""); + CHECK_DEL_REG_STR(hkey, "HelpLink", ""); + CHECK_DEL_REG_STR(hkey, "HelpTelephone", ""); + CHECK_DEL_REG_STR(hkey, "InstallLocation", ""); CHECK_DEL_REG_DWORD(hkey, "NoModify", 1); - CHECK_DEL_REG_STR(hkey, "Readme", NULL); - CHECK_DEL_REG_STR(hkey, "Size", NULL); - CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(hkey, "Readme", ""); + CHECK_DEL_REG_STR(hkey, "Size", ""); + CHECK_DEL_REG_STR(hkey, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(hkey, "Language", 1033); CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); @@ -2966,17 +2961,17 @@ todo_wine CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_DEL_REG_STR(props, "Publisher", "Wine"); CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(props, "Comments", NULL); - CHECK_DEL_REG_STR(props, "Contact", NULL); - CHECK_DEL_REG_STR(props, "HelpLink", NULL); - CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(props, "InstallLocation", NULL); + CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", ""); + CHECK_DEL_REG_STR(props, "Comments", ""); + CHECK_DEL_REG_STR(props, "Contact", ""); + CHECK_DEL_REG_STR(props, "HelpLink", ""); + CHECK_DEL_REG_STR(props, "HelpTelephone", ""); + CHECK_DEL_REG_STR(props, "InstallLocation", ""); CHECK_DEL_REG_DWORD(props, "NoModify", 1); - CHECK_DEL_REG_STR(props, "Readme", NULL); - CHECK_DEL_REG_STR(props, "Size", NULL); - CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); + CHECK_DEL_REG_STR(props, "Readme", ""); + CHECK_DEL_REG_STR(props, "Size", ""); + CHECK_DEL_REG_STR(props, "URLInfoAbout", ""); + CHECK_DEL_REG_STR(props, "URLUpdateInfo", ""); CHECK_DEL_REG_DWORD(props, "Language", 1033); CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); @@ -3006,7 +3001,7 @@ todo_wine res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", ""); res = RegDeleteKeyA(hkey, ""); ok(!res, "got %d\n", res); @@ -3111,7 +3106,7 @@ static void test_publish_product(void) todo_wine { ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(patches, "AllPatches", NULL); + CHECK_DEL_REG_STR(patches, "AllPatches", ""); } delete_key(patches, "", access); @@ -3165,7 +3160,7 @@ currentuser: res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", ""); RegDeleteKeyA(hkey, ""); RegCloseKey(hkey); @@ -3192,7 +3187,7 @@ currentuser: todo_wine { ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(patches, "AllPatches", NULL); + CHECK_DEL_REG_STR(patches, "AllPatches", ""); } delete_key(patches, "", access); @@ -3250,7 +3245,7 @@ machprod: res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", ""); res = delete_key(hkey, "", access); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3840,17 +3835,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1); @@ -3945,17 +3940,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1); @@ -4027,17 +4022,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1); @@ -4086,17 +4081,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1); @@ -4145,17 +4140,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1); @@ -4227,17 +4222,17 @@ static void test_publish(void) CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); CHECK_REG_STR(prodkey, "Publisher", "Wine"); CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); + CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", ""); + CHECK_REG_STR(prodkey, "Comments", ""); + CHECK_REG_STR(prodkey, "Contact", ""); + CHECK_REG_STR(prodkey, "HelpLink", ""); + CHECK_REG_STR(prodkey, "HelpTelephone", ""); + CHECK_REG_STR(prodkey, "InstallLocation", ""); CHECK_REG_DWORD(prodkey, "NoModify", 1); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); + CHECK_REG_STR(prodkey, "Readme", ""); + CHECK_REG_STR(prodkey, "Size", ""); + CHECK_REG_STR(prodkey, "URLInfoAbout", ""); + CHECK_REG_STR(prodkey, "URLUpdateInfo", ""); CHECK_REG_DWORD(prodkey, "Language", 1033); CHECK_REG_DWORD(prodkey, "Version", 0x1010001); CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
2 years, 7 months
1
0
0
0
[reactos] 322/360: [WINESYNC] winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cface09ce93a6d3a7ef3…
commit 7cface09ce93a6d3a7ef3c38b4c84a0f38eee3b5 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Mar 13 22:12:17 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:28:38 2022 +0100 [WINESYNC] winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 5d82baf9747b7b133cad3be77c0cc9e24cc09582 by Alexandre Julliard <julliard(a)winehq.org> --- dll/win32/msi/CMakeLists.txt | 2 +- dll/win32/msi/msi_main.c | 16 ----------- sdk/lib/3rdparty/libwine/CMakeLists.txt | 4 +++ sdk/lib/3rdparty/libwine/dll_register.c | 47 +++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 17 deletions(-) diff --git a/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt index 2927a5dd1bc..84bfef42ec6 100644 --- a/dll/win32/msi/CMakeLists.txt +++ b/dll/win32/msi/CMakeLists.txt @@ -84,7 +84,7 @@ add_idl_headers(msi_idlheader msiserver.idl winemsi.idl) add_typelib(msiserver.idl winemsi.idl) set_source_files_properties(msi.rc PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/msiserver.tlb;${CMAKE_CURRENT_BINARY_DIR}/winemsi.tlb") set_module_type(msi win32dll) -target_link_libraries(msi uuid ${PSEH_LIB} wine oldnames) +target_link_libraries(msi uuid ${PSEH_LIB} wine_dll_register oldnames) add_dependencies(msi msi_idlheader) add_delay_importlibs(msi odbccp32 crypt32 wintrust) add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi rpcrt4 urlmon user32 version wininet sxs diff --git a/dll/win32/msi/msi_main.c b/dll/win32/msi/msi_main.c index 0e436b09e59..738d9272cd9 100644 --- a/dll/win32/msi/msi_main.c +++ b/dll/win32/msi/msi_main.c @@ -216,19 +216,3 @@ HRESULT WINAPI DllCanUnloadNow(void) { return dll_count == 0 ? S_OK : S_FALSE; } - -/*********************************************************************** - * DllRegisterServer (MSI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( msi_hInstance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( msi_hInstance ); -} diff --git a/sdk/lib/3rdparty/libwine/CMakeLists.txt b/sdk/lib/3rdparty/libwine/CMakeLists.txt index bed7ca764eb..4bd0ef625c2 100644 --- a/sdk/lib/3rdparty/libwine/CMakeLists.txt +++ b/sdk/lib/3rdparty/libwine/CMakeLists.txt @@ -21,3 +21,7 @@ target_compile_definitions(wine PRIVATE __WINESRC__ _WINE) add_library(wineldr loader.c) add_dependencies(wineldr xdk) target_compile_definitions(wineldr PRIVATE __WINESRC__) + +add_library(wine_dll_register dll_register.c ${SOURCE}) +add_dependencies(wine_dll_register psdk) +target_compile_definitions(wine_dll_register PRIVATE __WINESRC__ _WINE) diff --git a/sdk/lib/3rdparty/libwine/dll_register.c b/sdk/lib/3rdparty/libwine/dll_register.c new file mode 100644 index 00000000000..3be0ea5581a --- /dev/null +++ b/sdk/lib/3rdparty/libwine/dll_register.c @@ -0,0 +1,47 @@ +/* + * DllRegisterServer default implementation + * + * Copyright 2021 Alexandre Julliard + * + * 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 <stdarg.h> +#define COBJMACROS +#include "windef.h" +#include "winbase.h" +#include "olectl.h" +#include "rpcproxy.h" + +static inline void *image_base(void) +{ +#if defined(__MINGW32__) || defined(_MSC_VER) + extern IMAGE_DOS_HEADER __ImageBase; + return (void *)&__ImageBase; +#else + extern IMAGE_NT_HEADERS __wine_spec_nt_header; + return (void *)((__wine_spec_nt_header.OptionalHeader.ImageBase + 0xffff) & ~0xffff); +#endif +} + +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( image_base() ); +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( image_base() ); +}
2 years, 7 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200