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
October 2006
----- 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
3 participants
1032 discussions
Start a n
N
ew thread
Mike McCormack : msi: Fix a memory leak.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 4047cc70093890da352bd80ab6d2042065ec412d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4047cc70093890da352bd80ab…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Tue Oct 17 16:11:42 2006 +0900 msi: Fix a memory leak. --- dlls/msi/action.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 4bf505c..d893af2 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -596,6 +596,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *pac if (!check) MSI_SetPropertyW(package, cszSOURCEDIR, path); + msi_free( package->PackagePath ); package->PackagePath = path; msi_free(check);
1
0
0
0
Mike McCormack : msi: Add a test for modifying a table containing binary data.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: fbddd9060f252b5f4b150c83281e83fe42b77564 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbddd9060f252b5f4b150c832…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Tue Oct 17 14:55:22 2006 +0900 msi: Add a test for modifying a table containing binary data. --- dlls/msi/tests/db.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 51 insertions(+), 2 deletions(-) diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index f3e15a8..68c7682 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -1694,7 +1694,7 @@ static void test_handle_limit(void) static void generate_transform(void) { - MSIHANDLE hdb1, hdb2; + MSIHANDLE hdb1, hdb2, hrec; LPCSTR query; UINT r; @@ -1736,6 +1736,20 @@ static void generate_transform(void) r = run_query(hdb1, 0, query); ok(r == ERROR_SUCCESS, "failed to delete row\n"); + hrec = MsiCreateRecord(2); + r = MsiRecordSetInteger(hrec, 1, 1); + ok(r == ERROR_SUCCESS, "failed to set integer\n"); + + write_file("testdata.bin", "naengmyon", 9); + r = MsiRecordSetStream(hrec, 2, "testdata.bin"); + ok(r == ERROR_SUCCESS, "failed to set stream\n"); + + query = "INSERT INTO `BINARY` ( `ID`, `BLOB` ) VALUES ( ?, ? )"; + r = run_query(hdb1, hrec, query); + ok(r == ERROR_SUCCESS, "failed to add row with blob\n"); + + MsiCloseHandle(hrec); + /* database needs to be committed */ MsiDatabaseCommit(hdb1); @@ -1744,6 +1758,8 @@ static void generate_transform(void) MsiCloseHandle( hdb1 ); MsiCloseHandle( hdb2 ); + + DeleteFile("testdata.bin"); } /* data for generating a transform */ @@ -1755,6 +1771,8 @@ static const WCHAR name3[] = { 0x4840, 0 static const WCHAR name4[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ static const WCHAR name5[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ static const WCHAR name6[] = { 0x4840, 0x3e16, 0x4818, 0}; /* MOO */ +static const WCHAR name7[] = { 0x4840, 0x3c8b, 0x3a97, 0x409b, 0 }; /* BINARY */ +static const WCHAR name8[] = { 0x3c8b, 0x3a97, 0x409b, 0x387e, 0 }; /* BINARY.1 */ /* data in each table */ static const WCHAR data1[] = { /* AAR */ @@ -1786,6 +1804,13 @@ static const WCHAR data6[] = { /* MOO */ 0x0000, 0x8003, /* delete row */ }; +static const WCHAR data7[] = { /* BINARY */ + 0x0201, 0x8001, 0x0001, +}; + +static const char data8[] = /* stream data for the BINARY table */ + "naengmyon"; + static const struct { LPCWSTR name; const void *data; @@ -1798,6 +1823,8 @@ static const struct { { name4, data4, sizeof data4 - 1 }, { name5, data5, sizeof data5 }, { name6, data6, sizeof data6 }, + { name7, data7, sizeof data7 }, + { name8, data8, sizeof data8 - 1 }, }; #define NUM_TRANSFORM_TABLES (sizeof table_transform_data/sizeof table_transform_data[0]) @@ -1829,7 +1856,7 @@ static void generate_transform_manual(vo STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); if (FAILED(r)) { - ok(0, "failed to create stream\n"); + ok(0, "failed to create stream %08x\n", r); continue; } @@ -1848,6 +1875,8 @@ static void test_try_transform(void) MSIHANDLE hdb, hrec; LPCSTR query; UINT r; + DWORD sz; + char buffer[0x10]; DeleteFile(msifile); DeleteFile(msifile2); @@ -1873,6 +1902,10 @@ static void test_try_transform(void) r = run_query(hdb, 0, query); ok(r == ERROR_SUCCESS, "failed to add row\n"); + query = "CREATE TABLE `BINARY` ( `ID` SHORT NOT NULL, `BLOB` OBJECT PRIMARY KEY `ID`)"; + r = run_query(hdb, 0, query); + ok(r == ERROR_SUCCESS, "failed to add table\n"); + r = MsiDatabaseCommit( hdb ); ok( r == ERROR_SUCCESS , "Failed to commit database\n" ); @@ -1930,6 +1963,22 @@ static void test_try_transform(void) ok(r == ERROR_NO_MORE_ITEMS, "select query failed\n"); if (hrec) MsiCloseHandle(hrec); + /* check added stream */ + hrec = 0; + query = "select `BLOB` from `BINARY` where `ID` = 1"; + r = do_query(hdb, query, &hrec); + ok(r == ERROR_SUCCESS, "select query failed\n"); + + todo_wine { + /* check the contents of the stream */ + sz = sizeof buffer; + r = MsiRecordReadStream( hrec, 1, buffer, &sz ); + ok(r == ERROR_SUCCESS, "read stream failed\n"); + ok(!memcmp(buffer, "naengmyon", 9), "stream data was wrong\n"); + ok(sz == 9, "stream data was wrong size\n"); + if (hrec) MsiCloseHandle(hrec); + } + MsiCloseHandle( hdb ); DeleteFile(msifile);
1
0
0
0
Mike McCormack : msi: Add a test for summary information.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 194722d3a3b9595f0993f74c177d5406fca7643d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=194722d3a3b9595f0993f74c1…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Tue Oct 17 14:55:04 2006 +0900 msi: Add a test for summary information. --- dlls/msi/tests/suminfo.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 192 insertions(+), 1 deletions(-) diff --git a/dlls/msi/tests/suminfo.c b/dlls/msi/tests/suminfo.c index fd61fb0..ca61e76 100644 --- a/dlls/msi/tests/suminfo.c +++ b/dlls/msi/tests/suminfo.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <windows.h> #include <msi.h> #include <msiquery.h> +#include <objidl.h> #include "wine/test.h" @@ -62,7 +63,7 @@ #define PID_MSIVERSION PID_PAGECOUNT #define PID_MSISOURCE PID_WORDCOUNT #define PID_MSIRESTRICT PID_CHARCOUNT -START_TEST(suminfo) +static void test_suminfo(void) { const char *msifile = "winetest.msi"; MSIHANDLE hdb = 0, hsuminfo; @@ -235,3 +236,193 @@ START_TEST(suminfo) r = DeleteFile(msifile); ok(r, "DeleteFile failed\n"); } + +static const WCHAR tb[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 }; /* _Tables */ +static const WCHAR sd[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ +static const WCHAR sp[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ + +#define LOSE_CONST(x) ((LPSTR)(UINT_PTR)(x)) + +static void test_create_database_binary(void) +{ + static const CLSID CLSID_MsiDatabase = + { 0xc1084, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }; + static const CLSID IID_IPropertySetStorage = + { 0x13a, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }; + static const CLSID FMTID_SummaryInformation = + { 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}}; + DWORD mode = STGM_CREATE | STGM_READWRITE | STGM_DIRECT | STGM_SHARE_EXCLUSIVE; + static const WCHAR msifile[] = { + 'w','i','n','e','t','e','s','t','.','m','s','i',0 }; + IPropertySetStorage *pss = NULL; + IPropertyStorage *ps = NULL; + IStorage *stg = NULL; + IStream *stm = NULL; + HRESULT r; + PROPSPEC propspec[10]; + PROPVARIANT propvar[10]; + USHORT data[2] = { 0, 0 }; + + r = StgCreateDocfile( msifile, mode, 0, &stg ); + ok( r == S_OK, "failed to create database\n"); + + r = IStorage_SetClass( stg, &CLSID_MsiDatabase ); + ok( r == S_OK, "failed to set clsid\n"); + + /* create the _StringData stream */ + r = IStorage_CreateStream( stg, sd, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); + ok( r == S_OK, "failed to create stream\n"); + + IStream_Release( stm ); + + /* create the _StringPool stream */ + r = IStorage_CreateStream( stg, sp, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); + ok( r == S_OK, "failed to create stream\n"); + + r = IStream_Write( stm, data, sizeof data, NULL ); + ok( r == S_OK, "failed to write stream\n"); + + IStream_Release( stm ); + + /* create the _Tables stream */ + r = IStorage_CreateStream( stg, tb, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); + ok( r == S_OK, "failed to create stream\n"); + + IStream_Release( stm ); + + r = IStorage_QueryInterface( stg, &IID_IPropertySetStorage, (void**) &pss ); + ok( r == S_OK, "failed to set clsid\n"); + + r = IPropertySetStorage_Create( pss, &FMTID_SummaryInformation, NULL, 0, mode, &ps ); + ok( r == S_OK, "failed to create property set\n"); + + r = IPropertyStorage_SetClass( ps, &FMTID_SummaryInformation ); + ok( r == S_OK, "failed to set class\n"); + + PropVariantClear( &propvar[0] ); + propspec[0].lpwstr = NULL; + propspec[0].ulKind = PRSPEC_PROPID; + propspec[0].propid = PID_TITLE; + propvar[0].vt = VT_LPSTR; + U(propvar[0]).pszVal = LOSE_CONST("test title"); + + PropVariantClear( &propvar[1] ); + propspec[1].lpwstr = NULL; + propspec[1].ulKind = PRSPEC_PROPID; + propspec[1].propid = PID_SUBJECT; + propvar[1].vt = VT_LPSTR; + U(propvar[1]).pszVal = LOSE_CONST("msi suminfo / property storage test"); + + PropVariantClear( &propvar[2] ); + propspec[2].lpwstr = NULL; + propspec[2].ulKind = PRSPEC_PROPID; + propspec[2].propid = PID_AUTHOR; + propvar[2].vt = VT_LPSTR; + U(propvar[2]).pszVal = LOSE_CONST("mike_m"); + + PropVariantClear( &propvar[3] ); + propspec[3].lpwstr = NULL; + propspec[3].ulKind = PRSPEC_PROPID; + propspec[3].propid = PID_TEMPLATE; + propvar[3].vt = VT_LPSTR; + U(propvar[3]).pszVal = LOSE_CONST(";1033"); /* actually the string table's codepage */ + + PropVariantClear( &propvar[4] ); + propspec[4].lpwstr = NULL; + propspec[4].ulKind = PRSPEC_PROPID; + propspec[4].propid = PID_REVNUMBER; + propvar[4].vt = VT_LPSTR; + U(propvar[4]).pszVal = LOSE_CONST("{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); + + PropVariantClear( &propvar[5] ); + propspec[5].lpwstr = NULL; + propspec[5].ulKind = PRSPEC_PROPID; + propspec[5].propid = PID_PAGECOUNT; + propvar[5].vt = VT_I4; + U(propvar[5]).lVal = 100; + + PropVariantClear( &propvar[6] ); + propspec[6].lpwstr = NULL; + propspec[6].ulKind = PRSPEC_PROPID; + propspec[6].propid = PID_WORDCOUNT; + propvar[6].vt = VT_I4; + U(propvar[6]).lVal = 0; + + /* MSDN says that PID_LASTPRINTED should be a VT_FILETIME... */ + PropVariantClear( &propvar[7] ); + propspec[7].lpwstr = NULL; + propspec[7].ulKind = PRSPEC_PROPID; + propspec[7].propid = PID_LASTPRINTED; + propvar[7].vt = VT_LPSTR; + U(propvar[7]).pszVal = LOSE_CONST("7/1/1999 5:17"); + + r = IPropertyStorage_WriteMultiple( ps, 8, propspec, propvar, PID_FIRST_USABLE ); + ok( r == S_OK, "failed to write properties\n"); + + IPropertyStorage_Commit( ps, STGC_DEFAULT ); + + IPropertyStorage_Release( ps ); + IPropertySetStorage_Release( pss ); + + IStorage_Commit( stg, STGC_DEFAULT ); + IStorage_Release( stg ); +} + +static void test_summary_binary(void) +{ + const char *msifile = "winetest.msi"; + MSIHANDLE hdb = 0, hsuminfo = 0; + UINT r, type, count; + INT ival; + DWORD sz; + char sval[20]; + + DeleteFile( msifile ); + + test_create_database_binary(); + + ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes(msifile), "file doesn't exist!\n"); + + /* just MsiOpenDatabase should not create a file */ + r = MsiOpenDatabase(msifile, MSIDBOPEN_READONLY, &hdb); + ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); + + r = MsiGetSummaryInformation(hdb, NULL, 0, &hsuminfo); + ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); + + /* + * Check what reading PID_LASTPRINTED does... + * The string value is written to the msi file + * but it appears that we're not allowed to read it back again. + * We can still read its type though...? + */ + sz = sizeof sval; + r = MsiSummaryInfoGetProperty(hsuminfo, PID_LASTPRINTED, &type, NULL, NULL, sval, &sz); + ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetProperty failed\n"); + ok( !strcmp(sval, ""), "value incorrect\n"); + todo_wine { + ok( type == VT_LPSTR, "type wrong\n"); + ok( sz == 0, "length wrong\n"); + } + + r = MsiSummaryInfoGetProperty(hsuminfo, PID_WORDCOUNT, &type, &ival, NULL, NULL, NULL); + ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetProperty failed\n"); + todo_wine ok( ival == 0, "value incorrect\n"); + + /* looks like msi adds some of its own values in here */ + count = 0; + r = MsiSummaryInfoGetPropertyCount( hsuminfo, &count ); + ok(r == ERROR_SUCCESS, "getpropcount failed\n"); + todo_wine ok(count == 10, "prop count incorrect\n"); + + MsiCloseHandle( hsuminfo ); + MsiCloseHandle( hdb ); + + DeleteFile( msifile ); +} + +START_TEST(suminfo) +{ + test_suminfo(); + test_summary_binary(); +}
1
0
0
0
James Hawkins : msi: Revert "msi: Perform button control events in greatest to least order."
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 9119b700ed241391b6c52aecb697713bce529eee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9119b700ed241391b6c52aecb…
Author: James Hawkins <truiken(a)gmail.com> Date: Mon Oct 16 15:44:36 2006 -0700 msi: Revert "msi: Perform button control events in greatest to least order." --- dlls/msi/dialog.c | 2 + dlls/msi/msipriv.h | 1 - dlls/msi/msiquery.c | 77 --------------------------------------------------- 3 files changed, 1 insertions(+), 79 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 06558de..f40ed76 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2912,7 +2912,7 @@ static UINT msi_dialog_button_handler( m return 0; } - r = MSI_ReverseIterateRecords( view, 0, msi_dialog_control_event, dialog ); + r = MSI_IterateRecords( view, 0, msi_dialog_control_event, dialog ); msiobj_release( &view->hdr ); return r; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index d65e0ab..94edb23 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -601,7 +601,6 @@ extern UINT MSI_OpenDatabaseW( LPCWSTR, extern UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY ** ); extern UINT MSI_OpenQuery( MSIDATABASE *, MSIQUERY **, LPCWSTR, ... ); typedef UINT (*record_func)( MSIRECORD *, LPVOID ); -extern UINT MSI_ReverseIterateRecords( MSIQUERY *, DWORD *, record_func, LPVOID ); extern UINT MSI_IterateRecords( MSIQUERY *, DWORD *, record_func, LPVOID ); extern MSIRECORD *MSI_QueryGetRecord( MSIDATABASE *db, LPCWSTR query, ... ); extern UINT MSI_DatabaseImport( MSIDATABASE *, LPCWSTR, LPCWSTR ); diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 1346969..f91a123 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -27,7 +27,6 @@ #include "winbase.h" #include "winerror.h" #include "wine/debug.h" #include "wine/unicode.h" -#include "wine/list.h" #include "msi.h" #include "msiquery.h" #include "objbase.h" @@ -167,82 +166,6 @@ UINT MSI_OpenQuery( MSIDATABASE *db, MSI return r; } -struct rec_list -{ - struct list entry; - MSIRECORD *rec; -}; - -UINT MSI_ReverseIterateRecords( MSIQUERY *view, DWORD *count, - record_func func, LPVOID param ) -{ - MSIRECORD *rec = NULL; - struct rec_list *add_rec; - struct list records; - UINT r, n = 0, max = 0; - - r = MSI_ViewExecute( view, NULL ); - if( r != ERROR_SUCCESS ) - return r; - - list_init( &records ); - - if( count ) - max = *count; - - /* reverse the query */ - for( n = 0; (max == 0) || (n < max); n++ ) - { - r = MSI_ViewFetch( view, &rec ); - if( r != ERROR_SUCCESS ) - { - if ( r == ERROR_NO_MORE_ITEMS ) - break; - else - goto done; - } - - add_rec = msi_alloc( sizeof( *add_rec ) ); - if (!add_rec) - goto done; - - add_rec->rec = rec; - list_add_head( &records, &add_rec->entry ); - } - - /* iterate over the reversed records */ - n = 0; - LIST_FOR_EACH_ENTRY( add_rec, &records, struct rec_list, entry ) - { - if (func) - r = func( add_rec->rec, param ); - - msiobj_release( &add_rec->rec->hdr ); - if ( r != ERROR_SUCCESS ) - goto done; - - n++; - } - -done: - MSI_ViewClose( view ); - - while ( !list_empty( &records ) ) - { - add_rec = LIST_ENTRY( list_head( &records ), struct rec_list, entry ); - list_remove( &add_rec->entry ); - msi_free( add_rec ); - } - - if( count ) - *count = n; - - if( r == ERROR_NO_MORE_ITEMS ) - r = ERROR_SUCCESS; - - return r; -} - UINT MSI_IterateRecords( MSIQUERY *view, DWORD *count, record_func func, LPVOID param ) {
1
0
0
0
Markus Amsler : d3d8: Backport d3d9 surface tests.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 5f1a80a47bdd2b0feb2395797f99e5b310aea382 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f1a80a47bdd2b0feb2395797…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Oct 17 00:42:19 2006 +0200 d3d8: Backport d3d9 surface tests. --- dlls/d3d8/tests/Makefile.in | 5 +- dlls/d3d8/tests/surface.c | 135 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/tests/Makefile.in b/dlls/d3d8/tests/Makefile.in index 4af5df3..7dfbf1a 100644 --- a/dlls/d3d8/tests/Makefile.in +++ b/dlls/d3d8/tests/Makefile.in @@ -4,11 +4,12 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = d3d8.dll IMPORTS = user32 kernel32 -EXTRALIBS = -ldxerr8 +EXTRALIBS = -ldxerr8 -luuid -ldxguid CTESTS = \ d3d8_main.c \ - device.c + device.c \ + surface.c @MAKE_TEST_RULES@ diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c new file mode 100644 index 0000000..0709cd1 --- /dev/null +++ b/dlls/d3d8/tests/surface.c @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2006 Henri Verbeet + * + * 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 + */ +#define COBJMACROS +#include <d3d8.h> +#include "wine/test.h" + +static HWND create_window(void) +{ + WNDCLASS wc = {0}; + wc.lpfnWndProc = &DefWindowProc; + wc.lpszClassName = "d3d8_test_wc"; + RegisterClass(&wc); + + return CreateWindow("d3d8_test_wc", "d3d8_test", + 0, 0, 0, 0, 0, 0, 0, 0, 0); +} + +static IDirect3DDevice8 *init_d3d8(HMODULE d3d8_handle) +{ + IDirect3D8 * (__stdcall * d3d8_create)(UINT SDKVersion) = 0; + IDirect3D8 *d3d8_ptr = 0; + IDirect3DDevice8 *device_ptr = 0; + D3DPRESENT_PARAMETERS present_parameters; + D3DDISPLAYMODE d3ddm; + HRESULT hr; + + d3d8_create = (void *)GetProcAddress(d3d8_handle, "Direct3DCreate8"); + ok(d3d8_create != NULL, "Failed to get address of Direct3DCreate8\n"); + if (!d3d8_create) return NULL; + + d3d8_ptr = d3d8_create(D3D_SDK_VERSION); + ok(d3d8_ptr != NULL, "Failed to create IDirect3D8 object\n"); + if (!d3d8_ptr) return NULL; + + IDirect3D8_GetAdapterDisplayMode(d3d8_ptr, D3DADAPTER_DEFAULT, &d3ddm ); + ZeroMemory(&present_parameters, sizeof(present_parameters)); + present_parameters.Windowed = TRUE; + present_parameters.hDeviceWindow = create_window(); + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + present_parameters.BackBufferFormat = d3ddm.Format; + + hr = IDirect3D8_CreateDevice(d3d8_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); + ok(SUCCEEDED(hr), "IDirect3D_CreateDevice returned %#x\n", hr); + + return device_ptr; +} + +static void test_surface_get_container(IDirect3DDevice8 *device_ptr) +{ + IDirect3DTexture8 *texture_ptr = 0; + IDirect3DSurface8 *surface_ptr = 0; + void *container_ptr; + HRESULT hr; + + hr = IDirect3DDevice8_CreateTexture(device_ptr, 128, 128, 1, 0, + D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &texture_ptr); + ok(SUCCEEDED(hr) && texture_ptr != NULL, "CreateTexture returned: hr %#x, texture_ptr %p. " + "Expected hr %#x, texture_ptr != %p\n", hr, texture_ptr, D3D_OK, NULL); + if (!texture_ptr || FAILED(hr)) goto cleanup; + + hr = IDirect3DTexture8_GetSurfaceLevel(texture_ptr, 0, &surface_ptr); + ok(SUCCEEDED(hr) && surface_ptr != NULL, "GetSurfaceLevel returned: hr %#x, surface_ptr %p. " + "Expected hr %#x, surface_ptr != %p\n", hr, surface_ptr, D3D_OK, NULL); + if (!surface_ptr || FAILED(hr)) goto cleanup; + + /* These should work... */ + container_ptr = (void *)0x1337c0d3; + hr = IDirect3DSurface8_GetContainer(surface_ptr, &IID_IUnknown, &container_ptr); + ok(SUCCEEDED(hr) && container_ptr == texture_ptr, "GetContainer returned: hr %#x, container_ptr %p. " + "Expected hr %#x, container_ptr %p\n", hr, container_ptr, S_OK, texture_ptr); + if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); + + container_ptr = (void *)0x1337c0d3; + hr = IDirect3DSurface8_GetContainer(surface_ptr, &IID_IDirect3DResource8, &container_ptr); + ok(SUCCEEDED(hr) && container_ptr == texture_ptr, "GetContainer returned: hr %#x, container_ptr %p. " + "Expected hr %#x, container_ptr %p\n", hr, container_ptr, S_OK, texture_ptr); + if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); + + container_ptr = (void *)0x1337c0d3; + hr = IDirect3DSurface8_GetContainer(surface_ptr, &IID_IDirect3DBaseTexture8, &container_ptr); + ok(SUCCEEDED(hr) && container_ptr == texture_ptr, "GetContainer returned: hr %#x, container_ptr %p. " + "Expected hr %#x, container_ptr %p\n", hr, container_ptr, S_OK, texture_ptr); + if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); + + container_ptr = (void *)0x1337c0d3; + hr = IDirect3DSurface8_GetContainer(surface_ptr, &IID_IDirect3DTexture8, &container_ptr); + ok(SUCCEEDED(hr) && container_ptr == texture_ptr, "GetContainer returned: hr %#x, container_ptr %p. " + "Expected hr %#x, container_ptr %p\n", hr, container_ptr, S_OK, texture_ptr); + if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); + + /* ...and this one shouldn't. This should return E_NOINTERFACE and set container_ptr to NULL */ + container_ptr = (void *)0x1337c0d3; + hr = IDirect3DSurface8_GetContainer(surface_ptr, &IID_IDirect3DSurface8, &container_ptr); + ok(hr == E_NOINTERFACE && container_ptr == NULL, "GetContainer returned: hr %#x, container_ptr %p. " + "Expected hr %#x, container_ptr %p\n", hr, container_ptr, E_NOINTERFACE, NULL); + if (container_ptr && container_ptr != (void *)0x1337c0d3) IUnknown_Release((IUnknown *)container_ptr); + +cleanup: + if (texture_ptr) IDirect3DTexture8_Release(texture_ptr); + if (surface_ptr) IDirect3DSurface8_Release(surface_ptr); +} + +START_TEST(surface) +{ + HMODULE d3d8_handle; + IDirect3DDevice8 *device_ptr; + + d3d8_handle = LoadLibraryA("d3d8.dll"); + if (!d3d8_handle) + { + trace("Could not load d3d8.dll, skipping tests\n"); + return; + } + + device_ptr = init_d3d8(d3d8_handle); + if (!device_ptr) return; + + test_surface_get_container(device_ptr); +}
1
0
0
0
Markus Amsler : d3d8: Fix wrong function name in FIXME.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: dd8682e9c5cadb5bc954801621c7b64a2a7bde7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd8682e9c5cadb5bc95480162…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Tue Oct 17 00:40:29 2006 +0200 d3d8: Fix wrong function name in FIXME. --- dlls/d3d8/device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 1532d99..67d3b8b 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -699,7 +699,7 @@ static HRESULT WINAPI IDirect3DDevice8 IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface); IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface); }else{ - FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); + FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed\n"); *ppZStencilSurface = NULL; }
1
0
0
0
Roderick Colenbrander : wgl: Move wglDeleteContext to gdi32.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 7eea8b93120417281ef1ba977bb8fe4d6efb4ab0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7eea8b93120417281ef1ba977…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Mon Oct 16 23:28:33 2006 +0200 wgl: Move wglDeleteContext to gdi32. --- dlls/gdi/driver.c | 1 + dlls/gdi/gdi_private.h | 1 + dlls/gdi/opengl.c | 25 +++++++++++++++++++++++++ dlls/opengl32/opengl32.spec | 2 +- dlls/opengl32/wgl.c | 11 ----------- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/dlls/gdi/driver.c b/dlls/gdi/driver.c index f5900e2..5b959e7 100644 --- a/dlls/gdi/driver.c +++ b/dlls/gdi/driver.c @@ -197,6 +197,7 @@ #define GET_FUNC(name) driver->funcs.p## /* OpenGL32 */ GET_FUNC(wglCreateContext); + GET_FUNC(wglDeleteContext); GET_FUNC(wglMakeCurrent); GET_FUNC(wglShareLists); GET_FUNC(wglUseFontBitmapsA); diff --git a/dlls/gdi/gdi_private.h b/dlls/gdi/gdi_private.h index ec3454c..725ed8c 100644 --- a/dlls/gdi/gdi_private.h +++ b/dlls/gdi/gdi_private.h @@ -185,6 +185,7 @@ typedef struct tagDC_FUNCS /* OpenGL32 */ HGLRC (*pwglCreateContext)(PHYSDEV); + BOOL (*pwglDeleteContext)(HGLRC); BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC); BOOL (*pwglShareLists)(HGLRC hglrc1, HGLRC hglrc2); BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD); diff --git a/dlls/gdi/opengl.c b/dlls/gdi/opengl.c index 375ff9b..6d97025 100644 --- a/dlls/gdi/opengl.c +++ b/dlls/gdi/opengl.c @@ -79,6 +79,31 @@ HGLRC WINAPI wglCreateContext(HDC hdc) return ret; } + +/*********************************************************************** + * wglDeleteContext (OPENGL32.@) + */ +BOOL WINAPI wglDeleteContext(HGLRC hglrc) +{ + DC *dc; + BOOL ret = FALSE; + OPENGL_Context ctx = (OPENGL_Context)hglrc; + + TRACE("hglrc: (%p)\n", hglrc); + if(ctx == NULL) + return FALSE; + + /* Retrieve the HDC associated with the context to access the display driver */ + dc = DC_GetDCPtr(ctx->hdc); + if (!dc) return FALSE; + + if (!dc->funcs->pwglDeleteContext) FIXME(" :stub\n"); + else ret = dc->funcs->pwglDeleteContext(hglrc); + + GDI_ReleaseObj(ctx->hdc); + return ret; +} + /*********************************************************************** * wglGetCurrentContext (OPENGL32.@) */ diff --git a/dlls/opengl32/opengl32.spec b/dlls/opengl32/opengl32.spec index a2cee0b..8b7b28a 100644 --- a/dlls/opengl32/opengl32.spec +++ b/dlls/opengl32/opengl32.spec @@ -378,7 +378,7 @@ @ stdcall wglCopyContext(long long long) @ stdcall wglCreateContext(long) gdi32.wglCreateContext @ stdcall wglCreateLayerContext(long long) -@ stdcall wglDeleteContext(long) +@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext @ stdcall wglDescribeLayerPlane(long long long long ptr) @ stdcall wglDescribePixelFormat(long long long ptr) gdi32.DescribePixelFormat @ stdcall wglGetCurrentContext() gdi32.wglGetCurrentContext diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index b4cecd2..3a4f549 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -47,7 +47,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl); WINE_DECLARE_DEBUG_CHANNEL(opengl); typedef struct wine_wgl_s { - BOOL WINAPI (*p_wglDeleteContext)(HGLRC hglrc); PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc); void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params); @@ -148,15 +147,6 @@ BOOL WINAPI wglCopyContext(HGLRC hglrcSr } /*********************************************************************** - * wglDeleteContext (OPENGL32.@) - */ -BOOL WINAPI wglDeleteContext(HGLRC hglrc) -{ - TRACE("(%p)\n", hglrc); - return wine_wgl.p_wglDeleteContext(hglrc); -} - -/*********************************************************************** * wglDescribeLayerPlane (OPENGL32.@) */ BOOL WINAPI wglDescribeLayerPlane(HDC hdc, @@ -622,7 +612,6 @@ static BOOL process_attach(void) wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" ); /* Load WGL function pointers from winex11.drv */ - wine_wgl.p_wglDeleteContext = (void *)GetProcAddress(mod, "wglDeleteContext"); wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod, "wglGetProcAddress"); /* Interal WGL function */
1
0
0
0
Eric Pouech : ntdll: Plug a memory leak.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 449e8557fdb451ea411c8006d2b38d1e3802b526 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=449e8557fdb451ea411c8006d…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Mon Oct 16 21:54:03 2006 +0200 ntdll: Plug a memory leak. --- dlls/ntdll/directory.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 29541af..45b38b8 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1698,7 +1698,10 @@ NTSTATUS wine_nt_to_unix_file_name( cons { /* creation fails with STATUS_ACCESS_DENIED for the root of the drive */ if (disposition == FILE_CREATE) + { + RtlFreeHeap( GetProcessHeap(), 0, unix_name ); return name_len ? STATUS_OBJECT_NAME_COLLISION : STATUS_ACCESS_DENIED; + } goto done; } }
1
0
0
0
Alexandre Julliard : configure: Don' t define _WIN64 on the command line to avoid trouble with system headers.
by Alexandre Julliard
17 Oct '06
17 Oct '06
Module: wine Branch: master Commit: 9abd8852ddb5c4b01174f8c07e3d21b1c99989df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9abd8852ddb5c4b01174f8c07…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 16 21:29:23 2006 +0200 configure: Don't define _WIN64 on the command line to avoid trouble with system headers. --- configure | 31 ------------------------------- configure.ac | 3 +-- include/msvcrt/direct.h | 4 ++++ include/msvcrt/malloc.h | 4 ++++ include/msvcrt/mbstring.h | 4 ++++ include/msvcrt/search.h | 4 ++++ include/msvcrt/stddef.h | 4 ++++ include/msvcrt/stdio.h | 4 ++++ include/msvcrt/string.h | 10 ++++++---- include/msvcrt/sys/types.h | 4 ++++ include/msvcrt/time.h | 4 ++++ include/msvcrt/wchar.h | 4 ++++ 12 files changed, 43 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 431e36b..adf498d 100755 --- a/configure +++ b/configure @@ -23497,37 +23497,6 @@ if test $ac_cv_cpp_def___x86_64__ = yes; CFLAGS="$CFLAGS -D__x86_64__" LINTFLAGS="$LINTFLAGS -D__x86_64__" fi - - { echo "$as_me:$LINENO: checking whether we need to define _WIN64" >&5 -echo $ECHO_N "checking whether we need to define _WIN64... $ECHO_C" >&6; } -if test "${ac_cv_cpp_def__WIN64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef _WIN64 -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - ac_cv_cpp_def__WIN64=yes -else - ac_cv_cpp_def__WIN64=no -fi -rm -f conftest* - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_cpp_def__WIN64" >&5 -echo "${ECHO_T}$ac_cv_cpp_def__WIN64" >&6; } -if test $ac_cv_cpp_def__WIN64 = yes; then - CFLAGS="$CFLAGS -D_WIN64" - LINTFLAGS="$LINTFLAGS -D_WIN64" -fi ;; *alpha*) { echo "$as_me:$LINENO: checking whether we need to define __ALPHA__" >&5 echo $ECHO_N "checking whether we need to define __ALPHA__... $ECHO_C" >&6; } diff --git a/configure.ac b/configure.ac index b9a5b24..5d43d53 100644 --- a/configure.ac +++ b/configure.ac @@ -1431,8 +1431,7 @@ dnl *** check for the need to define pla case $host_cpu in *i[[3456789]]86*) WINE_CHECK_DEFINE([__i386__]) ;; - *x86_64*) WINE_CHECK_DEFINE([__x86_64__]) - WINE_CHECK_DEFINE([_WIN64]) ;; + *x86_64*) WINE_CHECK_DEFINE([__x86_64__]) ;; *alpha*) WINE_CHECK_DEFINE([__ALPHA__]) ;; *sparc*) WINE_CHECK_DEFINE([__sparc__]) ;; *powerpc*) WINE_CHECK_DEFINE([__powerpc__]) ;; diff --git a/include/msvcrt/direct.h b/include/msvcrt/direct.h index bd05db9..167e7d7 100644 --- a/include/msvcrt/direct.h +++ b/include/msvcrt/direct.h @@ -26,6 +26,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index eff45e8..8f904b3 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h @@ -38,6 +38,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index f47a4c0..1da3213 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h @@ -27,6 +27,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/search.h b/include/msvcrt/search.h index c3a2e50..413b697 100644 --- a/include/msvcrt/search.h +++ b/include/msvcrt/search.h @@ -27,6 +27,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index d67b304..62bb850 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h @@ -23,6 +23,10 @@ #ifndef __WINE_USE_MSVCRT #define __WINE_USE_MSVCRT #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _WCHAR_T_DEFINED #define _WCHAR_T_DEFINED #ifndef __cplusplus diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index bc58de3..dfa983f 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -19,6 +19,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + /* file._flag flags */ #define _IOREAD 0x0001 #define _IOWRT 0x0002 diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index cc0b25e..bf3994f 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -18,10 +18,12 @@ typedef unsigned short wchar_t; #endif #endif -#ifndef _MSC_VER -# ifndef __int64 -# define __int64 long long -# endif +#if !defined(_MSC_VER) && !defined(__int64) +#define __int64 long long +#endif + +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 #endif #ifndef _SIZE_T_DEFINED diff --git a/include/msvcrt/sys/types.h b/include/msvcrt/sys/types.h index abb05a3..53d5c6b 100644 --- a/include/msvcrt/sys/types.h +++ b/include/msvcrt/sys/types.h @@ -27,6 +27,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; #define _DEV_T_DEFINED diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index b2caa03..0fbf1df 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -34,6 +34,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 81982e2..f07db62 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -39,6 +39,10 @@ #if !defined(_MSC_VER) && !defined(__int #define __int64 long long #endif +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + typedef int mbstate_t; #ifndef _SIZE_T_DEFINED
1
0
0
0
Mikołaj Zalewski : comctl32: rebar: Don' t return rectangles with negative width or height in NCCalcSize.
by Alexandre Julliard
16 Oct '06
16 Oct '06
Module: wine Branch: master Commit: 1b8c98d35da8894faaa33146db7e184fa110674b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1b8c98d35da8894faaa33146d…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Mon Oct 16 17:39:55 2006 +0200 comctl32: rebar: Don't return rectangles with negative width or height in NCCalcSize. --- dlls/comctl32/rebar.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index c627a3e..d2c8b94 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -4114,17 +4114,19 @@ inline static LRESULT REBAR_NCCalcSize (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { HTHEME theme; + RECT *rect = (RECT *)lParam; + if (infoPtr->dwStyle & WS_BORDER) { - InflateRect((LPRECT)lParam, -GetSystemMetrics(SM_CXEDGE), - -GetSystemMetrics(SM_CYEDGE)); + rect->left = min(rect->left + GetSystemMetrics(SM_CXEDGE), rect->right); + rect->right = max(rect->right - GetSystemMetrics(SM_CXEDGE), rect->left); + rect->top = min(rect->top + GetSystemMetrics(SM_CXEDGE), rect->bottom); + rect->bottom = max(rect->bottom - GetSystemMetrics(SM_CXEDGE), rect->top); } else if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { - ((LPRECT)lParam)->top++; + rect->top = min(rect->top + 1, rect->bottom); } - TRACE("new client=(%d,%d)-(%d,%d)\n", - ((LPRECT)lParam)->left, ((LPRECT)lParam)->top, - ((LPRECT)lParam)->right, ((LPRECT)lParam)->bottom); + TRACE("new client=(%d,%d)-(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom); return 0; }
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
104
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
Results per page:
10
25
50
100
200