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
July 2007
----- 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
957 discussions
Start a n
N
ew thread
James Hawkins : msi: Check for NULL transform, as there may be no transforms for the _Columns or _Tables tables.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: f0b97cb1e175eb82fc05821f5e72d9181f046989 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0b97cb1e175eb82fc05821f5…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jul 10 11:26:44 2007 -0700 msi: Check for NULL transform, as there may be no transforms for the _Columns or _Tables tables. --- dlls/msi/table.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 3fa8838..fb414a2 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1981,7 +1981,12 @@ static UINT msi_table_load_transform( MSIDATABASE *db, IStorage *stg, MSIRECORD *rec = NULL; UINT colcol = 0; WCHAR coltable[32]; - LPWSTR name = transform->name; + LPWSTR name; + + if (!transform) + return ERROR_SUCCESS; + + name = transform->name; coltable[0] = 0; TRACE("%p %p %p %s\n", db, stg, st, debugstr_w(name) );
1
0
0
0
Paul Vriens : gdiplus: Don't use struct member before NULL check (Coverity) .
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: a2406b8ca5c5d01bd70a8666ab6449a7a2730984 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2406b8ca5c5d01bd70a8666a…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Jul 10 19:39:57 2007 +0200 gdiplus: Don't use struct member before NULL check (Coverity). --- dlls/gdiplus/graphicspath.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 7c0e826..5df628d 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -66,7 +66,7 @@ static BOOL lengthen_path(GpPath *path, INT len) GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count) { - INT i, old_count = path->pathdata.Count; + INT i, old_count; if(!path || !points) return InvalidParameter; @@ -74,6 +74,8 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, if(!lengthen_path(path, count)) return OutOfMemory; + old_count = path->pathdata.Count; + for(i = 0; i < count; i++){ path->pathdata.Points[old_count + i].X = points[i].X; path->pathdata.Points[old_count + i].Y = points[i].Y;
1
0
0
0
Juan Lang : rsaenh: Get rid of the hash idle state, native doesn' t behave as though it has one.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: cd3954e7fdeda223b81524a1f41839af90408b31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd3954e7fdeda223b81524a1f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Jul 10 18:04:40 2007 -0700 rsaenh: Get rid of the hash idle state, native doesn't behave as though it has one. --- dlls/rsaenh/rsaenh.c | 11 +---------- dlls/rsaenh/tests/rsaenh.c | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 8f58d82..1ff1370 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -44,7 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); */ #define RSAENH_MAGIC_HASH 0x85938417u #define RSAENH_MAX_HASH_SIZE 104 -#define RSAENH_HASHSTATE_IDLE 0 #define RSAENH_HASHSTATE_HASHING 1 #define RSAENH_HASHSTATE_FINISHED 2 typedef struct _RSAENH_TLS1PRF_PARAMS @@ -1598,7 +1597,7 @@ BOOL WINAPI RSAENH_CPCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey, pCryptHash->aiAlgid = Algid; pCryptHash->hKey = hKey; pCryptHash->hProv = hProv; - pCryptHash->dwState = RSAENH_HASHSTATE_IDLE; + pCryptHash->dwState = RSAENH_HASHSTATE_HASHING; pCryptHash->pHMACInfo = (PHMAC_INFO)NULL; pCryptHash->dwHashSize = peaAlgidInfo->dwDefaultLen >> 3; init_data_blob(&pCryptHash->tpPRFParams.blobLabel); @@ -2629,11 +2628,6 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa return TRUE; } - if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) { - SetLastError(NTE_BAD_HASH_STATE); - return FALSE; - } - if (pbData && (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED)) { finalize_hash(pCryptHash); @@ -3290,9 +3284,6 @@ BOOL WINAPI RSAENH_CPHashData(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE *pb return FALSE; } - if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) - pCryptHash->dwState = RSAENH_HASHSTATE_HASHING; - if (pCryptHash->dwState != RSAENH_HASHSTATE_HASHING) { SetLastError(NTE_BAD_HASH_STATE); diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 53ec374..2a397e7 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -165,6 +165,9 @@ static void test_hashes(void) static const unsigned char md4hash[16] = { 0x8e, 0x2a, 0x58, 0xbf, 0xf2, 0xf5, 0x26, 0x23, 0x79, 0xd2, 0x92, 0x36, 0x1b, 0x23, 0xe3, 0x81 }; + static const unsigned char empty_md5hash[16] = { + 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, + 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e }; static const unsigned char md5hash[16] = { 0x15, 0x76, 0xa9, 0x4d, 0x6c, 0xb3, 0x34, 0xdd, 0x12, 0x6c, 0xb1, 0xc2, 0x7f, 0x19, 0xe0, 0xf2 }; @@ -227,13 +230,13 @@ static void test_hashes(void) result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); ok(result, "%08x\n", GetLastError()); - result = CryptHashData(hHash, (BYTE*)pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); - len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); ok(result && (hashlen == 16), "%08x, hashlen: %d\n", GetLastError(), hashlen); + result = CryptHashData(hHash, (BYTE*)pbData, sizeof(pbData), 0); + ok(result, "%08x\n", GetLastError()); + len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); ok(result, "%08x\n", GetLastError()); @@ -243,6 +246,36 @@ static void test_hashes(void) result = CryptDestroyHash(hHash); ok(result, "%08x\n", GetLastError()); + result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); + ok(result, "%08x\n", GetLastError()); + + /* The hash is available even if CryptHashData hasn't been called */ + len = 16; + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n"); + + /* It's also stable: getting it twice results in the same value */ + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n"); + + /* Can't add data after the hash been retrieved */ + SetLastError(0xdeadbeef); + result = CryptHashData(hHash, (BYTE*)pbData, sizeof(pbData), 0); + ok(!result && GetLastError() == NTE_BAD_HASH_STATE, "%08x\n", GetLastError()); + + /* You can still retrieve the hash, its value just hasn't changed */ + result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); + ok(result, "%08x\n", GetLastError()); + + ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n"); + + result = CryptDestroyHash(hHash); + ok(result, "%08x\n", GetLastError()); + /* SHA1 Hashing */ result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); ok(result, "%08x\n", GetLastError());
1
0
0
0
Detlef Riekenberg : ntdll: Avoid crash with WINEDEBUG=+snoop.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 8d051c81b2eaee29e433302109b80b321f9f6e68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d051c81b2eaee29e43330210…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Jul 10 21:52:42 2007 +0200 ntdll: Avoid crash with WINEDEBUG=+snoop. --- dlls/ntdll/relay.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 0b592ce..a50ec34 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -650,7 +650,7 @@ void SNOOP_SetupDLL(HMODULE hmod) if (!init_done) init_debug_lists(); exports = RtlImageDirectoryEntryToData( hmod, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size32 ); - if (!exports) return; + if (!exports || !exports->NumberOfFunctions) return; name = (char *)hmod + exports->Name; size = size32;
1
0
0
0
Chris Robinson : winemp3: Use head_check to check for valid headers.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 22e94d0ba6aaec37b899437dcfc8880c32b31fa3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22e94d0ba6aaec37b899437dc…
Author: Chris Robinson <chris.kcat(a)gmail.com> Date: Tue Jul 10 09:08:56 2007 -0700 winemp3: Use head_check to check for valid headers. --- dlls/winemp3.acm/common.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/winemp3.acm/common.c b/dlls/winemp3.acm/common.c index 4e28e2e..de329f1 100644 --- a/dlls/winemp3.acm/common.c +++ b/dlls/winemp3.acm/common.c @@ -53,7 +53,6 @@ int pcm_point = 0; #define HDRCMPMASK 0xfffffd00 -#if 0 int head_check(unsigned long head) { if( (head & 0xffe00000) != 0xffe00000) @@ -66,7 +65,6 @@ int head_check(unsigned long head) return FALSE; return TRUE; } -#endif /* @@ -75,6 +73,9 @@ int head_check(unsigned long head) */ int decode_header(struct frame *fr,unsigned long newhead) { + if(head_check(newhead) == FALSE) + return (0); + if( newhead & (1<<20) ) { fr->lsf = (newhead & (1<<19)) ? 0x0 : 0x1; fr->mpeg25 = 0; @@ -85,10 +86,6 @@ int decode_header(struct frame *fr,unsigned long newhead) } fr->lay = 4-((newhead>>17)&3); - if( ((newhead>>10)&0x3) == 0x3) { - fprintf(stderr,"Stream error\n"); - return (0); - } if(fr->mpeg25) { fr->sampling_frequency = 6 + ((newhead>>10)&0x3); }
1
0
0
0
Chris Robinson : winemp3: Check the right macro when defining TRUE.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 23d3302e381d0e6b6d06d929cf0fa5aa3ea74db1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23d3302e381d0e6b6d06d929c…
Author: Chris Robinson <chris.kcat(a)gmail.com> Date: Tue Jul 10 09:05:38 2007 -0700 winemp3: Check the right macro when defining TRUE. --- dlls/winemp3.acm/mpg123.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winemp3.acm/mpg123.h b/dlls/winemp3.acm/mpg123.h index 23f1a66..b397641 100644 --- a/dlls/winemp3.acm/mpg123.h +++ b/dlls/winemp3.acm/mpg123.h @@ -61,7 +61,7 @@ #ifndef FALSE #define FALSE 0 #endif -#ifndef FALSE +#ifndef TRUE #define TRUE 1 #endif
1
0
0
0
Anatoly Lyutin : cmd: Use toupperW instead of toupper.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 24866e7906e8af3c945b9a519da3300526f123be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24866e7906e8af3c945b9a519…
Author: Anatoly Lyutin <vostok(a)etersoft.ru> Date: Mon Jul 9 12:27:50 2007 +0400 cmd: Use toupperW instead of toupper. --- programs/cmd/builtins.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 33e96c1..af58717 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2303,7 +2303,7 @@ BOOL WCMD_ask_confirm (WCHAR *message, BOOL showSureText, BOOL *optionAll) { WCMD_output_asis (endBkt); WCMD_ReadFile (GetStdHandle(STD_INPUT_HANDLE), answer, sizeof(answer)/sizeof(WCHAR), &count, NULL); - answer[0] = toupper(answer[0]); + answer[0] = toupperW(answer[0]); } /* Return the answer */
1
0
0
0
Paul Vriens : advapi32: Create specific access rights for service control manager handles.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 14ab7d766fbb086c7d898d67f2b587137b5dfcb9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14ab7d766fbb086c7d898d67f…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Jul 10 16:31:10 2007 +0200 advapi32: Create specific access rights for service control manager handles. --- dlls/advapi32/service.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 9fc351f..7bded19 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -45,6 +45,13 @@ static const WCHAR szServiceManagerKey[] = { 'S','y','s','t','e','m','\\', static const WCHAR szSCMLock[] = {'A','D','V','A','P','I','_','S','C','M', 'L','O','C','K',0}; +static const GENERIC_MAPPING scm_generic = { + (STANDARD_RIGHTS_READ | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_QUERY_LOCK_STATUS), + (STANDARD_RIGHTS_WRITE | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_MODIFY_BOOT_CONFIG), + (STANDARD_RIGHTS_EXECUTE | SC_MANAGER_CONNECT | SC_MANAGER_LOCK), + SC_MANAGER_ALL_ACCESS +}; + typedef struct service_start_info_t { DWORD cmd; @@ -1041,6 +1048,7 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, struct sc_manager *manager; HKEY hReg; LONG r; + DWORD new_mask = dwDesiredAccess; TRACE("(%s,%s,0x%08x)\n", debugstr_w(lpMachineName), debugstr_w(lpDatabaseName), dwDesiredAccess); @@ -1077,8 +1085,9 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, if (r!=ERROR_SUCCESS) goto error; - manager->dwAccess = dwDesiredAccess; - TRACE("returning %p\n", manager); + RtlMapGenericMask(&new_mask, &scm_generic); + manager->dwAccess = new_mask; + TRACE("returning %p (access : 0x%08x)\n", manager, manager->dwAccess); return (SC_HANDLE) &manager->hdr;
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: We should send TBN_GETDISPINFOW even for ANSI controls (with testcase).
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: 5507a073c5e1be9101440c110d2d1e7092a4d293 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5507a073c5e1be9101440c110…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue Jul 10 15:53:38 2007 +0200 comctl32: toolbar: We should send TBN_GETDISPINFOW even for ANSI controls (with testcase). --- dlls/comctl32/tests/toolbar.c | 21 ++++++++++++++++++++- dlls/comctl32/toolbar.c | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 443e3eb..f5476d3 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -74,6 +74,9 @@ static LRESULT MyWnd_Notify(LPARAM lParam) break; case TBN_GETDISPINFOA: + ok(FALSE, "TBN_GETDISPINFOA received\n"); + break; + case TBN_GETDISPINFOW: nmdisp = (NMTBDISPINFOA *)lParam; @@ -992,14 +995,30 @@ static void test_dispinfo(void) {-1, 20, TBSTATE_ENABLED, 0, {0, }, 0, -1}, {0, 21, TBSTATE_ENABLED, 0, {0, }, 0, -1}, }; + BOOL ret; rebuild_toolbar(&hToolbar); SendMessageA(hToolbar, TB_LOADIMAGES, IDB_HIST_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons_disp); g_dwExpectedDispInfoMask = 1; - /* some TBN_GETDISPINFO tests will be done in MyWnd_Notify function */ + /* Some TBN_GETDISPINFO tests will be done in MyWnd_Notify function. + * We will receive TBN_GETDISPINFOW even if the control is ANSI */ + compare((BOOL)SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), 0, "%d"); ShowWindow(hToolbar, SW_SHOW); UpdateWindow(hToolbar); + + ret = (BOOL)SendMessageA(hToolbar, CCM_SETUNICODEFORMAT, TRUE, 0); + compare(ret, FALSE, "%d"); + compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), 1L, "%ld"); + InvalidateRect(hToolbar, NULL, FALSE); + UpdateWindow(hToolbar); + + ret = (BOOL)SendMessageA(hToolbar, CCM_SETUNICODEFORMAT, FALSE, 0); + compare(ret, TRUE, "%d"); + compare(SendMessageA(hToolbar, CCM_GETUNICODEFORMAT, 0, 0), 0L, "%ld"); + InvalidateRect(hToolbar, NULL, FALSE); + UpdateWindow(hToolbar); + DestroyWindow(hToolbar); g_dwExpectedDispInfoMask = 0; } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index ec7b99d..da6ceab 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -360,15 +360,15 @@ TOOLBAR_GetBitmapIndex(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr) if (ret == I_IMAGECALLBACK) { /* issue TBN_GETDISPINFO */ - NMTBDISPINFOA nmgd; + NMTBDISPINFOW nmgd; memset(&nmgd, 0, sizeof(nmgd)); nmgd.idCommand = btnPtr->idCommand; nmgd.lParam = btnPtr->dwData; nmgd.dwMask = TBNF_IMAGE; nmgd.iImage = -1; - TOOLBAR_SendNotify(&nmgd.hdr, infoPtr, - infoPtr->bUnicode ? TBN_GETDISPINFOW : TBN_GETDISPINFOA); + /* Windows also send TBN_GETDISPINFOW even if the control is ANSI */ + TOOLBAR_SendNotify(&nmgd.hdr, infoPtr, TBN_GETDISPINFOW); if (nmgd.dwMask & TBNF_DI_SETITEM) btnPtr->iBitmap = nmgd.iImage; ret = nmgd.iImage;
1
0
0
0
Mikołaj Zalewski : comctl32: toolbar: The iImage in TBN_GETDISPINFO should be initialized to -1.
by Alexandre Julliard
11 Jul '07
11 Jul '07
Module: wine Branch: master Commit: e66523e19bf17f4b12852ce6d8168a21159fb139 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e66523e19bf17f4b12852ce6d…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue Jul 10 15:23:05 2007 +0200 comctl32: toolbar: The iImage in TBN_GETDISPINFO should be initialized to -1. --- dlls/comctl32/tests/toolbar.c | 31 +++++++++++++++++++++++++++++++ dlls/comctl32/toolbar.c | 1 + 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 89e25a2..443e3eb 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -38,6 +38,7 @@ static BOOL g_fBlockHotItemChange; static BOOL g_fReceivedHotItemChange; static BOOL g_fExpectedHotItemOld; static BOOL g_fExpectedHotItemNew; +static DWORD g_dwExpectedDispInfoMask; #define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \ val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \ @@ -57,6 +58,7 @@ static LRESULT MyWnd_Notify(LPARAM lParam) { NMHDR *hdr = (NMHDR *)lParam; NMTBHOTITEM *nmhi; + NMTBDISPINFO *nmdisp; switch (hdr->code) { case TBN_HOTITEMCHANGE: @@ -70,6 +72,15 @@ static LRESULT MyWnd_Notify(LPARAM lParam) if (g_fBlockHotItemChange) return 1; break; + + case TBN_GETDISPINFOA: + case TBN_GETDISPINFOW: + nmdisp = (NMTBDISPINFOA *)lParam; + + compare(nmdisp->dwMask, g_dwExpectedDispInfoMask, "%x"); + compare(nmdisp->iImage, -1, "%d"); + ok(nmdisp->pszText == NULL, "pszText is not NULL\n"); + break; } return 0; } @@ -974,6 +985,25 @@ static void test_createtoolbarex() DestroyWindow(hToolbar); } +static void test_dispinfo(void) +{ + HWND hToolbar = NULL; + const TBBUTTON buttons_disp[] = { + {-1, 20, TBSTATE_ENABLED, 0, {0, }, 0, -1}, + {0, 21, TBSTATE_ENABLED, 0, {0, }, 0, -1}, + }; + + rebuild_toolbar(&hToolbar); + SendMessageA(hToolbar, TB_LOADIMAGES, IDB_HIST_SMALL_COLOR, (LPARAM)HINST_COMMCTRL); + SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons_disp); + g_dwExpectedDispInfoMask = 1; + /* some TBN_GETDISPINFO tests will be done in MyWnd_Notify function */ + ShowWindow(hToolbar, SW_SHOW); + UpdateWindow(hToolbar); + DestroyWindow(hToolbar); + g_dwExpectedDispInfoMask = 0; +} + START_TEST(toolbar) { @@ -1007,6 +1037,7 @@ START_TEST(toolbar) test_sizes(); test_getbuttoninfo(); test_createtoolbarex(); + test_dispinfo(); PostQuitMessage(0); while(GetMessageA(&msg,0,0,0)) { diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 4b1e552..ec7b99d 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -366,6 +366,7 @@ TOOLBAR_GetBitmapIndex(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr) nmgd.idCommand = btnPtr->idCommand; nmgd.lParam = btnPtr->dwData; nmgd.dwMask = TBNF_IMAGE; + nmgd.iImage = -1; TOOLBAR_SendNotify(&nmgd.hdr, infoPtr, infoPtr->bUnicode ? TBN_GETDISPINFOW : TBN_GETDISPINFOA); if (nmgd.dwMask & TBNF_DI_SETITEM)
1
0
0
0
← Newer
1
...
68
69
70
71
72
73
74
...
96
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
Results per page:
10
25
50
100
200