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
March 2022
----- 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
20 participants
436 discussions
Start a n
N
ew thread
[reactos] 71/360: [WINESYNC] msi/tests: Test deferral of InstallServices.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=07f42a0af167afc14d69a…
commit 07f42a0af167afc14d69a302f8d9bad333750b71 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:21 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:47 2022 +0100 [WINESYNC] msi/tests: Test deferral of InstallServices. 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 b8f982fa4b190398edce45290cd49159d586a26b by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/action.c | 31 +++++++++++++++++++++++++++++- modules/rostests/winetests/msi/custom.c | 23 ++++++++++++++++++++++ modules/rostests/winetests/msi/custom.spec | 2 ++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index b0055294946..4abf8675350 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -301,6 +301,34 @@ static const char sds_custom_action_dat[] = "sds_immediate\t1\tcustom.dll\tsds_present\n" "sds_deferred\t1025\tcustom.dll\tsds_absent\n"; +static const char sis_install_exec_seq_dat[] = + "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostInitialize\t\t800\n" + "FileCost\t\t900\n" + "CostFinalize\t\t1000\n" + "InstallValidate\t\t1400\n" + "InstallInitialize\t\t1500\n" + "StopServices\t\t5000\n" + "DeleteServices\t\t5050\n" + "InstallFiles\t\t5200\n" + "InstallServices\t\t5400\n" + "sis_immediate\tNOT REMOVE\t5401\n" + "sis_deferred\tNOT REMOVE\t5402\n" + "StartServices\t\t5450\n" + "RegisterProduct\t\t5500\n" + "PublishFeatures\t\t5600\n" + "PublishProduct\t\t5700\n" + "InstallFinalize\t\t6000\n"; + +static const char sis_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "sis_immediate\t1\tcustom.dll\tsis_absent\n" + "sis_deferred\t1025\tcustom.dll\tsis_present\n"; + static const char rof_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" "s72\tS38\ts72\ti2\tS255\tS72\n" @@ -1846,7 +1874,8 @@ static const msi_table sis_tables[] = ADD_TABLE(feature), ADD_TABLE(feature_comp), ADD_TABLE(file), - ADD_TABLE(sds_install_exec_seq), + ADD_TABLE(sis_install_exec_seq), + ADD_TABLE(sis_custom_action), ADD_TABLE(service_install2), ADD_TABLE(media), ADD_TABLE(property) diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 4497f3cc680..43365041a04 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -1216,3 +1216,26 @@ UINT WINAPI sds_absent(MSIHANDLE hinst) CloseServiceHandle(manager); return ERROR_SUCCESS; } + +UINT WINAPI sis_present(MSIHANDLE hinst) +{ + SC_HANDLE manager, service; + manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); + service = OpenServiceA(manager, "TestService", GENERIC_ALL); + ok(hinst, !!service, "service absent: %u\n", GetLastError()); + CloseServiceHandle(service); + CloseServiceHandle(manager); + return ERROR_SUCCESS; +} + +UINT WINAPI sis_absent(MSIHANDLE hinst) +{ + SC_HANDLE manager, service; + manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); + service = OpenServiceA(manager, "TestService", GENERIC_ALL); +todo_wine + ok(hinst, !service, "service present\n"); + if (service) CloseServiceHandle(service); + CloseServiceHandle(manager); + return ERROR_SUCCESS; +} diff --git a/modules/rostests/winetests/msi/custom.spec b/modules/rostests/winetests/msi/custom.spec index 1485546321c..471f9569711 100644 --- a/modules/rostests/winetests/msi/custom.spec +++ b/modules/rostests/winetests/msi/custom.spec @@ -9,3 +9,5 @@ @ stdcall crs_absent(long) @ stdcall sds_present(long) @ stdcall sds_absent(long) +@ stdcall sis_present(long) +@ stdcall sis_absent(long)
2 years, 9 months
1
0
0
0
[reactos] 70/360: [WINESYNC] msi/tests: Test deferral of DeleteServices.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49a44f014f04fb0816982…
commit 49a44f014f04fb0816982361399385aae66e2334 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:21 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:47 2022 +0100 [WINESYNC] msi/tests: Test deferral of DeleteServices. 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 5d8e16f7018b4fb0382ec991adc08e1f305bd353 by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/CMakeLists.txt | 2 +- modules/rostests/winetests/msi/action.c | 10 ++++++++++ modules/rostests/winetests/msi/custom.c | 24 ++++++++++++++++++++++++ modules/rostests/winetests/msi/custom.spec | 2 ++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/msi/CMakeLists.txt b/modules/rostests/winetests/msi/CMakeLists.txt index 229847ed1a5..5090555bf35 100644 --- a/modules/rostests/winetests/msi/CMakeLists.txt +++ b/modules/rostests/winetests/msi/CMakeLists.txt @@ -3,7 +3,7 @@ spec2def(custom.dll custom.spec) add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def) target_link_libraries(custom uuid) set_module_type(custom win32dll) -add_importlibs(custom msi ole32 shell32 msvcrt kernel32) +add_importlibs(custom msi ole32 shell32 advapi32 msvcrt kernel32) list(APPEND SOURCE action.c diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index ce36edaefd8..b0055294946 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -282,6 +282,8 @@ static const char sds_install_exec_seq_dat[] = "InstallInitialize\t\t1500\n" "StopServices\t\t5000\n" "DeleteServices\t\t5050\n" + "sds_immediate\tNOT REMOVE\t5051\n" + "sds_deferred\tNOT REMOVE\t5052\n" "MoveFiles\t\t5100\n" "InstallFiles\t\t5200\n" "DuplicateFiles\t\t5300\n" @@ -292,6 +294,13 @@ static const char sds_install_exec_seq_dat[] = "PublishProduct\t\t5700\n" "InstallFinalize\t\t6000\n"; +static const char sds_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "sds_immediate\t1\tcustom.dll\tsds_present\n" + "sds_deferred\t1025\tcustom.dll\tsds_absent\n"; + static const char rof_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" "s72\tS38\ts72\ti2\tS255\tS72\n" @@ -1823,6 +1832,7 @@ static const msi_table sds_tables[] = ADD_TABLE(feature_comp), ADD_TABLE(file), ADD_TABLE(sds_install_exec_seq), + ADD_TABLE(sds_custom_action), ADD_TABLE(service_control), ADD_TABLE(service_install), ADD_TABLE(media), diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index db6d61239ec..4497f3cc680 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -23,6 +23,7 @@ #include <windef.h> #include <winbase.h> +#include <winsvc.h> #define COBJMACROS #include <shlobj.h> #include <msxml.h> @@ -1192,3 +1193,26 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n"); return ERROR_SUCCESS; } + +UINT WINAPI sds_present(MSIHANDLE hinst) +{ + SC_HANDLE manager, service; + manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); + service = OpenServiceA(manager, "TestService3", GENERIC_ALL); +todo_wine + ok(hinst, !!service, "service absent: %u\n", GetLastError()); + CloseServiceHandle(service); + CloseServiceHandle(manager); + return ERROR_SUCCESS; +} + +UINT WINAPI sds_absent(MSIHANDLE hinst) +{ + SC_HANDLE manager, service; + manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); + service = OpenServiceA(manager, "TestService3", GENERIC_ALL); + ok(hinst, !service, "service present\n"); + if (service) CloseServiceHandle(service); + CloseServiceHandle(manager); + return ERROR_SUCCESS; +} diff --git a/modules/rostests/winetests/msi/custom.spec b/modules/rostests/winetests/msi/custom.spec index 774f77bf793..1485546321c 100644 --- a/modules/rostests/winetests/msi/custom.spec +++ b/modules/rostests/winetests/msi/custom.spec @@ -7,3 +7,5 @@ @ stdcall cf_absent(long) @ stdcall crs_present(long) @ stdcall crs_absent(long) +@ stdcall sds_present(long) +@ stdcall sds_absent(long)
2 years, 9 months
1
0
0
0
[reactos] 69/360: [WINESYNC] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c2c3863ef9f1b19e8070…
commit 0c2c3863ef9f1b19e80703446b3bb4bf058303ac Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:20 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:47 2022 +0100 [WINESYNC] msi/tests: Test deferral of CreateShorcuts and RemoveShortcuts. 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 ab9ab2a8f701064af3212a91ecd89ffa6a4a331b by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/action.c | 14 ++++++++++++++ modules/rostests/winetests/msi/custom.c | 14 ++++++++++++++ modules/rostests/winetests/msi/custom.spec | 2 ++ 3 files changed, 30 insertions(+) diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index ae1b47b99db..ce36edaefd8 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -917,12 +917,25 @@ static const char crs_install_exec_seq_dat[] = "RemoveFiles\t\t1700\n" "InstallFiles\t\t2000\n" "RemoveShortcuts\t\t3000\n" + "rs_immediate\tREMOVE\t3001\n" + "rs_deferred\tREMOVE\t3002\n" "CreateShortcuts\t\t3100\n" + "cs_immediate\tNOT REMOVE\t3101\n" + "cs_deferred\tNOT REMOVE\t3102\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n"; +static const char crs_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "cs_immediate\t1\tcustom.dll\tcrs_absent\n" + "cs_deferred\t1025\tcustom.dll\tcrs_present\n" + "rs_immediate\t1\tcustom.dll\tcrs_present\n" + "rs_deferred\t1025\tcustom.dll\tcrs_absent\n"; + static const char pub_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -1905,6 +1918,7 @@ static const msi_table crs_tables[] = ADD_TABLE(crs_file), ADD_TABLE(crs_shortcut), ADD_TABLE(crs_install_exec_seq), + ADD_TABLE(crs_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index aeee98e7a9d..db6d61239ec 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -1178,3 +1178,17 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { } return ERROR_SUCCESS; } + +UINT WINAPI crs_present(MSIHANDLE hinst) +{ +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, pf_exists("msitest\\shortcut.lnk"), "shortcut absent\n"); + return ERROR_SUCCESS; +} + +UINT WINAPI crs_absent(MSIHANDLE hinst) +{ +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, !pf_exists("msitest\\shortcut.lnk"), "shortcut present\n"); + return ERROR_SUCCESS; +} diff --git a/modules/rostests/winetests/msi/custom.spec b/modules/rostests/winetests/msi/custom.spec index cac0f85f2b6..774f77bf793 100644 --- a/modules/rostests/winetests/msi/custom.spec +++ b/modules/rostests/winetests/msi/custom.spec @@ -5,3 +5,5 @@ @ stdcall nested(long) @ stdcall cf_present(long) @ stdcall cf_absent(long) +@ stdcall crs_present(long) +@ stdcall crs_absent(long)
2 years, 9 months
1
0
0
0
[reactos] 68/360: [WINESYNC] msi/tests: Test deferral of CreateFolders and RemoveFolders.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31eeb62486490fc36e203…
commit 31eeb62486490fc36e203bd3e8223862302f3575 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:20 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi/tests: Test deferral of CreateFolders and RemoveFolders. 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 0f7d50c02ea301ceebf0c18c1a49797ae9a93788 by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/CMakeLists.txt | 2 +- modules/rostests/winetests/msi/action.c | 14 +++++ modules/rostests/winetests/msi/custom.c | 87 +++++++++++++++++++++++---- modules/rostests/winetests/msi/custom.spec | 2 + 4 files changed, 93 insertions(+), 12 deletions(-) diff --git a/modules/rostests/winetests/msi/CMakeLists.txt b/modules/rostests/winetests/msi/CMakeLists.txt index 8884c47513c..229847ed1a5 100644 --- a/modules/rostests/winetests/msi/CMakeLists.txt +++ b/modules/rostests/winetests/msi/CMakeLists.txt @@ -3,7 +3,7 @@ spec2def(custom.dll custom.spec) add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def) target_link_libraries(custom uuid) set_module_type(custom win32dll) -add_importlibs(custom msi ole32 msvcrt kernel32) +add_importlibs(custom msi ole32 shell32 msvcrt kernel32) list(APPEND SOURCE action.c diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index 849975d997e..ae1b47b99db 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -596,7 +596,11 @@ static const char cf_install_exec_seq_dat[] = "FileCost\t\t900\n" "RemoveFiles\t\t3500\n" "CreateFolders\t\t3700\n" + "cf_immediate\tNOT REMOVE\t3701\n" + "cf_deferred\tNOT REMOVE\t3702\n" "RemoveFolders\t\t3800\n" + "rf_immediate\tREMOVE\t3801\n" + "rf_deferred\tREMOVE\t3802\n" "InstallFiles\t\t4000\n" "RegisterUser\t\t6000\n" "RegisterProduct\t\t6100\n" @@ -609,6 +613,15 @@ static const char cf_install_exec_seq_dat[] = "InstallValidate\t\t1400\n" "LaunchConditions\t\t100\n"; +static const char cf_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "cf_immediate\t1\tcustom.dll\tcf_absent\n" + "cf_deferred\t1025\tcustom.dll\tcf_present\n" + "rf_immediate\t1\tcustom.dll\tcf_present\n" + "rf_deferred\t1025\tcustom.dll\tcf_absent\n"; + static const char sr_selfreg_dat[] = "File_\tCost\n" "s72\tI2\n" @@ -1771,6 +1784,7 @@ static const msi_table cf_tables[] = ADD_TABLE(cf_file), ADD_TABLE(cf_create_folders), ADD_TABLE(cf_install_exec_seq), + ADD_TABLE(cf_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index ff1be9b282a..aeee98e7a9d 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -24,10 +24,13 @@ #include <windef.h> #include <winbase.h> #define COBJMACROS +#include <shlobj.h> #include <msxml.h> #include <msi.h> #include <msiquery.h> +static int todo_level, todo_do_loop; + static void ok_(MSIHANDLE hinst, int todo, const char *file, int line, int condition, const char *msg, ...) { static char buffer[2000]; @@ -47,8 +50,30 @@ static void ok_(MSIHANDLE hinst, int todo, const char *file, int line, int condi MsiProcessMessage(hinst, INSTALLMESSAGE_USER, record); MsiCloseHandle(record); } -#define ok(hinst, condition, ...) ok_(hinst, 0, __FILE__, __LINE__, condition, __VA_ARGS__) -#define todo_wine_ok(hinst, condition, ...) ok_(hinst, 1, __FILE__, __LINE__, condition, __VA_ARGS__) + +static void winetest_start_todo( int is_todo ) +{ + todo_level = (todo_level << 1) | (is_todo != 0); + todo_do_loop=1; +} + +static int winetest_loop_todo(void) +{ + int do_loop=todo_do_loop; + todo_do_loop=0; + return do_loop; +} + +static void winetest_end_todo(void) +{ + todo_level >>= 1; +} + +#define ok(hinst, condition, ...) ok_(hinst, todo_level, __FILE__, __LINE__, condition, __VA_ARGS__) +#define todo_wine_if(is_todo) for (winetest_start_todo(is_todo); \ + winetest_loop_todo(); \ + winetest_end_todo()) +#define todo_wine todo_wine_if(1) static const char *dbgstr_w(WCHAR *str) { @@ -886,7 +911,8 @@ static void test_costs(MSIHANDLE hinst) cost = 0xdead; r = MsiGetFeatureCostA(hinst, NULL, MSICOSTTREE_CHILDREN, INSTALLSTATE_LOCAL, &cost); ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); - todo_wine_ok(hinst, !cost, "got %d\n", cost); + todo_wine + ok(hinst, !cost, "got %d\n", cost); r = MsiGetFeatureCostA(hinst, "One", MSICOSTTREE_CHILDREN, INSTALLSTATE_LOCAL, NULL); ok(hinst, r == RPC_X_NULL_REF_POINTER, "got %u\n", r); @@ -894,7 +920,8 @@ static void test_costs(MSIHANDLE hinst) cost = 0xdead; r = MsiGetFeatureCostA(hinst, "One", MSICOSTTREE_CHILDREN, INSTALLSTATE_LOCAL, &cost); ok(hinst, !r, "got %u\n", r); - todo_wine_ok(hinst, cost == 8, "got %d\n", cost); + todo_wine + ok(hinst, cost == 8, "got %d\n", cost); sz = cost = temp = 0xdead; r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, NULL, &sz, &cost, &temp); @@ -946,7 +973,8 @@ static void test_costs(MSIHANDLE hinst) r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !strcmp(buffer, "q"), "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + todo_wine + ok(hinst, sz == 4, "got size %u\n", sz); ok(hinst, cost == 8, "got cost %d\n", cost); ok(hinst, !temp, "got temp %d\n", temp); @@ -954,15 +982,19 @@ static void test_costs(MSIHANDLE hinst) strcpy(buffer,"x"); r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); - todo_wine_ok(hinst, !buffer[0], "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + todo_wine { + ok(hinst, !buffer[0], "got \"%s\"\n", buffer); + ok(hinst, sz == 4, "got size %u\n", sz); + } sz = 2; strcpy(buffer,"x"); r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); - todo_wine_ok(hinst, !strcmp(buffer, "C"), "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + todo_wine { + ok(hinst, !strcmp(buffer, "C"), "got \"%s\"\n", buffer); + ok(hinst, sz == 4, "got size %u\n", sz); + } sz = 3; strcpy(buffer,"x"); @@ -1021,7 +1053,8 @@ UINT WINAPI main_test(MSIHANDLE hinst) /* Test MsiGetDatabaseState() */ res = MsiGetDatabaseState(hinst); - todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res); + todo_wine + ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res); test_props(hinst); test_db(hinst); @@ -1101,7 +1134,8 @@ UINT WINAPI da_deferred(MSIHANDLE hinst) len = sizeof(prop); r = MsiGetPropertyA(hinst, "TESTPATH", prop, &len); ok(hinst, r == ERROR_SUCCESS, "got %u\n", r); - todo_wine_ok(hinst, !prop[0], "got %s\n", prop); + todo_wine + ok(hinst, !prop[0], "got %s\n", prop); /* Test modes */ ok(hinst, MsiGetMode(hinst, MSIRUNMODE_SCHEDULED), "should be scheduled\n"); @@ -1113,3 +1147,34 @@ UINT WINAPI da_deferred(MSIHANDLE hinst) return ERROR_SUCCESS; } + +static BOOL pf_exists(const char *file) +{ + char path[MAX_PATH]; + + if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, path))) + SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, path); + strcat(path, "\\"); + strcat(path, file); + return GetFileAttributesA(path) != INVALID_FILE_ATTRIBUTES; +} + +UINT WINAPI cf_present(MSIHANDLE hinst) +{ +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + ok(hinst, pf_exists("msitest\\first"), "folder absent\n"); + ok(hinst, pf_exists("msitest\\second"), "folder absent\n"); + ok(hinst, pf_exists("msitest\\third"), "folder absent\n"); +} + return ERROR_SUCCESS; +} + +UINT WINAPI cf_absent(MSIHANDLE hinst) +{ +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + ok(hinst, !pf_exists("msitest\\first"), "folder present\n"); + ok(hinst, !pf_exists("msitest\\second"), "folder present\n"); + ok(hinst, !pf_exists("msitest\\third"), "folder present\n"); +} + return ERROR_SUCCESS; +} diff --git a/modules/rostests/winetests/msi/custom.spec b/modules/rostests/winetests/msi/custom.spec index 51bb60ec1a4..cac0f85f2b6 100644 --- a/modules/rostests/winetests/msi/custom.spec +++ b/modules/rostests/winetests/msi/custom.spec @@ -3,3 +3,5 @@ @ stdcall da_immediate(long) @ stdcall da_deferred(long) @ stdcall nested(long) +@ stdcall cf_present(long) +@ stdcall cf_absent(long)
2 years, 9 months
1
0
0
0
[reactos] 67/360: [WINESYNC] msi: Avoid using awstring in MsiGetSourcePathW().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6fc5d381f1857562d631b…
commit 6fc5d381f1857562d631b2b39789a970b829c5f3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:19 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi: Avoid using awstring in MsiGetSourcePathW(). 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 48aeef69fc99ff1460da934f4933f0499ff33b13 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/install.c | 91 +++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 59 deletions(-) diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index e0b61e04833..80e535304ff 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -366,58 +366,6 @@ WCHAR *msi_resolve_source_folder( MSIPACKAGE *package, const WCHAR *name, MSIFOL return path; } -/*********************************************************************** - * MSI_GetSourcePath (internal) - */ -static UINT MSI_GetSourcePath( MSIHANDLE hInstall, LPCWSTR szFolder, - awstring *szPathBuf, LPDWORD pcchPathBuf ) -{ - MSIPACKAGE *package; - LPWSTR path; - UINT r = ERROR_FUNCTION_FAILED; - - TRACE("%s %p %p\n", debugstr_w(szFolder), szPathBuf, pcchPathBuf ); - - if (!szFolder) - return ERROR_INVALID_PARAMETER; - - package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); - if (!package) - { - LPWSTR value = NULL; - MSIHANDLE remote; - - if (!(remote = msi_get_remote(hInstall))) - return ERROR_INVALID_HANDLE; - - r = remote_GetSourcePath(remote, szFolder, &value); - if (r != ERROR_SUCCESS) - return r; - - r = msi_strcpy_to_awstring(value, -1, szPathBuf, pcchPathBuf); - - midl_user_free(value); - return r; - } - - if (szPathBuf->str.w && !pcchPathBuf ) - { - msiobj_release( &package->hdr ); - return ERROR_INVALID_PARAMETER; - } - - path = msi_resolve_source_folder( package, szFolder, NULL ); - msiobj_release( &package->hdr ); - - TRACE("path = %s\n", debugstr_w(path)); - if (!path) - return ERROR_DIRECTORY; - - r = msi_strcpy_to_awstring( path, -1, szPathBuf, pcchPathBuf ); - msi_free( path ); - return r; -} - /*********************************************************************** * MsiGetSourcePathA (MSI.@) */ @@ -471,17 +419,42 @@ UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DW /*********************************************************************** * MsiGetSourcePathW (MSI.@) */ -UINT WINAPI MsiGetSourcePathW( MSIHANDLE hInstall, LPCWSTR szFolder, - LPWSTR szPathBuf, LPDWORD pcchPathBuf ) +UINT WINAPI MsiGetSourcePathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, DWORD *sz) { - awstring str; + MSIPACKAGE *package; + const WCHAR *path; + UINT r; + + TRACE("%s %p %p\n", debugstr_w(folder), buf, sz); + + if (!folder) + return ERROR_INVALID_PARAMETER; + + package = msihandle2msiinfo(hinst, MSIHANDLETYPE_PACKAGE); + if (!package) + { + WCHAR *path = NULL; + MSIHANDLE remote; - TRACE("%s %p %p\n", debugstr_w(szFolder), szPathBuf, pcchPathBuf ); + if (!(remote = msi_get_remote(hinst))) + return ERROR_INVALID_HANDLE; + + r = remote_GetSourcePath(remote, folder, &path); + if (!r) + r = msi_strncpyW(path, -1, buf, sz); - str.unicode = TRUE; - str.str.w = szPathBuf; + midl_user_free(path); + return r; + } - return MSI_GetSourcePath( hInstall, szFolder, &str, pcchPathBuf ); + path = msi_resolve_source_folder(package, folder, NULL); + if (path) + r = msi_strncpyW(path, -1, buf, sz); + else + r = ERROR_DIRECTORY; + + msiobj_release(&package->hdr); + return r; } /***********************************************************************
2 years, 9 months
1
0
0
0
[reactos] 66/360: [WINESYNC] msi: Handle the remote case directly in MsiGetSourcePathA().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2491afaa145a339b74c14…
commit 2491afaa145a339b74c147d36675f0e93a5d93e2 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:19 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi: Handle the remote case directly in MsiGetSourcePathA(). 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 43ce218a48f5b3420f48379e911e974b8bb9ef88 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/install.c | 48 ++++++++++++++++++++++++++------- modules/rostests/winetests/msi/custom.c | 8 +++--- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index 4d8fecfe256..e0b61e04833 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -421,22 +421,50 @@ static UINT MSI_GetSourcePath( MSIHANDLE hInstall, LPCWSTR szFolder, /*********************************************************************** * MsiGetSourcePathA (MSI.@) */ -UINT WINAPI MsiGetSourcePathA( MSIHANDLE hInstall, LPCSTR szFolder, - LPSTR szPathBuf, LPDWORD pcchPathBuf ) +UINT WINAPI MsiGetSourcePathA(MSIHANDLE hinst, const char *folder, char *buf, DWORD *sz) { - LPWSTR folder; - awstring str; + MSIPACKAGE *package; + const WCHAR *path; + WCHAR *folderW; UINT r; - TRACE("%s %p %p\n", debugstr_a(szFolder), szPathBuf, pcchPathBuf); + TRACE("%s %p %p\n", debugstr_a(folder), buf, sz); + + if (!folder) + return ERROR_INVALID_PARAMETER; + + if (!(folderW = strdupAtoW(folder))) + return ERROR_OUTOFMEMORY; + + package = msihandle2msiinfo(hinst, MSIHANDLETYPE_PACKAGE); + if (!package) + { + WCHAR *path = NULL; + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hinst))) + { + heap_free(folderW); + return ERROR_INVALID_HANDLE; + } - str.unicode = FALSE; - str.str.a = szPathBuf; + r = remote_GetSourcePath(remote, folderW, &path); + if (!r) + r = msi_strncpyWtoA(path, -1, buf, sz, TRUE); + + midl_user_free(path); + heap_free(folderW); + return r; + } - folder = strdupAtoW( szFolder ); - r = MSI_GetSourcePath( hInstall, folder, &str, pcchPathBuf ); - msi_free( folder ); + path = msi_resolve_source_folder(package, folderW, NULL); + if (path) + r = msi_strncpyWtoA(path, -1, buf, sz, FALSE); + else + r = ERROR_DIRECTORY; + heap_free(folderW); + msiobj_release(&package->hdr); return r; } diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 4e42eed64b9..ff1be9b282a 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -584,28 +584,28 @@ static void test_targetpath(MSIHANDLE hinst) sz = 0; r = MsiGetSourcePathA(hinst, "TARGETDIR", NULL, &sz); ok(hinst, !r, "got %u\n", r); - todo_wine_ok(hinst, sz == srcsz * 2, "got size %u\n", sz); + ok(hinst, sz == srcsz * 2, "got size %u\n", sz); sz = 0; strcpy(buffer,"q"); r = MsiGetSourcePathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !strcmp(buffer, "q"), "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == srcsz * 2, "got size %u\n", sz); + ok(hinst, sz == srcsz * 2, "got size %u\n", sz); sz = 1; strcpy(buffer,"x"); r = MsiGetSourcePathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !buffer[0], "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == srcsz * 2, "got size %u\n", sz); + ok(hinst, sz == srcsz * 2, "got size %u\n", sz); sz = srcsz; strcpy(buffer,"x"); r = MsiGetSourcePathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, strlen(buffer) == srcsz - 1, "wrong buffer length %d\n", strlen(buffer)); - todo_wine_ok(hinst, sz == srcsz * 2, "got size %u\n", sz); + ok(hinst, sz == srcsz * 2, "got size %u\n", sz); sz = srcsz + 1; strcpy(buffer,"x");
2 years, 9 months
1
0
0
0
[reactos] 65/360: [WINESYNC] msi: Avoid using awstring in MsiGetTargetPathW().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2f2e68eb50b9a9087687f…
commit 2f2e68eb50b9a9087687f26789e20d62d886740e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:18 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi: Avoid using awstring in MsiGetTargetPathW(). 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 ce3fc1af555106bcc614a1b9259172357035517f by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/install.c | 80 ++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index e87534d8bec..4d8fecfe256 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -227,47 +227,6 @@ const WCHAR *msi_get_target_folder( MSIPACKAGE *package, const WCHAR *name ) return folder->ResolvedTarget; } -/*********************************************************************** - * MsiGetTargetPath (internal) - */ -static UINT MSI_GetTargetPath( MSIHANDLE hInstall, LPCWSTR szFolder, - awstring *szPathBuf, LPDWORD pcchPathBuf ) -{ - MSIPACKAGE *package; - const WCHAR *path; - UINT r = ERROR_FUNCTION_FAILED; - - if (!szFolder) - return ERROR_INVALID_PARAMETER; - - package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); - if (!package) - { - LPWSTR value = NULL; - MSIHANDLE remote; - - if (!(remote = msi_get_remote(hInstall))) - return ERROR_INVALID_HANDLE; - - r = remote_GetTargetPath(remote, szFolder, &value); - if (r != ERROR_SUCCESS) - return r; - - r = msi_strcpy_to_awstring(value, -1, szPathBuf, pcchPathBuf); - - midl_user_free(value); - return r; - } - - path = msi_get_target_folder( package, szFolder ); - msiobj_release( &package->hdr ); - - if (!path) - return ERROR_DIRECTORY; - - return msi_strcpy_to_awstring( path, -1, szPathBuf, pcchPathBuf ); -} - /*********************************************************************** * MsiGetTargetPathA (MSI.@) */ @@ -321,17 +280,42 @@ UINT WINAPI MsiGetTargetPathA(MSIHANDLE hinst, const char *folder, char *buf, DW /*********************************************************************** * MsiGetTargetPathW (MSI.@) */ -UINT WINAPI MsiGetTargetPathW( MSIHANDLE hInstall, LPCWSTR szFolder, - LPWSTR szPathBuf, LPDWORD pcchPathBuf ) +UINT WINAPI MsiGetTargetPathW(MSIHANDLE hinst, const WCHAR *folder, WCHAR *buf, DWORD *sz) { - awstring path; + MSIPACKAGE *package; + const WCHAR *path; + UINT r; - TRACE("%s %p %p\n", debugstr_w(szFolder), szPathBuf, pcchPathBuf); + TRACE("%s %p %p\n", debugstr_w(folder), buf, sz); - path.unicode = TRUE; - path.str.w = szPathBuf; + if (!folder) + return ERROR_INVALID_PARAMETER; + + package = msihandle2msiinfo(hinst, MSIHANDLETYPE_PACKAGE); + if (!package) + { + WCHAR *path = NULL; + MSIHANDLE remote; - return MSI_GetTargetPath( hInstall, szFolder, &path, pcchPathBuf ); + if (!(remote = msi_get_remote(hinst))) + return ERROR_INVALID_HANDLE; + + r = remote_GetTargetPath(remote, folder, &path); + if (!r) + r = msi_strncpyW(path, -1, buf, sz); + + midl_user_free(path); + return r; + } + + path = msi_get_target_folder(package, folder); + if (path) + r = msi_strncpyW(path, -1, buf, sz); + else + r = ERROR_DIRECTORY; + + msiobj_release(&package->hdr); + return r; } static WCHAR *get_source_root( MSIPACKAGE *package )
2 years, 9 months
1
0
0
0
[reactos] 64/360: [WINESYNC] msi: Handle the remote case directly in MsiGetTargetPathA().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c33915e4098d1dfb0b5e4…
commit c33915e4098d1dfb0b5e4a6ed7dfcc8471e75c76 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:18 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi: Handle the remote case directly in MsiGetTargetPathA(). 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 c9fc3510218f3426b9b448b4569ff4fd275044f8 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/install.c | 48 ++++++++++++++++++++++++--------- modules/rostests/winetests/msi/custom.c | 8 +++--- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/dll/win32/msi/install.c b/dll/win32/msi/install.c index 7271763f428..e87534d8bec 100644 --- a/dll/win32/msi/install.c +++ b/dll/win32/msi/install.c @@ -271,26 +271,50 @@ static UINT MSI_GetTargetPath( MSIHANDLE hInstall, LPCWSTR szFolder, /*********************************************************************** * MsiGetTargetPathA (MSI.@) */ -UINT WINAPI MsiGetTargetPathA( MSIHANDLE hInstall, LPCSTR szFolder, - LPSTR szPathBuf, LPDWORD pcchPathBuf ) +UINT WINAPI MsiGetTargetPathA(MSIHANDLE hinst, const char *folder, char *buf, DWORD *sz) { - LPWSTR szwFolder; - awstring path; + MSIPACKAGE *package; + const WCHAR *path; + WCHAR *folderW; UINT r; - TRACE("%s %p %p\n", debugstr_a(szFolder), szPathBuf, pcchPathBuf); + TRACE("%s %p %p\n", debugstr_a(folder), buf, sz); - szwFolder = strdupAtoW(szFolder); - if (szFolder && !szwFolder) - return ERROR_FUNCTION_FAILED; + if (!folder) + return ERROR_INVALID_PARAMETER; + + if (!(folderW = strdupAtoW(folder))) + return ERROR_OUTOFMEMORY; + + package = msihandle2msiinfo(hinst, MSIHANDLETYPE_PACKAGE); + if (!package) + { + WCHAR *path = NULL; + MSIHANDLE remote; - path.unicode = FALSE; - path.str.a = szPathBuf; + if (!(remote = msi_get_remote(hinst))) + { + heap_free(folderW); + return ERROR_INVALID_HANDLE; + } - r = MSI_GetTargetPath( hInstall, szwFolder, &path, pcchPathBuf ); + r = remote_GetTargetPath(remote, folderW, &path); + if (!r) + r = msi_strncpyWtoA(path, -1, buf, sz, TRUE); - msi_free( szwFolder ); + midl_user_free(path); + heap_free(folderW); + return r; + } + path = msi_get_target_folder(package, folderW); + if (path) + r = msi_strncpyWtoA(path, -1, buf, sz, FALSE); + else + r = ERROR_DIRECTORY; + + heap_free(folderW); + msiobj_release(&package->hdr); return r; } diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index d240964aae7..4e42eed64b9 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -485,28 +485,28 @@ static void test_targetpath(MSIHANDLE hinst) sz = 0; r = MsiGetTargetPathA(hinst, "TARGETDIR", NULL, &sz); ok(hinst, !r, "got %u\n", r); - todo_wine_ok(hinst, sz == 6, "got size %u\n", sz); + ok(hinst, sz == 6, "got size %u\n", sz); sz = 0; strcpy(buffer,"q"); r = MsiGetTargetPathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !strcmp(buffer, "q"), "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 6, "got size %u\n", sz); + ok(hinst, sz == 6, "got size %u\n", sz); sz = 1; strcpy(buffer,"x"); r = MsiGetTargetPathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !buffer[0], "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 6, "got size %u\n", sz); + ok(hinst, sz == 6, "got size %u\n", sz); sz = 3; strcpy(buffer,"x"); r = MsiGetTargetPathA(hinst, "TARGETDIR", buffer, &sz); ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); ok(hinst, !strcmp(buffer, "C:"), "got \"%s\"\n", buffer); - todo_wine_ok(hinst, sz == 6, "got size %u\n", sz); + ok(hinst, sz == 6, "got size %u\n", sz); sz = 4; strcpy(buffer,"x");
2 years, 9 months
1
0
0
0
[reactos] 63/360: [WINESYNC] msi: Avoid leaking memory on failure paths in MsiGetPropertyA().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02726bbc203528b50245b…
commit 02726bbc203528b50245b746e3a19d69a42bd903 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:17 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:46 2022 +0100 [WINESYNC] msi: Avoid leaking memory on failure paths in MsiGetPropertyA(). 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 2e2934e455318c2753741a051876bc0a3c2399fa by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/package.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index c3bc9dcde62..b42158c6c02 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -2375,9 +2375,14 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD DWORD len; if (!(remote = msi_get_remote(hinst))) + { + heap_free(nameW); return ERROR_INVALID_HANDLE; + } r = remote_GetProperty(remote, nameW, &value, &len); + heap_free(nameW); + if (!r) { /* String might contain embedded nulls. @@ -2395,7 +2400,6 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD heap_free(tmp); } midl_user_free(value); - heap_free(nameW); return r; }
2 years, 9 months
1
0
0
0
[reactos] 62/360: [WINESYNC] msi/tests: Break out of the loop if both components are found in test_MsiEnumComponentsEx.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f51867f228c5ba44fe98…
commit 4f51867f228c5ba44fe980fe6805faad23907912 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:12:17 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:45 2022 +0100 [WINESYNC] msi/tests: Break out of the loop if both components are found in test_MsiEnumComponentsEx. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f5b1a6b5c507fd2766725251af00efa5eb8431ee by Hans Leidekker <hans(a)codeweavers.com> --- modules/rostests/winetests/msi/msi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/rostests/winetests/msi/msi.c b/modules/rostests/winetests/msi/msi.c index a91b1e38c91..d72264ea5e2 100644 --- a/modules/rostests/winetests/msi/msi.c +++ b/modules/rostests/winetests/msi/msi.c @@ -13400,6 +13400,7 @@ static void test_MsiEnumComponentsEx(void) ok( !sid[0], "got \"%s\"\n", sid ); ok( !len, "unexpected length %u\n", len ); found1 = TRUE; + if (found2) break; } if (!strcmp( comp2, guid )) { @@ -13407,6 +13408,7 @@ static void test_MsiEnumComponentsEx(void) ok( sid[0], "empty sid\n" ); ok( len == strlen(sid), "unexpected length %u\n", len ); found2 = TRUE; + if (found1) break; } index++; guid[0] = 0;
2 years, 9 months
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
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