winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2008
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
1278 discussions
Start a n
N
ew thread
James Hawkins : msi: Open the install properties key based on the install context.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: bcba82dc0c7b965ceaa15e82bc67658d129ef09b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcba82dc0c7b965ceaa15e82b…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sat Apr 5 06:02:04 2008 -0500 msi: Open the install properties key based on the install context. --- dlls/msi/action.c | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index ff93124..43ada4c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3350,6 +3350,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE); if (rc != ERROR_SUCCESS) goto end; + + rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE); + if (rc != ERROR_SUCCESS) + goto end; } else { @@ -3360,6 +3364,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); if (rc != ERROR_SUCCESS) goto end; + + rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE); + if (rc != ERROR_SUCCESS) + goto end; } rc = RegCreateKeyW(hukey, szSourceList, &source); @@ -3372,10 +3380,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; - rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE); - if (rc != ERROR_SUCCESS) - goto end; - buffer = msi_dup_property( package, INSTALLPROPERTY_PRODUCTNAMEW ); msi_reg_set_val_str( hukey, INSTALLPROPERTY_PRODUCTNAMEW, buffer ); msi_free(buffer); @@ -3995,9 +3999,18 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) return rc; - rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE); - if (rc != ERROR_SUCCESS) - return rc; + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + { + rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE); + if (rc != ERROR_SUCCESS) + return rc; + } + else + { + rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE); + if (rc != ERROR_SUCCESS) + return rc; + } /* dump all the info i can grab */ /* FIXME: Flesh out more information */ @@ -4069,7 +4082,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) msi_free(upgrade_code); } - + RegCloseKey(hkey); rc = MSIREG_OpenUserDataProductKey(package->ProductCode, &hudkey, TRUE);
1
0
0
0
James Hawkins : msi: Test and reimplement MsiQueryProductState.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: e21a26e47b2f1fb2fbd617a2a9a59f9df5b01792 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e21a26e47b2f1fb2fbd617a2a…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sat Apr 5 05:41:54 2008 -0500 msi: Test and reimplement MsiQueryProductState. --- dlls/msi/action.c | 8 ++-- dlls/msi/msi.c | 86 +++++++++++++++++++++----------------- dlls/msi/msipriv.h | 3 +- dlls/msi/registry.c | 35 ++++++++++++---- dlls/msi/tests/install.c | 5 ++- dlls/msi/tests/msi.c | 102 +++++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 185 insertions(+), 54 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e21a26e47b2f1fb2fbd61…
1
0
0
0
James Hawkins : msi: Don' t reorder the table when matching rows as the results are already ordered.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 85866317c58307cbe9a7ae6eb19c655963e52af2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85866317c58307cbe9a7ae6eb…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sat Apr 5 02:17:57 2008 -0500 msi: Don't reorder the table when matching rows as the results are already ordered. --- dlls/msi/table.c | 3 --- dlls/msi/tests/db.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 572cad6..c3739e5 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1796,9 +1796,6 @@ static UINT TABLE_find_matching_rows( struct tagMSIVIEW *view, UINT col, *row = entry->row; - if (tv->order) - *row = tv->order->reorder[*row]; - return ERROR_SUCCESS; } diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 9be1691..663388e 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -4775,8 +4775,9 @@ static void test_defaultdatabase(void) static void test_order(void) { MSIHANDLE hdb, hview, hrec; + CHAR buffer[MAX_PATH]; LPCSTR query; - UINT r; + UINT r, sz; int val; hdb = create_db(); @@ -4985,6 +4986,47 @@ static void test_order(void) MsiViewClose(hview); MsiCloseHandle(hview); + + query = "CREATE TABLE `Buffet` ( `One` CHAR(72), `Two` SHORT PRIMARY KEY `One`)"; + r = run_query(hdb, 0, query); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'uno', 2)"; + r = run_query(hdb, 0, query); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'dos', 3)"; + r = run_query(hdb, 0, query); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + query = "INSERT INTO `Buffet` ( `One`, `Two` ) VALUES ( 'tres', 1)"; + r = run_query(hdb, 0, query); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + query = "SELECT * FROM `Buffet` WHERE `One` = 'dos' ORDER BY `Two`"; + r = MsiDatabaseOpenView(hdb, query, &hview); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + r = MsiViewExecute(hview, 0); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + r = MsiViewFetch(hview, &hrec); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + + sz = sizeof(buffer); + r = MsiRecordGetString(hrec, 1, buffer, &sz); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmp(buffer, "dos"), "Expected \"dos\", got \"%s\"\n", buffer); + + r = MsiRecordGetInteger(hrec, 2); + ok(r == 3, "Expected 3, got %d\n", r); + + MsiCloseHandle(hrec); + + r = MsiViewFetch(hview, &hrec); + ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); + + MsiViewClose(hview); + MsiCloseHandle(hview); MsiCloseHandle(hdb); }
1
0
0
0
James Hawkins : msi: Set the install context based on the ALLUSERS property .
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 82517d6d676d575277a7bbbc3a39832365a37409 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82517d6d676d575277a7bbbc3…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Sat Apr 5 00:10:02 2008 -0500 msi: Set the install context based on the ALLUSERS property. --- dlls/msi/action.c | 31 ++++++++++++++++++++----------- dlls/msi/files.c | 8 ++++---- dlls/msi/msipriv.h | 1 + dlls/msi/package.c | 28 ++++++++++++++++++++++++++-- 4 files changed, 51 insertions(+), 17 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index e7edabe..2029c11 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3345,13 +3345,22 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) /* ok there is a lot more done here but i need to figure out what */ - rc = MSIREG_OpenProductsKey(package->ProductCode,&hkey,TRUE); - if (rc != ERROR_SUCCESS) - goto end; + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + { + rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE); + if (rc != ERROR_SUCCESS) + goto end; + } + else + { + rc = MSIREG_OpenProductsKey(package->ProductCode,&hkey,TRUE); + if (rc != ERROR_SUCCESS) + goto end; - rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); - if (rc != ERROR_SUCCESS) - goto end; + rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); + if (rc != ERROR_SUCCESS) + goto end; + } rc = RegCreateKeyW(hukey, szSourceList, &source); if (rc != ERROR_SUCCESS) @@ -3400,19 +3409,19 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) buffer = strrchrW( package->PackagePath, '\\') + 1; rc = MsiSourceListSetInfoW( package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, buffer ); if (rc != ERROR_SUCCESS) goto end; rc = MsiSourceListSetInfoW( package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATHW, szEmpty ); if (rc != ERROR_SUCCESS) goto end; rc = MsiSourceListSetInfoW( package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTW, szEmpty ); if (rc != ERROR_SUCCESS) goto end; @@ -4221,13 +4230,13 @@ static UINT ACTION_ResolveSource(MSIPACKAGE* package) DWORD size = 0; rc = MsiSourceListGetInfoW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTW,NULL,&size); if (rc == ERROR_MORE_DATA) { prompt = msi_alloc(size * sizeof(WCHAR)); MsiSourceListGetInfoW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPTW,prompt,&size); } else diff --git a/dlls/msi/files.c b/dlls/msi/files.c index e0f7889..1aae66d 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -581,11 +581,11 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf } if (mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE) - msi_package_add_media_disk(package, MSIINSTALLCONTEXT_USERUNMANAGED, + msi_package_add_media_disk(package, package->Context, MSICODE_PRODUCT, mi->disk_id, mi->volume_label, mi->disk_prompt); - msi_package_add_info(package, MSIINSTALLCONTEXT_USERUNMANAGED, + msi_package_add_info(package, package->Context, options, INSTALLPROPERTY_LASTUSEDSOURCEW, source); msi_free(source_dir); @@ -603,7 +603,7 @@ static UINT find_published_source(MSIPACKAGE *package, struct media_info *mi) UINT r; r = MsiSourceListGetInfoW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, + package->Context, MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, source, &size); if (r != ERROR_SUCCESS) return r; @@ -612,7 +612,7 @@ static UINT find_published_source(MSIPACKAGE *package, struct media_info *mi) volumesz = MAX_PATH; promptsz = MAX_PATH; while (MsiSourceListEnumMediaDisksW(package->ProductCode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, + package->Context, MSICODE_PRODUCT, index++, &id, volume, &volumesz, prompt, &promptsz) == ERROR_SUCCESS) { diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 975ebb6..43fa923 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -307,6 +307,7 @@ typedef struct tagMSIPACKAGE float center_y; UINT WordCount; + UINT Context; struct list subscriptions; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index fad0520..a587a63 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -416,7 +416,6 @@ static VOID set_installer_properties(MSIPACKAGE *package) static const WCHAR szColorBits[] = {'C','o','l','o','r','B','i','t','s',0}; static const WCHAR szIntFormat[] = {'%','d',0}; static const WCHAR szIntel[] = { 'I','n','t','e','l',0 }; - static const WCHAR szAllUsers[] = { 'A','L','L','U','S','E','R','S',0 }; static const WCHAR szUserInfo[] = { 'S','O','F','T','W','A','R','E','\\', 'M','i','c','r','o','s','o','f','t','\\', @@ -542,7 +541,6 @@ static VOID set_installer_properties(MSIPACKAGE *package) /* in a wine environment the user is always admin and privileged */ MSI_SetPropertyW(package,szAdminUser,szOne); MSI_SetPropertyW(package,szPriv,szOne); - MSI_SetPropertyW(package, szAllUsers, szOne); /* set the os things */ OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); @@ -762,6 +760,30 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package) return r; } +static UINT msi_set_context(MSIPACKAGE *package) +{ + WCHAR val[10]; + DWORD sz = 10; + DWORD num; + UINT r; + + static const WCHAR szOne[] = {'1',0}; + static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0}; + + package->Context = MSIINSTALLCONTEXT_USERUNMANAGED; + + r = MSI_GetPropertyW(package, szAllUsers, val, &sz); + if (r == ERROR_SUCCESS) + { + num = atolW(val); + if (num == 1 || num == 2) + package->Context = MSIINSTALLCONTEXT_MACHINE; + } + + MSI_SetPropertyW(package, szAllUsers, szOne); + return ERROR_SUCCESS; +} + MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) { static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 }; @@ -801,6 +823,8 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) if (package->WordCount & MSIWORDCOUNT_ADMINISTRATIVE) msi_load_admin_properties( package ); + + msi_set_context( package ); } return package;
1
0
0
0
James Hawkins : msi: Reset the feature states if iInstallLevel is 0 or below.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 30c1b88828464e1220c7eb4b884aedce6913607f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30c1b88828464e1220c7eb4b8…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Apr 4 22:48:20 2008 -0500 msi: Reset the feature states if iInstallLevel is 0 or below. --- dlls/msi/install.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 999840d..6415459 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -1169,15 +1169,16 @@ UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel ) TRACE("%p %i\n", package, iInstallLevel); - if (iInstallLevel<1 || iInstallLevel>32767) + if (iInstallLevel > 32767) return ERROR_INVALID_PARAMETER; + if (iInstallLevel < 1) + return MSI_SetFeatureStates( package ); + sprintfW( level, fmt, iInstallLevel ); r = MSI_SetPropertyW( package, szInstallLevel, level ); if ( r == ERROR_SUCCESS ) - { r = MSI_SetFeatureStates( package ); - } return r; }
1
0
0
0
Dan Hipschman : qedit/tests: Add a partial test for IMediaDet_get_StreamMediaType.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 742120ba94b2b9d58a9a0d5bd3eaa2b84434d21e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=742120ba94b2b9d58a9a0d5bd…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Apr 4 16:01:27 2008 -0700 qedit/tests: Add a partial test for IMediaDet_get_StreamMediaType. --- dlls/qedit/tests/mediadet.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index 0ec9458..0870fd0 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -22,6 +22,8 @@ #define COBJMACROS +#include "ole2.h" +#include "uuids.h" #include "wine/test.h" #include "qedit.h" @@ -84,6 +86,7 @@ static void test_mediadet(void) BSTR filename = NULL; long nstrms = 0; long strm; + AM_MEDIA_TYPE mt; hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); @@ -114,6 +117,12 @@ static void test_mediadet(void) todo_wine ok(hr == S_OK, "IMediaDet_get_CurrentStream\n"); todo_wine ok(strm == 0, "IMediaDet_get_CurrentStream\n"); + ZeroMemory(&mt, sizeof mt); + hr = IMediaDet_get_StreamMediaType(pM, &mt); + todo_wine ok(hr == S_OK, "IMediaDet_get_StreamMediaType\n"); + todo_wine ok(IsEqualGUID(&mt.majortype, &MEDIATYPE_Video), + "IMediaDet_get_StreamMediaType\n"); + hr = IMediaDet_Release(pM); ok(hr == 0, "IMediaDet_Release returned: %x\n", hr);
1
0
0
0
Dan Hipschman : qedit/tests: Add a test for IMediaDet_(put|get) _CurrentStream.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: b37ee801668d67cbdac6b072d08bdf4c17f3698d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b37ee801668d67cbdac6b072d…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Apr 4 16:01:06 2008 -0700 qedit/tests: Add a test for IMediaDet_(put|get)_CurrentStream. --- dlls/qedit/tests/mediadet.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index 26d27b1..0ec9458 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -83,6 +83,7 @@ static void test_mediadet(void) IMediaDet *pM = NULL; BSTR filename = NULL; long nstrms = 0; + long strm; hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); @@ -105,6 +106,14 @@ static void test_mediadet(void) "IMediaDet_get_Filename\n"); SysFreeString(filename); + hr = IMediaDet_put_CurrentStream(pM, 0); + todo_wine ok(hr == S_OK, "IMediaDet_put_CurrentStream\n"); + + strm = -1; + hr = IMediaDet_get_CurrentStream(pM, &strm); + todo_wine ok(hr == S_OK, "IMediaDet_get_CurrentStream\n"); + todo_wine ok(strm == 0, "IMediaDet_get_CurrentStream\n"); + hr = IMediaDet_Release(pM); ok(hr == 0, "IMediaDet_Release returned: %x\n", hr);
1
0
0
0
Dan Hipschman : qedit/tests: Add a test for IMediaDet_get_Filename.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 07f9c44b36450e98ece1427843b3894a998febf0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07f9c44b36450e98ece142784…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Apr 4 16:00:41 2008 -0700 qedit/tests: Add a test for IMediaDet_get_Filename. --- dlls/qedit/tests/mediadet.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index de4bd23..26d27b1 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -98,6 +98,13 @@ static void test_mediadet(void) todo_wine ok(hr == S_OK, "IMediaDet_get_OutputStreams\n"); todo_wine ok(nstrms == 1, "IMediaDet_get_OutputStreams\n"); + filename = NULL; + hr = IMediaDet_get_Filename(pM, &filename); + todo_wine ok(hr == S_OK, "IMediaDet_get_Filename\n"); + todo_wine ok(lstrcmpW(filename, test_avi_filename) == 0, + "IMediaDet_get_Filename\n"); + SysFreeString(filename); + hr = IMediaDet_Release(pM); ok(hr == 0, "IMediaDet_Release returned: %x\n", hr);
1
0
0
0
Dan Hipschman : qedit/tests: Add a test for IMediaDet_get_OutputStreams.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: b0b47ac5f58f37bf06e76ab51173fd7617891774 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0b47ac5f58f37bf06e76ab51…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Apr 4 16:00:05 2008 -0700 qedit/tests: Add a test for IMediaDet_get_OutputStreams. --- dlls/qedit/tests/mediadet.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index b9ea9c0..de4bd23 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -82,6 +82,7 @@ static void test_mediadet(void) HRESULT hr; IMediaDet *pM = NULL; BSTR filename = NULL; + long nstrms = 0; hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); @@ -93,6 +94,10 @@ static void test_mediadet(void) todo_wine ok(hr == S_OK, "IMediaDet_put_Filename -> %x\n", hr); SysFreeString(filename); + hr = IMediaDet_get_OutputStreams(pM, &nstrms); + todo_wine ok(hr == S_OK, "IMediaDet_get_OutputStreams\n"); + todo_wine ok(nstrms == 1, "IMediaDet_get_OutputStreams\n"); + hr = IMediaDet_Release(pM); ok(hr == 0, "IMediaDet_Release returned: %x\n", hr);
1
0
0
0
Dan Hipschman : qedit/tests: Add test framework and test for IMediaDet_put_Filename.
by Alexandre Julliard
07 Apr '08
07 Apr '08
Module: wine Branch: master Commit: 999bc5bcb292a796454d081abf0ca1d868a00090 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=999bc5bcb292a796454d081ab…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Apr 4 15:59:08 2008 -0700 qedit/tests: Add test framework and test for IMediaDet_put_Filename. --- dlls/qedit/tests/Makefile.in | 4 ++- dlls/qedit/tests/mediadet.c | 66 ++++++++++++++++++++++++++++++++++++++++++ dlls/qedit/tests/qedit.rc | 22 ++++++++++++++ dlls/qedit/tests/test.avi | Bin 0 -> 5676 bytes 4 files changed, 91 insertions(+), 1 deletions(-) diff --git a/dlls/qedit/tests/Makefile.in b/dlls/qedit/tests/Makefile.in index 5236975..94c5e60 100644 --- a/dlls/qedit/tests/Makefile.in +++ b/dlls/qedit/tests/Makefile.in @@ -3,12 +3,14 @@ TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = qedit.dll -IMPORTS = ole32 kernel32 +IMPORTS = oleaut32 ole32 kernel32 EXTRALIBS = -lstrmiids -luuid CTESTS = \ mediadet.c +RC_SRCS = qedit.rc + @MAKE_TEST_RULES@ @DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index b550c8e..b9ea9c0 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -25,22 +25,88 @@ #include "wine/test.h" #include "qedit.h" +static WCHAR test_avi_filename[MAX_PATH]; + +static BOOL init_tests(void) +{ + static WCHAR temp_path[MAX_PATH]; + static WCHAR prefix[] = {'D','E','S',0}; + static WCHAR avi[] = {'a','v','i',0}; + HRSRC res; + HGLOBAL data; + char *mem; + DWORD size, written; + HANDLE fh; + + res = FindResourceW(NULL, (LPWSTR) 1, (LPWSTR) 256); + if (!res) + return FALSE; + + data = LoadResource(NULL, res); + if (!data) + return FALSE; + + mem = LockResource(data); + if (!mem) + return FALSE; + + size = SizeofResource(NULL, res); + if (size == 0) + return FALSE; + + if (!GetTempPathW(sizeof temp_path, temp_path)) + return FALSE; + + /* We might end up relying on the extension here, so .TMP is no good. */ + if (!GetTempFileNameW(temp_path, prefix, 0, test_avi_filename)) + return FALSE; + + DeleteFileW(test_avi_filename); + lstrcpyW(test_avi_filename + lstrlenW(test_avi_filename) - 3, avi); + + fh = CreateFileW(test_avi_filename, GENERIC_WRITE, 0, NULL, + CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); + if (fh == INVALID_HANDLE_VALUE) + return FALSE; + + if (!WriteFile(fh, mem, size, &written, NULL) || written != size) + return FALSE; + + CloseHandle(fh); + + return TRUE; +} + static void test_mediadet(void) { HRESULT hr; IMediaDet *pM = NULL; + BSTR filename = NULL; hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); ok(pM != NULL, "pM is NULL\n"); + filename = SysAllocString(test_avi_filename); + hr = IMediaDet_put_Filename(pM, filename); + todo_wine ok(hr == S_OK, "IMediaDet_put_Filename -> %x\n", hr); + SysFreeString(filename); + hr = IMediaDet_Release(pM); ok(hr == 0, "IMediaDet_Release returned: %x\n", hr); + + DeleteFileW(test_avi_filename); } START_TEST(mediadet) { + if (!init_tests()) + { + skip("Couldn't initialize tests!\n"); + return; + } + CoInitialize(NULL); test_mediadet(); CoUninitialize(); diff --git a/dlls/qedit/tests/qedit.rc b/dlls/qedit/tests/qedit.rc new file mode 100644 index 0000000..b138624 --- /dev/null +++ b/dlls/qedit/tests/qedit.rc @@ -0,0 +1,22 @@ +/* + * Resource file for qedit tests. + * + * Copyright 2008 Google (Dan Hipschman) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* @makedep: test.avi */ +1 256 test.avi diff --git a/dlls/qedit/tests/test.avi b/dlls/qedit/tests/test.avi new file mode 100644 index 0000000..8756c64 Binary files /dev/null and b/dlls/qedit/tests/test.avi differ
1
0
0
0
← Newer
1
...
106
107
108
109
110
111
112
...
128
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200