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
June 2017
----- 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
526 discussions
Start a n
N
ew thread
[akhaldi] 74821: [MSVFW32_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:30:54 2017 New Revision: 74821 URL:
http://svn.reactos.org/svn/reactos?rev=74821&view=rev
Log: [MSVFW32_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/msvfw32/msvfw.c Modified: trunk/rostests/winetests/msvfw32/msvfw.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvfw32/msvfw.c…
============================================================================== --- trunk/rostests/winetests/msvfw32/msvfw.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msvfw32/msvfw.c [iso-8859-1] Sat Jun 3 22:30:54 2017 @@ -658,10 +658,45 @@ ICClose(ic); } +static void test_ICInfo(void) +{ + ICINFO info, info2; + DWORD i, found; + unsigned char *fcc; + + for (i = found = 0; ICInfo(0, i, &info); i++) + { + trace("Codec name: %s, fccHandler: 0x%08x\n", wine_dbgstr_w(info.szName), info.fccHandler); + + ok(ICInfo(info.fccType, info.fccHandler, &info2), + "ICInfo failed on fcc 0x%08x\n", info.fccHandler); + + fcc = (unsigned char *)&info.fccHandler; + if (!isalpha(fcc[0])) continue; + + found++; + /* Test getting info with a different case - bug 41602 */ + if (fcc[0] & 0x20) + { + fcc[0] &= ~0x20; + ok(ICInfo(info.fccType, info.fccHandler, &info2), + "ICInfo failed on fcc 0x%08x using lowercase fccHandler\n", info.fccHandler); + } + else + { + fcc[0] |= 0x20; + ok(ICInfo(info.fccType, info.fccHandler, &info2), + "ICInfo failed on fcc 0x%08x using uppercase fccHandler\n", info.fccHandler); + } + } + ok(found != 0, "expected at least one codec\n"); +} + START_TEST(msvfw) { test_OpenCase(); test_Locate(); test_ICSeqCompress(); test_ICGetDisplayFormat(); -} + test_ICInfo(); +}
7 years, 6 months
1
0
0
0
[akhaldi] 74820: [MSTASK_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:30:32 2017 New Revision: 74820 URL:
http://svn.reactos.org/svn/reactos?rev=74820&view=rev
Log: [MSTASK_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/mstask/task_scheduler.c Modified: trunk/rostests/winetests/mstask/task_scheduler.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mstask/task_sch…
============================================================================== --- trunk/rostests/winetests/mstask/task_scheduler.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mstask/task_scheduler.c [iso-8859-1] Sat Jun 3 22:30:32 2017 @@ -184,6 +184,11 @@ /* the two backslashes are optional */ hres = ITaskScheduler_SetTargetComputer(test_task_scheduler, oldname + 2); + if (hres == E_ACCESSDENIED) + { + skip("SetTargetComputer failed with E_ACCESSDENIED (needs admin rights)\n"); + goto done; + } ok(hres == S_OK, "got 0x%x (expected S_OK)\n", hres); /* the case is ignored */ @@ -198,6 +203,7 @@ hres = ITaskScheduler_SetTargetComputer(test_task_scheduler, oldname); ok(hres == S_OK, "got 0x%x (expected S_OK)\n", hres); +done: CoTaskMemFree(oldname); ITaskScheduler_Release(test_task_scheduler); return;
7 years, 6 months
1
0
0
0
[akhaldi] 74819: [MSI_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:30:19 2017 New Revision: 74819 URL:
http://svn.reactos.org/svn/reactos?rev=74819&view=rev
Log: [MSI_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/msi/install.c trunk/rostests/winetests/msi/msi.c Modified: trunk/rostests/winetests/msi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
============================================================================== --- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Sat Jun 3 22:30:19 2017 @@ -1220,6 +1220,69 @@ "PublishProduct\t\t1900\n" "InstallFinalize\t\t2000\n"; +static const char ft_file_dat[] = + "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "featuretree\tcomp\tfeaturetree.txt\t1000\t\t\t8192\t1\n"; + +static const char ft_comp_dat[] = + "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "comp\t{12345678-1234-1234-1234-222222222222}\tTARGETDIR\t0\t\t\n" + "comp2\t{12345678-1234-1234-1234-333333333333}\tTARGETDIR\t0\t\tfeaturetree\n"; + +static const char ft_feature_dat[] = + "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "A\t\t\t\t2\t1\t\t0\n" + "C\tB\t\t\t2\t1\t\t0\n" + "B\tA\t\t\t4\t1\t\t0\n" + "D\t\t\t\t2\t1\t\t0\n"; + +static const char ft_feature_comp_dat[] = + "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "C\tcomp\n" + "D\tcomp2\n"; + +static const char ft_condition_dat[] = + "Feature_\tLevel\tCondition\n" + "s38\ti2\tS255\n" + "Condition\tFeature_\tLevel\n" + "A\t0\t\"0\"<>INSTALLTYPE\n"; + +static const char ft_custom_action_dat[] = + "Action\tType\tSource\tTarget\tISComments\n" + "s72\ti2\tS64\tS0\tS255\n" + "CustomAction\tAction\n" + "Run A\t19\t\tA\t\n" + "Run B\t19\t\tB\t\n" + "Run C\t19\t\tC\t\n"; + +static const char ft_install_exec_seq_dat[] = + "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "CostInitialize\t\t100\n" + "FileCost\t\t200\n" + "CostFinalize\t\t300\n" + "InstallValidate\t\t400\n" + "InstallInitialize\t\t500\n" + "Run C\t3 = &C AND NOT Installed\t600\n" + "Run B\t3 = &B AND NOT Installed\t700\n" + "Run A\t3 = &A AND NOT Installed\t800\n" + "ProcessComponents\t\t900\n" + "RemoveFiles\t\t1000\n" + "InstallFiles\t\t1100\n" + "RegisterProduct\t\t1200\n" + "PublishFeatures\t\t1300\n" + "PublishProduct\t\t1400\n" + "InstallFinalize\t\t1500\n"; + typedef struct _msi_table { const CHAR *filename; @@ -1858,6 +1921,20 @@ ADD_TABLE(shc_custom_action), ADD_TABLE(shc_install_exec_seq), ADD_TABLE(shc2_property) +}; + +static const msi_table ft_tables[] = +{ + ADD_TABLE(media), + ADD_TABLE(directory), + ADD_TABLE(ft_file), + ADD_TABLE(ft_comp), + ADD_TABLE(ft_feature), + ADD_TABLE(ft_feature_comp), + ADD_TABLE(ft_condition), + ADD_TABLE(ft_custom_action), + ADD_TABLE(ft_install_exec_seq), + ADD_TABLE(property) }; /* cabinet definitions */ @@ -5937,6 +6014,35 @@ DeleteFileA( msifile ); } +static void test_feature_tree(void) +{ + UINT r; + + if (is_process_limited()) + { + skip( "process is limited\n" ); + return; + } + + create_file( "msitest\\featuretree.txt", 1000 ); + create_database( msifile, ft_tables, sizeof(ft_tables)/sizeof(ft_tables[0]) ); + + MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL ); + + r = MsiInstallProductA( msifile, "INSTALLTYPE=\"0\"" ); + ok( r == ERROR_INSTALL_FAILURE, "got %u\n", r ); + + r = MsiInstallProductA( msifile, "INSTALLTYPE=\"1\"" ); + ok( r == ERROR_SUCCESS, "got %u\n", r ); + + r = MsiInstallProductA( msifile, "REMOVE=ALL" ); + ok( r == ERROR_SUCCESS, "got %u\n", r ); + + DeleteFileA( "msitest\\featuretree.txt" ); + RemoveDirectoryA( "msitest" ); + DeleteFileA( msifile ); +} + START_TEST(install) { DWORD len; @@ -6024,6 +6130,7 @@ test_volume_props(); test_shared_component(); test_remove_upgrade_code(); + test_feature_tree(); DeleteFileA(log_file); Modified: trunk/rostests/winetests/msi/msi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.c?rev=7…
============================================================================== --- trunk/rostests/winetests/msi/msi.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/msi.c [iso-8859-1] Sat Jun 3 22:30:19 2017 @@ -3427,6 +3427,327 @@ LocalFree(usersid); } +static void test_MsiGetComponentPathEx(void) +{ + HKEY key_comp, key_installprop, key_prod; + char prod[MAX_PATH], prod_squashed[MAX_PATH]; + char comp[MAX_PATH], comp_base85[MAX_PATH], comp_squashed[MAX_PATH]; + char path[MAX_PATH], path_key[MAX_PATH], *usersid; + INSTALLSTATE state; + DWORD size, val; + REGSAM access = KEY_ALL_ACCESS; + LONG res; + + if (!pMsiGetComponentPathExA) + { + win_skip( "MsiGetComponentPathExA not present\n" ); + return; + } + + if (is_wow64) access |= KEY_WOW64_64KEY; + + create_test_guid( prod, prod_squashed ); + compose_base85_guid( comp, comp_base85, comp_squashed ); + usersid = get_user_sid(); + + /* NULL product */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( NULL, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state ); + todo_wine ok( !size, "got %u\n", size ); + + /* NULL component */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, NULL, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state ); + todo_wine ok( !size, "got %u\n", size ); + + /* non-NULL usersid, MSIINSTALLCONTEXT_MACHINE */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, usersid, MSIINSTALLCONTEXT_MACHINE, path, &size); + ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state ); + todo_wine ok( !size, "got %u\n", size ); + + /* NULL buf */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, NULL, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok( size == MAX_PATH * 2, "got %u\n", size ); + + /* NULL buflen */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, NULL ); + ok( state == INSTALLSTATE_INVALIDARG, "got %d\n", state ); + ok( size == MAX_PATH, "got %u\n", size ); + + /* all params valid */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok( !size, "got %u\n", size ); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Components\\" ); + lstrcatA( path_key, comp_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL ); + if (res == ERROR_ACCESS_DENIED) + { + skip( "insufficient rights\n" ); + LocalFree( usersid ); + return; + } + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* local system component key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + + res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* product value exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Products\\" ); + lstrcatA( path_key, prod_squashed ); + lstrcatA( path_key, "\\InstallProperties" ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_installprop, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + val = 1; + res = RegSetValueExA( key_installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(val) ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* install properties key exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + create_file( "c:\\testcomponentpath", "c:\\testcomponentpath", 21 ); + + /* file exists */ + path[0] = 0; + size = 0; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_MOREDATA, "got %d\n", state ); + ok( !path[0], "got %s\n", path ); + todo_wine ok( size == 40, "got %u\n", size ); + + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_LOCAL, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %d\n", size ); + + RegDeleteValueA( key_comp, prod_squashed ); + delete_key( key_comp, "", access & KEY_WOW64_64KEY ); + RegDeleteValueA( key_installprop, "WindowsInstaller" ); + delete_key( key_installprop, "", access & KEY_WOW64_64KEY ); + RegCloseKey( key_comp ); + RegCloseKey( key_installprop ); + DeleteFileA( "c:\\testcomponentpath" ); + + lstrcpyA( path_key, "Software\\Microsoft\\Installer\\Products\\" ); + lstrcatA( path_key, prod_squashed ); + + res = RegCreateKeyA( HKEY_CURRENT_USER, path_key, &key_prod ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* user unmanaged product key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok(!size, "got %u\n", size); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\" ); + lstrcatA( path_key, usersid ); + lstrcatA( path_key, "\\Components\\" ); + lstrcatA( path_key, comp_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* user unmanaged component key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok(!size, "got %u\n", size); + + res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* product value exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + create_file( "c:\\testcomponentpath", "c:\\testcomponentpath", 21 ); + + /* file exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, path, &size ); + ok( state == INSTALLSTATE_LOCAL, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath"), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + RegDeleteValueA( key_comp, prod_squashed ); + RegDeleteKeyA( key_prod, "" ); + delete_key( key_comp, "", access & KEY_WOW64_64KEY ); + RegCloseKey( key_prod ); + RegCloseKey( key_comp ); + DeleteFileA( "c:\\testcomponentpath" ); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\Managed\\" ); + lstrcatA( path_key, usersid ); + lstrcatA( path_key, "\\Installer\\Products\\" ); + lstrcatA( path_key, prod_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_prod, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* user managed product key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\" ); + lstrcatA( path_key, usersid ); + lstrcatA( path_key, "\\Components\\" ); + lstrcatA( path_key, comp_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* user managed component key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + + res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* product value exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Products\\" ); + lstrcatA( path_key, prod_squashed ); + lstrcatA( path_key, "\\InstallProperties" ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_installprop, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + val = 1; + res = RegSetValueExA( key_installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(val) ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* install properties key exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + create_file( "c:\\testcomponentpath", "C:\\testcomponentpath", 21 ); + + /* file exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_USERMANAGED, path, &size ); + ok( state == INSTALLSTATE_LOCAL, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + RegDeleteValueA( key_comp, prod_squashed ); + delete_key( key_prod, "", access & KEY_WOW64_64KEY ); + delete_key( key_comp, "", access & KEY_WOW64_64KEY ); + RegDeleteValueA( key_installprop, "WindowsInstaller" ); + delete_key( key_installprop, "", access & KEY_WOW64_64KEY ); + RegCloseKey( key_prod ); + RegCloseKey( key_comp ); + RegCloseKey( key_installprop ); + DeleteFileA( "c:\\testcomponentpath" ); + lstrcpyA( path_key, "Software\\Classes\\Installer\\Products\\" ); + lstrcatA( path_key, prod_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_prod, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* local classes product key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok(!size, "got %u\n", size); + + lstrcpyA( path_key, "Software\\Microsoft\\Windows\\CurrentVersion\\" ); + lstrcatA( path_key, "Installer\\UserData\\S-1-5-18\\Components\\" ); + lstrcatA( path_key, comp_squashed ); + + res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, path_key, 0, NULL, 0, access, NULL, &key_comp, NULL ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* local user component key exists */ + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_UNKNOWN, "got %d\n", state ); + todo_wine ok(!size, "got %u\n", size); + + res = RegSetValueExA( key_comp, prod_squashed, 0, REG_SZ, (const BYTE *)"c:\\testcomponentpath", 20 ); + ok( res == ERROR_SUCCESS, "got %d\n", res ); + + /* product value exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_ABSENT, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + create_file( "c:\\testcomponentpath", "c:\\testcomponentpath", 21 ); + + /* file exists */ + path[0] = 0; + size = MAX_PATH; + state = pMsiGetComponentPathExA( prod, comp, NULL, MSIINSTALLCONTEXT_MACHINE, path, &size ); + ok( state == INSTALLSTATE_LOCAL, "got %d\n", state ); + ok( !lstrcmpA( path, "c:\\testcomponentpath" ), "got %s\n", path ); + ok( size == 20, "got %u\n", size ); + + RegDeleteValueA( key_comp, prod_squashed ); + delete_key( key_prod, "", access & KEY_WOW64_64KEY ); + delete_key( key_comp, "", access & KEY_WOW64_64KEY ); + RegCloseKey( key_prod ); + RegCloseKey( key_comp ); + DeleteFileA( "c:\\testcomponentpath" ); + LocalFree( usersid ); +} + static void test_MsiProvideComponent(void) { static const WCHAR sourcedirW[] = @@ -10894,18 +11215,18 @@ ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); delete_key(hpatch, "", access & KEY_WOW64_64KEY); + RegDeleteValueA(hpatch, "State"); RegCloseKey(hpatch); delete_key(udpatch, "", access & KEY_WOW64_64KEY); RegCloseKey(udpatch); + delete_key(udprod, "", access & KEY_WOW64_64KEY); + RegCloseKey(udprod); done: RegDeleteValueA(patches, patch_squashed); RegDeleteValueA(patches, "Patches"); delete_key(patches, "", access & KEY_WOW64_64KEY); RegCloseKey(patches); - RegDeleteValueA(hpatch, "State"); - delete_key(udprod, "", access & KEY_WOW64_64KEY); - RegCloseKey(udprod); delete_key(prodkey, "", access & KEY_WOW64_64KEY); RegCloseKey(prodkey); } @@ -12352,7 +12673,22 @@ MSIINSTALLCONTEXT_USERMANAGED, INSTALLPROPERTY_PATCHSTATEA, val, &size); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val); + ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val); + ok(size == 1, "Expected 1, got %d\n", size); + + size = 1; + res = RegSetValueExA(hpatch, "Uninstallable", 0, REG_DWORD, + (const BYTE *)&size, sizeof(DWORD)); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + /* Uninstallable value exists */ + size = MAX_PATH; + lstrcpyA(val, "apple"); + r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, + MSIINSTALLCONTEXT_USERMANAGED, + INSTALLPROPERTY_UNINSTALLABLEA, val, &size); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val); ok(size == 1, "Expected 1, got %d\n", size); res = RegSetValueExA(hpatch, "DisplayName", 0, REG_SZ, @@ -14566,6 +14902,7 @@ test_MsiQueryFeatureState(); test_MsiQueryComponentState(); test_MsiGetComponentPath(); + test_MsiGetComponentPathEx(); test_MsiProvideComponent(); test_MsiGetProductCode(); test_MsiEnumClients();
7 years, 6 months
1
0
0
0
[akhaldi] 74818: [MSI] Sync with Wine Staging 2.9. CORE-13362 f6ced24 msi: Avoid using isspace()/isdigit() for WCHARs. 635457b msi: Add MsiGetPatchFileListA/W stubs. b956b1f msi: Set patch property...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:29:55 2017 New Revision: 74818 URL:
http://svn.reactos.org/svn/reactos?rev=74818&view=rev
Log: [MSI] Sync with Wine Staging 2.9. CORE-13362 f6ced24 msi: Avoid using isspace()/isdigit() for WCHARs. 635457b msi: Add MsiGetPatchFileListA/W stubs. b956b1f msi: Set patch property Uninstallable. f3adb4a msi: Properly handle DWORD registry values in MsiGetPatchInfoEx. d94653d msi: Apply feature selection to the whole feature subtree. d12728a msi: Avoid zero size allocations (Valgrind). b53957d msi: Use the correct type when calculating feature cost. 64c0625 msi: Implement MsiGetComponentPathExA/W. 5aa2d48 msi: Fix some more spec file entries. Modified: trunk/reactos/dll/win32/msi/action.c trunk/reactos/dll/win32/msi/install.c trunk/reactos/dll/win32/msi/msi.c trunk/reactos/dll/win32/msi/msi.spec trunk/reactos/dll/win32/msi/msipriv.h trunk/reactos/dll/win32/msi/patch.c trunk/reactos/dll/win32/msi/table.c trunk/reactos/dll/win32/msi/tokenize.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msi/action.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/action.c?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/action.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/action.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -1756,6 +1756,45 @@ return ret; } +static void disable_children( MSIFEATURE *feature, int level ) +{ + FeatureList *fl; + + LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry ) + { + if (!is_feature_selected( feature, level )) + { + TRACE("child %s (level %d request %d) follows disabled parent %s (level %d request %d)\n", + debugstr_w(fl->feature->Feature), fl->feature->Level, fl->feature->ActionRequest, + debugstr_w(feature->Feature), feature->Level, feature->ActionRequest); + + fl->feature->Level = feature->Level; + fl->feature->Action = INSTALLSTATE_UNKNOWN; + fl->feature->ActionRequest = INSTALLSTATE_UNKNOWN; + } + disable_children( fl->feature, level ); + } +} + +static void follow_parent( MSIFEATURE *feature ) +{ + FeatureList *fl; + + LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry ) + { + if (fl->feature->Attributes & msidbFeatureAttributesFollowParent) + { + TRACE("child %s (level %d request %d) follows parent %s (level %d request %d)\n", + debugstr_w(fl->feature->Feature), fl->feature->Level, fl->feature->ActionRequest, + debugstr_w(feature->Feature), feature->Level, feature->ActionRequest); + + fl->feature->Action = feature->Action; + fl->feature->ActionRequest = feature->ActionRequest; + } + follow_parent( fl->feature ); + } +} + UINT MSI_SetFeatureStates(MSIPACKAGE *package) { int level; @@ -1794,24 +1833,9 @@ /* disable child features of unselected parent or follow parent */ LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - FeatureList *fl; - - LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry ) - { - if (!is_feature_selected( feature, level )) - { - fl->feature->Action = INSTALLSTATE_UNKNOWN; - fl->feature->ActionRequest = INSTALLSTATE_UNKNOWN; - } - else if (fl->feature->Attributes & msidbFeatureAttributesFollowParent) - { - TRACE("feature %s (level %d request %d) follows parent %s (level %d request %d)\n", - debugstr_w(fl->feature->Feature), fl->feature->Level, fl->feature->ActionRequest, - debugstr_w(feature->Feature), feature->Level, feature->ActionRequest); - fl->feature->Action = feature->Action; - fl->feature->ActionRequest = feature->ActionRequest; - } - } + if (feature->Feature_Parent) continue; + disable_children( feature, level ); + follow_parent( feature ); } } else /* preselected */ @@ -1836,22 +1860,9 @@ } LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - FeatureList *fl; - - if (!is_feature_selected( feature, level )) continue; - - LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry ) - { - if (fl->feature->Attributes & msidbFeatureAttributesFollowParent && - (!(feature->Attributes & msidbFeatureAttributesFavorAdvertise))) - { - TRACE("feature %s (level %d request %d) follows parent %s (level %d request %d)\n", - debugstr_w(fl->feature->Feature), fl->feature->Level, fl->feature->ActionRequest, - debugstr_w(feature->Feature), feature->Level, feature->ActionRequest); - fl->feature->Action = feature->Action; - fl->feature->ActionRequest = feature->ActionRequest; - } - } + if (feature->Feature_Parent) continue; + disable_children( feature, level ); + follow_parent( feature ); } } @@ -4404,7 +4415,16 @@ if (res != ERROR_SUCCESS) goto done; - res = RegSetValueExW( patch_key, szState, 0, REG_DWORD, (const BYTE *)&patch->state, sizeof(patch->state) ); + res = RegSetValueExW( patch_key, szState, 0, REG_DWORD, (const BYTE *)&patch->state, + sizeof(patch->state) ); + if (res != ERROR_SUCCESS) + { + RegCloseKey( patch_key ); + goto done; + } + + res = RegSetValueExW( patch_key, szUninstallable, 0, REG_DWORD, (const BYTE *)&patch->uninstallable, + sizeof(patch->uninstallable) ); RegCloseKey( patch_key ); if (res != ERROR_SUCCESS) goto done; Modified: trunk/reactos/dll/win32/msi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/install.c?re…
============================================================================== --- trunk/reactos/dll/win32/msi/install.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/install.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -1174,11 +1174,11 @@ static INT feature_cost( MSIFEATURE *feature ) { INT cost = 0; - MSICOMPONENT *comp; - - LIST_FOR_EACH_ENTRY( comp, &feature->Components, MSICOMPONENT, entry ) - { - cost += comp->Cost; + ComponentList *cl; + + LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) + { + cost += cl->component->Cost; } return cost; } Modified: trunk/reactos/dll/win32/msi/msi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.c?rev=74…
============================================================================== --- trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -1051,26 +1051,26 @@ return rc; } -static LPWSTR msi_reg_get_value(HKEY hkey, LPCWSTR name, DWORD *type) -{ - DWORD dval; +static WCHAR *reg_get_value( HKEY hkey, const WCHAR *name, DWORD *type ) +{ LONG res; - WCHAR temp[20]; - - static const WCHAR format[] = {'%','d',0}; - - res = RegQueryValueExW(hkey, name, NULL, type, NULL, NULL); - if (res != ERROR_SUCCESS) - return NULL; - - if (*type == REG_SZ) - return msi_reg_get_val_str(hkey, name); - - if (!msi_reg_get_val_dword(hkey, name, &dval)) - return NULL; - - sprintfW(temp, format, dval); - return strdupW(temp); + + if ((res = RegQueryValueExW( hkey, name, NULL, type, NULL, NULL )) != ERROR_SUCCESS) return NULL; + + if (*type == REG_SZ) return msi_reg_get_val_str( hkey, name ); + if (*type == REG_DWORD) + { + static const WCHAR fmt[] = {'%','u',0}; + WCHAR temp[11]; + DWORD val; + + if (!msi_reg_get_val_dword( hkey, name, &val )) return NULL; + sprintfW( temp, fmt, val ); + return strdupW( temp ); + } + + ERR( "unhandled value type %u\n", *type ); + return NULL; } static UINT MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, @@ -1144,7 +1144,7 @@ else if (!strcmpW( szAttribute, INSTALLPROPERTY_VERSIONSTRINGW )) szAttribute = display_version; - val = msi_reg_get_value(userdata, szAttribute, &type); + val = reg_get_value(userdata, szAttribute, &type); if (!val) val = empty; RegCloseKey(userdata); @@ -1178,7 +1178,7 @@ goto done; } - val = msi_reg_get_value(source, szAttribute, &type); + val = reg_get_value(source, szAttribute, &type); if (!val) val = empty; @@ -1186,7 +1186,7 @@ } else { - val = msi_reg_get_value(prodkey, szAttribute, &type); + val = reg_get_value(prodkey, szAttribute, &type); if (!val) val = empty; } @@ -1468,7 +1468,7 @@ !strcmpW( szProperty, INSTALLPROPERTY_REGOWNERW ) || !strcmpW( szProperty, INSTALLPROPERTY_INSTANCETYPEW )) { - val = msi_reg_get_value(props, package, &type); + val = reg_get_value(props, package, &type); if (!val) { if (prod || classes) @@ -1484,7 +1484,7 @@ else if (!strcmpW( szProperty, INSTALLPROPERTY_VERSIONSTRINGW )) szProperty = displayversion; - val = msi_reg_get_value(props, szProperty, &type); + val = reg_get_value(props, szProperty, &type); if (!val) val = strdupW(szEmpty); @@ -1509,7 +1509,7 @@ else if (dwContext == MSIINSTALLCONTEXT_MACHINE) hkey = classes; - val = msi_reg_get_value(hkey, szProperty, &type); + val = reg_get_value(hkey, szProperty, &type); if (!val) val = strdupW(szEmpty); @@ -1521,7 +1521,7 @@ { if (props) { - val = msi_reg_get_value(props, package, &type); + val = reg_get_value(props, package, &type); if (!val) goto done; @@ -1534,7 +1534,7 @@ r = msi_copy_outval(val, szValue, pcchValue); goto done; } - else if (props && (val = msi_reg_get_value(props, package, &type))) + else if (props && (val = reg_get_value(props, package, &type))) { msi_free(val); val = strdupW(five); @@ -1569,6 +1569,22 @@ msi_free(val); return r; +} + +UINT WINAPI MsiGetPatchFileListA(LPCSTR szProductCode, LPCSTR szPatchList, + LPDWORD pcFiles, MSIHANDLE **pphFileRecords) +{ + FIXME("(%s, %s, %p, %p) stub!\n", debugstr_a(szProductCode), + debugstr_a(szPatchList), pcFiles, pphFileRecords); + return ERROR_FUNCTION_FAILED; +} + +UINT WINAPI MsiGetPatchFileListW(LPCWSTR szProductCode, LPCWSTR szPatchList, + LPDWORD pcFiles, MSIHANDLE **pphFileRecords) +{ + FIXME("(%s, %s, %p, %p) stub!\n", debugstr_w(szProductCode), + debugstr_w(szPatchList), pcFiles, pphFileRecords); + return ERROR_FUNCTION_FAILED; } UINT WINAPI MsiGetPatchInfoExA(LPCSTR szPatchCode, LPCSTR szProductCode, @@ -1650,7 +1666,7 @@ HKEY udpatch = 0, datakey = 0; HKEY prodpatches = 0; UINT r = ERROR_UNKNOWN_PRODUCT; - DWORD len; + DWORD len, type; LONG res; TRACE("(%s, %s, %s, %d, %s, %p, %p)\n", debugstr_w(szPatchCode), @@ -1742,7 +1758,7 @@ } } - val = msi_reg_get_val_str(datakey, szProperty); + val = reg_get_value(datakey, szProperty, &type); if (!val) val = strdupW(szEmpty); @@ -2754,8 +2770,28 @@ return r; } -static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent, - awstring* lpPathBuf, LPDWORD pcchBuf) +static BOOL open_userdata_comp_key( const WCHAR *comp, const WCHAR *usersid, MSIINSTALLCONTEXT ctx, + HKEY *hkey ) +{ + if (ctx & MSIINSTALLCONTEXT_MACHINE) + { + if (!MSIREG_OpenUserDataComponentKey( comp, szLocalSid, hkey, FALSE )) return TRUE; + } + if (ctx & (MSIINSTALLCONTEXT_USERMANAGED|MSIINSTALLCONTEXT_USERUNMANAGED)) + { + if (usersid && !strcmpiW( usersid, szAllSid )) + { + FIXME( "only looking at the current user\n" ); + usersid = NULL; + } + if (!MSIREG_OpenUserDataComponentKey( comp, usersid, hkey, FALSE )) return TRUE; + } + return FALSE; +} + +static INSTALLSTATE MSI_GetComponentPath( const WCHAR *szProduct, const WCHAR *szComponent, + const WCHAR *szUserSid, MSIINSTALLCONTEXT ctx, + awstring *lpPathBuf, DWORD *pcchBuf ) { static const WCHAR wininstaller[] = {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0}; @@ -2773,20 +2809,20 @@ if (!squash_guid( szProduct, squashed_pc ) || !squash_guid( szComponent, squashed_comp )) return INSTALLSTATE_INVALIDARG; + if (szUserSid && ctx == MSIINSTALLCONTEXT_MACHINE) + return INSTALLSTATE_INVALIDARG; + state = INSTALLSTATE_UNKNOWN; - if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS || - MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS) + if (open_userdata_comp_key( szComponent, szUserSid, ctx, &hkey )) { path = msi_reg_get_val_str( hkey, squashed_pc ); RegCloseKey(hkey); state = INSTALLSTATE_ABSENT; - if ((MSIREG_OpenInstallProps(szProduct, MSIINSTALLCONTEXT_MACHINE, NULL, - &hkey, FALSE) == ERROR_SUCCESS || - MSIREG_OpenUserDataProductKey(szProduct, MSIINSTALLCONTEXT_USERUNMANAGED, - NULL, &hkey, FALSE) == ERROR_SUCCESS) && + if ((!MSIREG_OpenInstallProps(szProduct, MSIINSTALLCONTEXT_MACHINE, NULL, &hkey, FALSE) || + !MSIREG_OpenUserDataProductKey(szProduct, MSIINSTALLCONTEXT_USERUNMANAGED, NULL, &hkey, FALSE)) && msi_reg_get_val_dword(hkey, wininstaller, &version) && GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES) { @@ -2796,16 +2832,12 @@ } if (state != INSTALLSTATE_LOCAL && - (MSIREG_OpenProductKey(szProduct, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - &hkey, FALSE) == ERROR_SUCCESS || - MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_MACHINE, - &hkey, FALSE) == ERROR_SUCCESS)) + (!MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, &hkey, FALSE) || + !MSIREG_OpenProductKey(szProduct, NULL, MSIINSTALLCONTEXT_MACHINE, &hkey, FALSE))) { RegCloseKey(hkey); - if (MSIREG_OpenUserDataComponentKey(szComponent, szLocalSid, &hkey, FALSE) == ERROR_SUCCESS || - MSIREG_OpenUserDataComponentKey(szComponent, NULL, &hkey, FALSE) == ERROR_SUCCESS) + if (open_userdata_comp_key( szComponent, szUserSid, ctx, &hkey )) { msi_free(path); path = msi_reg_get_val_str( hkey, squashed_pc ); @@ -2832,51 +2864,63 @@ } /****************************************************************** + * MsiGetComponentPathExW [MSI.@] + */ +INSTALLSTATE WINAPI MsiGetComponentPathExW( LPCWSTR product, LPCWSTR comp, LPCWSTR usersid, + MSIINSTALLCONTEXT ctx, LPWSTR buf, LPDWORD buflen ) +{ + awstring path; + + TRACE( "%s %s %s 0x%x %p %p\n", debugstr_w(product), debugstr_w(comp), debugstr_w(usersid), + ctx, buf, buflen ); + + path.unicode = TRUE; + path.str.w = buf; + + return MSI_GetComponentPath( product, comp, usersid, ctx, &path, buflen ); +} + +INSTALLSTATE WINAPI MsiGetComponentPathExA( LPCSTR product, LPCSTR comp, LPCSTR usersid, + MSIINSTALLCONTEXT ctx, LPSTR buf, LPDWORD buflen ) +{ + WCHAR *productW = NULL, *compW = NULL, *usersidW = NULL; + INSTALLSTATE r = INSTALLSTATE_UNKNOWN; + awstring path; + + TRACE( "%s %s %s 0x%x %p %p\n", debugstr_a(product), debugstr_a(comp), debugstr_a(usersid), + ctx, buf, buflen ); + + if (product && !(productW = strdupAtoW( product ))) return INSTALLSTATE_UNKNOWN; + if (comp && !(compW = strdupAtoW( comp ))) goto end; + if (usersid && !(usersidW = strdupAtoW( usersid ))) goto end; + + path.unicode = FALSE; + path.str.a = buf; + + r = MSI_GetComponentPath( productW, compW, usersidW, ctx, &path, buflen ); + +end: + msi_free( productW ); + msi_free( compW ); + msi_free( usersidW ); + + return r; +} + +/****************************************************************** * MsiGetComponentPathW [MSI.@] */ -INSTALLSTATE WINAPI MsiGetComponentPathW(LPCWSTR szProduct, LPCWSTR szComponent, - LPWSTR lpPathBuf, LPDWORD pcchBuf) -{ - awstring path; - - TRACE("%s %s %p %p\n", debugstr_w(szProduct), debugstr_w(szComponent), lpPathBuf, pcchBuf); - - path.unicode = TRUE; - path.str.w = lpPathBuf; - - return MSI_GetComponentPath( szProduct, szComponent, &path, pcchBuf ); +INSTALLSTATE WINAPI MsiGetComponentPathW( LPCWSTR product, LPCWSTR comp, LPWSTR buf, LPDWORD buflen ) +{ + return MsiGetComponentPathExW( product, comp, szAllSid, MSIINSTALLCONTEXT_ALL, buf, buflen ); } /****************************************************************** * MsiGetComponentPathA [MSI.@] */ -INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent, - LPSTR lpPathBuf, LPDWORD pcchBuf) -{ - LPWSTR szwProduct, szwComponent = NULL; - INSTALLSTATE r = INSTALLSTATE_UNKNOWN; - awstring path; - - TRACE("%s %s %p %p\n", debugstr_a(szProduct), debugstr_a(szComponent), lpPathBuf, pcchBuf); - - szwProduct = strdupAtoW( szProduct ); - if( szProduct && !szwProduct) - goto end; - - szwComponent = strdupAtoW( szComponent ); - if( szComponent && !szwComponent ) - goto end; - - path.unicode = FALSE; - path.str.a = lpPathBuf; - - r = MSI_GetComponentPath( szwProduct, szwComponent, &path, pcchBuf ); - -end: - msi_free( szwProduct ); - msi_free( szwComponent ); - - return r; +INSTALLSTATE WINAPI MsiGetComponentPathA( LPCSTR product, LPCSTR comp, LPSTR buf, LPDWORD buflen ) +{ + return MsiGetComponentPathExA( product, comp, "s-1-1-0", MSIINSTALLCONTEXT_ALL, buf, buflen ); } static UINT query_feature_state( const WCHAR *product, const WCHAR *squashed, const WCHAR *usersid, @@ -3398,7 +3442,7 @@ StringFromGUID2( &guid, comp, sizeof(comp)/sizeof(comp[0]) ); } - state = MSI_GetComponentPath( szProduct, comp, lpPathBuf, pcchPathBuf ); + state = MSI_GetComponentPath( szProduct, comp, szAllSid, MSIINSTALLCONTEXT_ALL, lpPathBuf, pcchPathBuf ); if (state == INSTALLSTATE_MOREDATA) return ERROR_MORE_DATA; if (state != INSTALLSTATE_LOCAL) return ERROR_FILE_NOT_FOUND; Modified: trunk/reactos/dll/win32/msi/msi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.spec?rev…
============================================================================== --- trunk/reactos/dll/win32/msi/msi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.spec [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -20,8 +20,8 @@ 24 stdcall MsiDatabaseGenerateTransformW(long long wstr long long) 25 stdcall MsiDatabaseGetPrimaryKeysA(long str ptr) 26 stdcall MsiDatabaseGetPrimaryKeysW(long wstr ptr) -27 stdcall MsiDatabaseImportA(str str long) -28 stdcall MsiDatabaseImportW(wstr wstr long) +27 stdcall MsiDatabaseImportA(str str str) +28 stdcall MsiDatabaseImportW(wstr wstr wstr) 29 stdcall MsiDatabaseMergeA(long long str) 30 stdcall MsiDatabaseMergeW(long long wstr) 31 stdcall MsiDatabaseOpenViewA(long str ptr) @@ -189,10 +189,10 @@ 193 stdcall MsiUseFeatureExW(wstr wstr long long) 194 stdcall MsiGetFileVersionA(str ptr ptr ptr ptr) 195 stdcall MsiGetFileVersionW(wstr ptr ptr ptr ptr) -196 stdcall MsiLoadStringA(long long long long long) -197 stdcall MsiLoadStringW(long long long long long) -198 stdcall MsiMessageBoxA(long long long long long long) -199 stdcall MsiMessageBoxW(long long long long long long) +196 stdcall MsiLoadStringA(long long ptr long long) +197 stdcall MsiLoadStringW(long long ptr long long) +198 stdcall MsiMessageBoxA(long str str long long long) +199 stdcall MsiMessageBoxW(long wstr wstr long long long) 200 stdcall MsiDecomposeDescriptorA(str ptr ptr ptr ptr) 201 stdcall MsiDecomposeDescriptorW(wstr ptr ptr ptr ptr) 202 stdcall MsiProvideQualifiedComponentExA(str str long str long long ptr ptr) @@ -275,8 +275,8 @@ 279 stdcall MsiMessageBoxExA(long str str long long long long) 280 stdcall MsiMessageBoxExW(long wstr wstr long long long long) 281 stdcall MsiSetExternalUIRecord(ptr long ptr ptr) -282 stub MsiGetPatchFileListA -283 stub MsiGetPatchFileListW +282 stdcall MsiGetPatchFileListA(str str ptr ptr) +283 stdcall MsiGetPatchFileListW(wstr wstr ptr ptr) 284 stdcall MsiBeginTransactionA(str long ptr ptr) 285 stdcall MsiBeginTransactionW(wstr long ptr ptr) 286 stdcall MsiEndTransaction(long) @@ -286,8 +286,8 @@ 290 stdcall MsiEnumComponentsExW(wstr long long ptr ptr ptr ptr) 291 stdcall MsiEnumClientsExA(str str long long ptr ptr ptr ptr) 292 stdcall MsiEnumClientsExW(wstr wstr long long ptr ptr ptr ptr) -293 stub MsiGetComponentPathExA -294 stub MsiGetComponentPathExW +293 stdcall MsiGetComponentPathExA(str str str long ptr ptr) +294 stdcall MsiGetComponentPathExW(wstr wstr wstr long ptr ptr) 295 stub QueryInstanceCount @ stdcall -private DllCanUnloadNow() Modified: trunk/reactos/dll/win32/msi/msipriv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msipriv.h?re…
============================================================================== --- trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msipriv.h [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -206,6 +206,7 @@ LPWSTR filename; LPWSTR localfile; MSIPATCHSTATE state; + DWORD uninstallable; BOOL delete_on_close; BOOL registered; UINT disk_id; @@ -1213,6 +1214,7 @@ static const WCHAR szLangResource[] = {'\\','V','a','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0}; static const WCHAR szInstallLocation[] = {'I','n','s','t','a','l','l','L','o','c','a','t','i','o','n',0}; static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0}; +static const WCHAR szUninstallable[] = {'U','n','i','n','s','t','a','l','l','a','b','l','e',0}; /* memory allocation macro functions */ static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); Modified: trunk/reactos/dll/win32/msi/patch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/patch.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/msi/patch.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/patch.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -827,6 +827,38 @@ return r; } +static DWORD is_uninstallable( MSIDATABASE *db ) +{ + static const WCHAR query[] = { + 'S','E','L','E','C','T',' ','`','V','a','l','u','e','`',' ','F','R','O','M',' ', + '`','M','s','i','P','a','t','c','h','M','e','t','a','d','a','t','a','`',' ', + 'W','H','E','R','E',' ','`','C','o','m','p','a','n','y','`',' ','I','S',' ', + 'N','U','L','L',' ','A','N','D',' ','`','P','r','o','p','e','r','t','y','`','=', + '\'','A','l','l','o','w','R','e','m','o','v','a','l','\'',0}; + MSIQUERY *view; + MSIRECORD *rec; + DWORD ret = 0; + + if (MSI_DatabaseOpenViewW( db, query, &view ) != ERROR_SUCCESS) return 0; + if (MSI_ViewExecute( view, 0 ) != ERROR_SUCCESS) + { + msiobj_release( &view->hdr ); + return 0; + } + + if (MSI_ViewFetch( view, &rec ) == ERROR_SUCCESS) + { + const WCHAR *value = MSI_RecordGetString( rec, 1 ); + ret = atoiW( value ); + msiobj_release( &rec->hdr ); + } + + FIXME( "check other criteria\n" ); + + msiobj_release( &view->hdr ); + return ret; +} + static UINT msi_apply_patch_db( MSIPACKAGE *package, MSIDATABASE *patch_db, MSIPATCHINFO *patch ) { UINT i, r = ERROR_SUCCESS; @@ -852,7 +884,8 @@ if (r != ERROR_SUCCESS) return r; - patch->state = MSIPATCHSTATE_APPLIED; + patch->uninstallable = is_uninstallable( patch_db ); + patch->state = MSIPATCHSTATE_APPLIED; list_add_tail( &package->patches, &patch->entry ); return ERROR_SUCCESS; } Modified: trunk/reactos/dll/win32/msi/table.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/table.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/msi/table.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/table.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -405,13 +405,11 @@ goto err; } - t->row_count = rawsize / row_size; - t->data = msi_alloc_zero( t->row_count * sizeof (USHORT*) ); - if( !t->data ) - goto err; - t->data_persistent = msi_alloc_zero( t->row_count * sizeof(BOOL)); - if ( !t->data_persistent ) - goto err; + if ((t->row_count = rawsize / row_size)) + { + if (!(t->data = msi_alloc_zero( t->row_count * sizeof(USHORT *) ))) goto err; + if (!(t->data_persistent = msi_alloc_zero( t->row_count * sizeof(BOOL) ))) goto err; + } /* transpose all the data */ TRACE("Transposing data from %d rows\n", t->row_count ); Modified: trunk/reactos/dll/win32/msi/tokenize.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/tokenize.c?r…
============================================================================== --- trunk/reactos/dll/win32/msi/tokenize.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/tokenize.c [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -180,6 +180,21 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* Fx */ }; +/* +** WCHAR safe version of isdigit() +*/ +static inline int isDigit(WCHAR c) +{ + return c >= '0' && c <= '9'; +} + +/* +** WCHAR safe version of isspace(), except '\r' +*/ +static inline int isSpace(WCHAR c) +{ + return c == ' ' || c == '\t' || c == '\n' || c == '\f'; +} /* ** Return the length of the token that begins at z[0]. Return @@ -192,7 +207,7 @@ *skip = 0; switch( *z ){ case ' ': case '\t': case '\n': case '\f': - for(i=1; isspace(z[i]) && z[i] != '\r'; i++){} + for(i=1; isSpace(z[i]); i++){} *tokenType = TK_SPACE; return i; case '-': @@ -258,7 +273,7 @@ return i; } case '.': - if( !isdigit(z[1]) ){ + if( !isDigit(z[1]) ){ *tokenType = TK_DOT; return 1; } @@ -266,7 +281,7 @@ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': *tokenType = TK_INTEGER; - for(i=1; isdigit(z[i]); i++){} + for(i=1; isDigit(z[i]); i++){} return i; case '[': for(i=1; z[i] && z[i-1]!=']'; i++){} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 22:29:55 2017 @@ -112,7 +112,7 @@ reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55 reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55 -reactos/dll/win32/msi # Synced to WineStaging-2.2 +reactos/dll/win32/msi # Synced to WineStaging-2.9 reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11 reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23 reactos/dll/win32/msisip # Synced to WineStaging-1.9.11
7 years, 6 months
1
0
0
0
[akhaldi] 74817: [MSCTF_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:29:38 2017 New Revision: 74817 URL:
http://svn.reactos.org/svn/reactos?rev=74817&view=rev
Log: [MSCTF_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/msctf/inputprocessor.c Modified: trunk/rostests/winetests/msctf/inputprocessor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/inputproc…
============================================================================== --- trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] Sat Jun 3 22:29:38 2017 @@ -1692,6 +1692,7 @@ ITfContext_Release(cxt); ITfContext_Release(cxt2); ITfContext_Release(cxt3); + ITextStoreACP_Release(ts); } static void test_endSession(void)
7 years, 6 months
1
0
0
0
[akhaldi] 74816: [MSCMS] Sync with Wine Staging 2.9. CORE-13362 cd55d5d mscms: Fix some spec file entries.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:29:30 2017 New Revision: 74816 URL:
http://svn.reactos.org/svn/reactos?rev=74816&view=rev
Log: [MSCMS] Sync with Wine Staging 2.9. CORE-13362 cd55d5d mscms: Fix some spec file entries. Modified: trunk/reactos/dll/win32/mscms/mscms.spec trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mscms/mscms.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/mscms.spec…
============================================================================== --- trunk/reactos/dll/win32/mscms/mscms.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/mscms.spec [iso-8859-1] Sat Jun 3 22:29:30 2017 @@ -1,5 +1,5 @@ -@ stdcall AssociateColorProfileWithDeviceA(ptr ptr ptr) -@ stdcall AssociateColorProfileWithDeviceW(ptr ptr ptr) +@ stdcall AssociateColorProfileWithDeviceA(str str str) +@ stdcall AssociateColorProfileWithDeviceW(wstr wstr wstr) @ stdcall CheckBitmapBits(ptr ptr ptr long long long ptr ptr long) @ stdcall CheckColors(ptr ptr long long ptr) @ stdcall CloseColorProfile(ptr) @@ -12,14 +12,14 @@ @ stdcall CreateProfileFromLogColorSpaceA(ptr ptr) @ stdcall CreateProfileFromLogColorSpaceW(ptr ptr) @ stdcall DeleteColorTransform(ptr) -@ stdcall DisassociateColorProfileFromDeviceA(ptr ptr ptr) -@ stdcall DisassociateColorProfileFromDeviceW(ptr ptr ptr) -@ stdcall EnumColorProfilesA(ptr ptr ptr ptr ptr) -@ stdcall EnumColorProfilesW(ptr ptr ptr ptr ptr) +@ stdcall DisassociateColorProfileFromDeviceA(str str str) +@ stdcall DisassociateColorProfileFromDeviceW(wstr wstr wstr) +@ stdcall EnumColorProfilesA(str ptr ptr ptr ptr) +@ stdcall EnumColorProfilesW(wstr ptr ptr ptr ptr) @ stdcall GenerateCopyFilePaths(wstr wstr ptr long ptr ptr ptr ptr long) @ stdcall GetCMMInfo(ptr long) -@ stdcall GetColorDirectoryA(ptr ptr ptr) -@ stdcall GetColorDirectoryW(ptr ptr ptr) +@ stdcall GetColorDirectoryA(str ptr ptr) +@ stdcall GetColorDirectoryW(wstr ptr ptr) @ stdcall GetColorProfileElement(ptr long long ptr ptr ptr) @ stdcall GetColorProfileElementTag(ptr long ptr) @ stdcall GetColorProfileFromHandle(ptr ptr ptr) @@ -29,10 +29,10 @@ @ stdcall GetPS2ColorRenderingDictionary(ptr long ptr ptr ptr) @ stdcall GetPS2ColorRenderingIntent(ptr long ptr ptr) @ stdcall GetPS2ColorSpaceArray(ptr long long ptr ptr ptr) -@ stdcall GetStandardColorSpaceProfileA(ptr long ptr ptr) -@ stdcall GetStandardColorSpaceProfileW(ptr long ptr ptr) -@ stdcall InstallColorProfileA(ptr ptr) -@ stdcall InstallColorProfileW(ptr ptr) +@ stdcall GetStandardColorSpaceProfileA(str long ptr ptr) +@ stdcall GetStandardColorSpaceProfileW(wstr long ptr ptr) +@ stdcall InstallColorProfileA(str str) +@ stdcall InstallColorProfileW(wstr wstr) @ stub InternalGetDeviceConfig @ stub InternalGetPS2CSAFromLCS @ stub InternalGetPS2ColorRenderingDictionary @@ -43,19 +43,19 @@ @ stdcall IsColorProfileValid(ptr ptr) @ stdcall OpenColorProfileA(ptr long long long) @ stdcall OpenColorProfileW(ptr long long long) -@ stdcall RegisterCMMA(ptr long ptr) -@ stdcall RegisterCMMW(ptr long ptr) +@ stdcall RegisterCMMA(str long str) +@ stdcall RegisterCMMW(wstr long wstr) @ stdcall SelectCMM(long) @ stdcall SetColorProfileElement(ptr long long ptr ptr) @ stdcall SetColorProfileElementReference(ptr long long) @ stdcall SetColorProfileElementSize(ptr long long) @ stdcall SetColorProfileHeader(ptr ptr) -@ stdcall SetStandardColorSpaceProfileA(ptr long ptr) -@ stdcall SetStandardColorSpaceProfileW(ptr long ptr) +@ stdcall SetStandardColorSpaceProfileA(str long str) +@ stdcall SetStandardColorSpaceProfileW(wstr long wstr) @ stdcall SpoolerCopyFileEvent(wstr wstr long) @ stdcall TranslateBitmapBits(ptr ptr long long long long ptr long long ptr long) @ stdcall TranslateColors(ptr ptr long long ptr long) -@ stdcall UninstallColorProfileA(ptr ptr long) -@ stdcall UninstallColorProfileW(ptr ptr long) -@ stdcall UnregisterCMMA(ptr long) -@ stdcall UnregisterCMMW(ptr long) +@ stdcall UninstallColorProfileA(str str long) +@ stdcall UninstallColorProfileW(wstr wstr long) +@ stdcall UnregisterCMMA(str long) +@ stdcall UnregisterCMMW(wstr long) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 22:29:30 2017 @@ -104,7 +104,7 @@ reactos/dll/win32/msacm32.drv # Synced to WineStaging-1.9.11 reactos/dll/win32/msadp32.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/mscat32 # Synced to WineStaging-1.9.11 -reactos/dll/win32/mscms # Synced to WineStaging-2.2 +reactos/dll/win32/mscms # Synced to WineStaging-2.9 reactos/dll/win32/mscoree # Synced to Wine-1.5.4 reactos/dll/win32/msctf # Synced to WineStaging-2.2 reactos/dll/win32/msftedit # Synced to WineStaging-1.9.11
7 years, 6 months
1
0
0
0
[akhaldi] 74815: [MPR_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:29:16 2017 New Revision: 74815 URL:
http://svn.reactos.org/svn/reactos?rev=74815&view=rev
Log: [MPR_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/mpr/mpr.c Modified: trunk/rostests/winetests/mpr/mpr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mpr/mpr.c?rev=7…
============================================================================== --- trunk/rostests/winetests/mpr/mpr.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mpr/mpr.c [iso-8859-1] Sat Jun 3 22:29:16 2017 @@ -259,54 +259,56 @@ static void test_WNetUseConnection(void) { - DWORD ret; - DWORD bufSize; - DWORD outRes; + DWORD ret, bufSize, outRes; LPNETRESOURCEA netRes; - CHAR outBuf[4]; - - if (pWNetUseConnectionA) + char outBuf[4], drive[] = "J:", letter; + + if (!pWNetUseConnectionA) { - netRes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(NETRESOURCEA) + sizeof("\\\\127.0.0.1\\c$") + sizeof("J:")); - netRes->dwType = RESOURCETYPE_DISK; - netRes->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE; - netRes->dwUsage = RESOURCEUSAGE_CONNECTABLE; - netRes->lpLocalName = (LPSTR)((LPBYTE)netRes + sizeof(NETRESOURCEA)); - netRes->lpRemoteName = (LPSTR)((LPBYTE)netRes + sizeof(NETRESOURCEA) + sizeof("J:")); - strcpy(netRes->lpLocalName, "J:"); + win_skip("WNetUseConnection() is not supported.\n"); + return; + } + netRes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(NETRESOURCEA) + sizeof("\\\\127.0.0.1\\c$") + sizeof("J:")); + netRes->dwType = RESOURCETYPE_DISK; + netRes->dwDisplayType = RESOURCEDISPLAYTYPE_SHARE; + netRes->dwUsage = RESOURCEUSAGE_CONNECTABLE; + netRes->lpLocalName = (LPSTR)((LPBYTE)netRes + sizeof(NETRESOURCEA)); + netRes->lpRemoteName = (LPSTR)((LPBYTE)netRes + sizeof(NETRESOURCEA) + sizeof("J:")); + + for (letter = 'J'; letter <= 'Z'; letter++) + { + drive[0] = letter; + strcpy(netRes->lpLocalName, drive); strcpy(netRes->lpRemoteName, "\\\\127.0.0.1\\c$"); bufSize = 0; ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, NULL, &bufSize, &outRes); - todo_wine - ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret); - ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize); - if (ret == WN_SUCCESS) - WNetCancelConnectionA("J:", TRUE); - bufSize = 0; - ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); - todo_wine - ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return: %u\n", ret); - ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize); - if (ret == WN_SUCCESS) - WNetCancelConnectionA("J:", TRUE); - bufSize = 1; - todo_wine { - ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); - ok(ret == ERROR_MORE_DATA, "Unexpected return: %u\n", ret); - ok(bufSize == 3, "Unexpected buffer size: %u\n", bufSize); - if (ret == WN_SUCCESS) - WNetCancelConnectionA("J:", TRUE); - bufSize = 4; - ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); - ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret); - } - ok(bufSize == 4, "Unexpected buffer size: %u\n", bufSize); - if (ret == WN_SUCCESS) - WNetCancelConnectionA("J:", TRUE); - HeapFree(GetProcessHeap(), 0, netRes); - } else { - win_skip("WNetUseConnection() is not supported.\n"); - } + if (ret == ERROR_ALREADY_ASSIGNED) continue; + } + todo_wine ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret); + ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize); + if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); + + bufSize = 0; + ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); + todo_wine ok(ret == ERROR_INVALID_PARAMETER, "Unexpected return: %u\n", ret); + ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize); + if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); + + todo_wine { + bufSize = 1; + ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); + ok(ret == ERROR_MORE_DATA, "Unexpected return: %u\n", ret); + ok(bufSize == 3, "Unexpected buffer size: %u\n", bufSize); + if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); + + bufSize = 4; + ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, outBuf, &bufSize, &outRes); + ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret); + } + ok(bufSize == 4, "Unexpected buffer size: %u\n", bufSize); + if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE); + + HeapFree(GetProcessHeap(), 0, netRes); } START_TEST(mpr)
7 years, 6 months
1
0
0
0
[akhaldi] 74814: [MLANG_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:29:06 2017 New Revision: 74814 URL:
http://svn.reactos.org/svn/reactos?rev=74814&view=rev
Log: [MLANG_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/mlang/mlang.c Modified: trunk/rostests/winetests/mlang/mlang.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/mlang.c?r…
============================================================================== --- trunk/rostests/winetests/mlang/mlang.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mlang/mlang.c [iso-8859-1] Sat Jun 3 22:29:06 2017 @@ -696,15 +696,49 @@ IEnumCodePage_Release(iEnumCP); } -static void test_GetCharsetInfo_alias(IMultiLanguage *ml) +static void test_GetCharsetInfo_other(IMultiLanguage *ml) { WCHAR asciiW[] = {'a','s','c','i','i',0}; + WCHAR iso88591_1W[] = {'I','S','O','-','8','8','5','9','-','1',0}; + WCHAR iso88591_1retW[] = {'i','s','o','-','8','8','5','9','-','1',0}; + WCHAR iso88591_2W[] = {'I','S','O','8','8','5','9','-','1',0}; + WCHAR iso88591_2retW[] = {'i','s','o','8','8','5','9','-','1',0}; + WCHAR iso88591_3W[] = {'I','S','O','8','8','5','9','1',0}; + WCHAR iso88591_4W[] = {'I','S','O','-','8','8','5','9','1',0}; + WCHAR iso88591_5W[] = {'I','S','O','8','8','-','5','9','1',0}; + WCHAR iso88591_6W[] = {'-','I','S','O','8','8','5','9','1',0}; + WCHAR iso88591_7W[] = {' ','I','S','O','-','8','8','5','9','-','1',0}; + struct other { + int todo; + HRESULT hr; + WCHAR* charset; + WCHAR* ret_charset; + } other[] = { + { 0, S_OK, asciiW, asciiW }, + { 0, S_OK, iso88591_1W, iso88591_1retW }, + { 1, S_OK, iso88591_2W, iso88591_2retW }, + { 0, E_FAIL, iso88591_3W, 0 }, + { 0, E_FAIL, iso88591_4W, 0 }, + { 0, E_FAIL, iso88591_5W, 0 }, + { 0, E_FAIL, iso88591_6W, 0 }, + { 0, E_FAIL, iso88591_7W, 0 }, + }; MIMECSETINFO info; HRESULT hr; - - hr = IMultiLanguage_GetCharsetInfo(ml, asciiW, &info); - ok(hr == S_OK, "got %08x\n", hr); - ok(!lstrcmpW(info.wszCharset, asciiW), "got %s\n", wine_dbgstr_w(info.wszCharset)); + int i; + + for (i = 0; i < sizeof(other)/sizeof(*other); i++) + { + hr = IMultiLanguage_GetCharsetInfo(ml, other[i].charset, &info); + + todo_wine_if(other[i].todo) + ok(hr == other[i].hr, "#%d: got %08x, expected %08x\n", i, hr, other[i].hr); + + if (hr == S_OK) + todo_wine_if(other[i].todo) + ok(!lstrcmpW(info.wszCharset, other[i].ret_charset), "#%d: got %s, expected %s\n", + i, wine_dbgstr_w(info.wszCharset), wine_dbgstr_w(other[i].ret_charset)); + } } static void scriptinfo_cmp(SCRIPTINFO *sinfo1, SCRIPTINFO *sinfo2) @@ -2206,7 +2240,7 @@ test_GetNumberOfCodePageInfo((IMultiLanguage2 *)iML); test_IMLangConvertCharset(iML); - test_GetCharsetInfo_alias(iML); + test_GetCharsetInfo_other(iML); IMultiLanguage_Release(iML);
7 years, 6 months
1
0
0
0
[akhaldi] 74813: [MCIAVI32] Sync with Wine Staging 2.9. CORE-13362 c59dcfa mciavi32: Implement MCI_BREAK. d3c25df mciavi32: Trace MCIAVI_CreateWindow. 1b57f07 mciavi32: Report version as 1.1.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:28:56 2017 New Revision: 74813 URL:
http://svn.reactos.org/svn/reactos?rev=74813&view=rev
Log: [MCIAVI32] Sync with Wine Staging 2.9. CORE-13362 c59dcfa mciavi32: Implement MCI_BREAK. d3c25df mciavi32: Trace MCIAVI_CreateWindow. 1b57f07 mciavi32: Report version as 1.1. Modified: trunk/reactos/dll/win32/mciavi32/info.c trunk/reactos/dll/win32/mciavi32/mciavi.c trunk/reactos/dll/win32/mciavi32/private_mciavi.h trunk/reactos/dll/win32/mciavi32/wnd.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mciavi32/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/info.c?…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/info.c [iso-8859-1] Sat Jun 3 22:28:56 2017 @@ -187,6 +187,7 @@ WINE_MCIAVI* wma = MCIAVI_mciGetOpenDev(wDevID); DWORD ret = 0; static const WCHAR wszAviPlayer[] = {'W','i','n','e','\'','s',' ','A','V','I',' ','p','l','a','y','e','r',0}; + static const WCHAR wszVersion[] = {'1','.','1',0}; if (lpParms == NULL || lpParms->lpstrReturn == NULL) return MCIERR_NULL_PARAMETER_BLOCK; @@ -199,6 +200,8 @@ if (dwFlags & MCI_INFO_PRODUCT) str = wszAviPlayer; + else if (dwFlags & MCI_INFO_VERSION) + str = wszVersion; else if (dwFlags & MCI_INFO_FILE) str = wma->lpFileName; else { Modified: trunk/reactos/dll/win32/mciavi32/mciavi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/mciavi.…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/mciavi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/mciavi.c [iso-8859-1] Sat Jun 3 22:28:56 2017 @@ -351,6 +351,7 @@ DWORD numEvents = 1; HANDLE events[2]; double next_frame_us; + BOOL wait_audio = TRUE; EnterCriticalSection(&wma->cs); @@ -417,19 +418,37 @@ else delta = 0; + /* check if the playback was cancelled */ + if ((wma->mci_break.flags & MCI_BREAK_KEY) && + (GetAsyncKeyState(wma->mci_break.parms.nVirtKey) & 0x8000)) + { + if (!(wma->mci_break.flags & MCI_BREAK_HWND) || + GetForegroundWindow() == wma->mci_break.parms.hwndBreak) + { + /* we queue audio blocks ahead so ignore them otherwise the audio + * will keep playing until the buffer is empty */ + wait_audio = FALSE; + + TRACE("playback cancelled using break key\n"); + break; + } + } + LeaveCriticalSection(&wma->cs); ret = WaitForMultipleObjects(numEvents, events, FALSE, delta / 1000); EnterCriticalSection(&wma->cs); if (ret == WAIT_OBJECT_0 || wma->dwStatus != MCI_MODE_PLAY) break; } - if (wma->lpWaveFormat) { - while (wma->dwEventCount != nHdr - 1) - { - LeaveCriticalSection(&wma->cs); - Sleep(100); - EnterCriticalSection(&wma->cs); - } + if (wma->lpWaveFormat) + { + if (wait_audio) + while (wma->dwEventCount != nHdr - 1) + { + LeaveCriticalSection(&wma->cs); + Sleep(100); + EnterCriticalSection(&wma->cs); + } /* just to get rid of some race conditions between play, stop and pause */ LeaveCriticalSection(&wma->cs); @@ -869,6 +888,30 @@ } /****************************************************************************** + * MCIAVI_mciBreak [internal] + */ +static DWORD MCIAVI_mciBreak(UINT wDevID, DWORD dwFlags, LPMCI_BREAK_PARMS lpParms) +{ + WINE_MCIAVI *wma; + + TRACE("(%04x, %08x, %p)\n", wDevID, dwFlags, lpParms); + + if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; + + wma = MCIAVI_mciGetOpenDev(wDevID); + if (wma == NULL) return MCIERR_INVALID_DEVICE_ID; + + EnterCriticalSection(&wma->cs); + + wma->mci_break.flags = dwFlags; + wma->mci_break.parms = *lpParms; + + LeaveCriticalSection(&wma->cs); + + return 0; +} + +/****************************************************************************** * MCIAVI_mciSetAudio [internal] */ static DWORD MCIAVI_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSW lpParms) @@ -986,6 +1029,7 @@ case MCI_WHERE: return MCIAVI_mciWhere (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2); case MCI_STEP: return MCIAVI_mciStep (dwDevID, dwParam1, (LPMCI_DGV_STEP_PARMS) dwParam2); case MCI_CUE: return MCIAVI_mciCue (dwDevID, dwParam1, (LPMCI_DGV_CUE_PARMS) dwParam2); + case MCI_BREAK: return MCIAVI_mciBreak (dwDevID, dwParam1, (LPMCI_BREAK_PARMS) dwParam2); /* Digital Video specific */ case MCI_SETAUDIO: return MCIAVI_mciSetAudio (dwDevID, dwParam1, (LPMCI_DGV_SETAUDIO_PARMSW) dwParam2); case MCI_SIGNAL: return MCIAVI_mciSignal (dwDevID, dwParam1, (LPMCI_DGV_SIGNAL_PARMS) dwParam2); Modified: trunk/reactos/dll/win32/mciavi32/private_mciavi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/private…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/private_mciavi.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/private_mciavi.h [iso-8859-1] Sat Jun 3 22:28:56 2017 @@ -81,6 +81,11 @@ DWORD dwToVideoFrame; /* play to */ DWORD dwCurrAudioBlock; /* current audio block being played */ RECT source, dest; + struct + { + DWORD flags; + MCI_BREAK_PARMS parms; + } mci_break; /* data for the background mechanism */ CRITICAL_SECTION cs; HANDLE hStopEvent; Modified: trunk/reactos/dll/win32/mciavi32/wnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/wnd.c?r…
============================================================================== --- trunk/reactos/dll/win32/mciavi32/wnd.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciavi32/wnd.c [iso-8859-1] Sat Jun 3 22:28:56 2017 @@ -105,7 +105,7 @@ return FALSE; } -BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpOpenParms) +BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARMSW lpParms) { static const WCHAR captionW[] = {'W','i','n','e',' ','M','C','I','-','A','V','I',' ','p','l','a','y','e','r',0}; HWND hParent = 0; @@ -115,8 +115,8 @@ /* what should be done ? */ if (wma->hWnd) return TRUE; - if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpOpenParms->hWndParent; - if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpOpenParms->dwStyle; + if (dwFlags & MCI_DGV_OPEN_PARENT) hParent = lpParms->hWndParent; + if (dwFlags & MCI_DGV_OPEN_WS) dwStyle = lpParms->dwStyle; if (wma->hic) SetRect(&rc, 0, 0, wma->outbih->biWidth, wma->outbih->biHeight); @@ -137,6 +137,9 @@ hParent, 0, MCIAVI_hInstance, ULongToPtr(wma->wDevID)); wma->hWndPaint = wma->hWnd; + + TRACE("(%04x, %08X, %p, style %x, parent %p, dimensions %dx%d, hwnd %p)\n", wma->wDevID, + dwFlags, lpParms, dwStyle, hParent, rc.right - rc.left, rc.bottom - rc.top, wma->hWnd); return wma->hWnd != 0; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 22:28:56 2017 @@ -90,7 +90,7 @@ reactos/dll/win32/loadperf # Synced to WineStaging-2.2 reactos/dll/win32/lz32 # Synced to WineStaging-1.9.11 reactos/dll/win32/mapi32 # Synced to WineStaging-2.2 -reactos/dll/win32/mciavi32 # Synced to WineStaging-1.9.16 +reactos/dll/win32/mciavi32 # Synced to WineStaging-2.9 reactos/dll/win32/mcicda # Synced to WineStaging-1.9.16 reactos/dll/win32/mciqtz32 # Synced to WineStaging-2.2 reactos/dll/win32/mciseq # Synced to WineStaging-1.9.11
7 years, 6 months
1
0
0
0
[akhaldi] 74812: [JSCRIPT_WINETEST] Sync with Wine Staging 2.9. CORE-13362
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jun 3 22:28:34 2017 New Revision: 74812 URL:
http://svn.reactos.org/svn/reactos?rev=74812&view=rev
Log: [JSCRIPT_WINETEST] Sync with Wine Staging 2.9. CORE-13362 Modified: trunk/rostests/winetests/jscript/lang.js Modified: trunk/rostests/winetests/jscript/lang.js URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/lang.js…
============================================================================== --- trunk/rostests/winetests/jscript/lang.js [iso-8859-1] (original) +++ trunk/rostests/winetests/jscript/lang.js [iso-8859-1] Sat Jun 3 22:28:34 2017 @@ -264,6 +264,8 @@ eval("testRes(); testRes()"); tmp = eval("3; if(false) {4;} else {};;;") ok(tmp === 3, "tmp = " + tmp); +tmp = eval("try { 1; } finally { 2; }") +ok(tmp === 2, "tmp = " + tmp); testNoRes(); testRes() && testRes(); @@ -977,6 +979,164 @@ i++; } return i; +})(); + +(function() { + var ret, x; + + function unreachable() { + ok(false, "unreachable"); + } + + function expect(value, expect_value) { + ok(value === expect_value, "got " + value + " expected " + expect_value); + } + + ret = (function() { + try { + return "try"; + unreachable(); + }catch(e) { + unreachable(); + }finally { + return "finally"; + unreachable(); + } + unreachable(); + })(); + expect(ret, "finally"); + + x = ""; + ret = (function() { + try { + x += "try,"; + return x; + unreachable(); + }catch(e) { + unreachable(); + }finally { + x += "finally,"; + } + unreachable(); + })(); + expect(ret, "try,"); + expect(x, "try,finally,"); + + x = ""; + ret = (function() { + try { + x += "try," + throw 1; + unreachable(); + }catch(e) { + x += "catch,"; + return "catch"; + unreachable(); + }finally { + x += "finally,"; + return "finally"; + unreachable(); + } + unreachable(); + })(); + expect(ret, "finally"); + expect(x, "try,catch,finally,"); + + x = ""; + ret = (function() { + try { + x += "try," + throw 1; + unreachable(); + }catch(e) { + x += "catch,"; + return "catch"; + unreachable(); + }finally { + x += "finally,"; + } + unreachable(); + })(); + expect(ret, "catch"); + expect(x, "try,catch,finally,"); + + x = ""; + ret = (function() { + try { + x += "try," + try { + x += "try2,"; + return "try2"; + }catch(e) { + unreachable(); + }finally { + x += "finally2,"; + } + unreachable(); + }catch(e) { + unreachable(); + }finally { + x += "finally,"; + } + unreachable(); + })(); + expect(ret, "try2"); + expect(x, "try,try2,finally2,finally,"); + + x = ""; + ret = (function() { + while(true) { + try { + x += "try," + try { + x += "try2,"; + break; + }catch(e) { + unreachable(); + }finally { + x += "finally2,"; + } + unreachable(); + }catch(e) { + unreachable(); + }finally { + x += "finally,"; + } + unreachable(); + } + x += "ret"; + return "ret"; + })(); + expect(ret, "ret"); + expect(x, "try,try2,finally2,finally,ret"); + + x = ""; + ret = (function() { + while(true) { + try { + x += "try," + try { + x += "try2,"; + continue; + }catch(e) { + unreachable(); + }finally { + x += "finally2,"; + } + unreachable(); + }catch(e) { + unreachable(); + }finally { + x += "finally,"; + break; + } + unreachable(); + } + x += "ret"; + return "ret"; + })(); + expect(ret, "ret"); + expect(x, "try,try2,finally2,finally,ret"); })(); tmp = eval("1"); @@ -1597,6 +1757,15 @@ })(); ok(tmp, "tmp = " + tmp); +tmp = (function() { + for(var iter in [1,2,3,4]) { + var ret = false; + with({ret: true}) + return ret; + } +})(); +ok(tmp, "tmp = " + tmp); + (function() { ok(typeof(func) === "function", "typeof(func) = " + typeof(func)); with(new Object()) {
7 years, 6 months
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
53
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
45
46
47
48
49
50
51
52
53
Results per page:
10
25
50
100
200