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
December 2010
----- 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
2 participants
1099 discussions
Start a n
N
ew thread
Gerald Pfeifer : user32: Fix error handling in BITMAP_Load.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 1ee3e39658fcbd5fdb3626677e53b95146dad106 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ee3e39658fcbd5fdb3626677…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sun Sep 19 16:10:39 2010 +0200 user32: Fix error handling in BITMAP_Load. (cherry picked from commit 824ab969ff1c5e0e3706d37855f4652244e295d9) --- dlls/user32/cursoricon.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 938f0dd..acae302 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -366,7 +366,7 @@ static BOOL is_dib_monochrome( const BITMAPINFO* info ) * DIB_GetBitmapInfo * * Get the info from a bitmap header. - * Return 1 for INFOHEADER, 0 for COREHEADER, + * Return 1 for INFOHEADER, 0 for COREHEADER, -1 in case of failure. */ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width, LONG *height, WORD *bpp, DWORD *compr ) @@ -2257,6 +2257,12 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, memcpy(scaled_info, fix_info, size); bm_type = DIB_GetBitmapInfo( &fix_info->bmiHeader, &width, &height, &bpp_dummy, &compr_dummy); + if (bm_type == -1) + { + WARN("Invalid bitmap format!\n"); + goto end_close; + } + if(desiredx != 0) new_width = desiredx; else
1
0
0
0
Wolfram Sang : user32: Check for valid pointer in CreateIconFromResource.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 25520c19f7ceb1c12cf6e2aca235cd0e8eeb9ac0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25520c19f7ceb1c12cf6e2aca…
Author: Wolfram Sang <wolfram(a)the-dreams.de> Date: Wed Aug 4 16:05:00 2010 +0200 user32: Check for valid pointer in CreateIconFromResource. (cherry picked from commit 9f0f17f8535879ed4807226062310e0858207026) --- dlls/user32/cursoricon.c | 5 +++-- dlls/user32/tests/cursoricon.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 9a1810e..938f0dd 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1064,8 +1064,6 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size, TRACE("bits %p, bits_size %d\n", bits, bits_size); - if (!bits) return 0; - riff_find_chunk( ANI_ACON_ID, ANI_RIFF_ID, &root_chunk, &ACON_chunk ); if (!ACON_chunk.data) { @@ -1104,6 +1102,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size, width, height, depth ); frame_bits = HeapAlloc( GetProcessHeap(), 0, entry->dwDIBSize ); + if (!frame_bits) return 0; memcpy( frame_bits, icon_data + entry->dwDIBOffset, entry->dwDIBSize ); if (!header.width || !header.height) @@ -1142,6 +1141,8 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize, bits, cbSize, dwVersion, width, height, bIcon ? "icon" : "cursor", (cFlag & LR_MONOCHROME) ? "mono" : "" ); + if (!bits) return 0; + if (bIcon) { hotspot.x = width / 2; diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index b2e1d84..e81e76d 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1005,6 +1005,11 @@ static void test_CreateIconFromResource(void) error = GetLastError(); ok(error == 0xdeadbeef, "Last error: %u\n", error); + /* Rejection of NULL pointer crashes at least on WNT4WSSP6, W2KPROSP4, WXPPROSP3 + * + * handle = CreateIconFromResource(NULL, ICON_RES_SIZE, TRUE, 0x00030000); + * ok(handle == NULL, "Invalid pointer accepted (%p)\n", handle); + */ HeapFree(GetProcessHeap(), 0, hotspot); }
1
0
0
0
Andrew Eikum : hlink: Implement HLINKGETREF flags handling.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 5c924530daec6095864e87f64ea0c8984b531fca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c924530daec6095864e87f64…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Aug 16 13:55:14 2010 -0500 hlink: Implement HLINKGETREF flags handling. (cherry picked from commit cb5eb331590c96c26ab50cfe9ae96692dfcca34f) --- dlls/hlink/link.c | 101 ++++++++++++----- dlls/hlink/tests/hlink.c | 272 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 334 insertions(+), 39 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5c924530daec6095864e8…
1
0
0
0
Hans Leidekker : advapi32: Fix a buffer size query in LsaLookupSids.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: 11d86f08dd12a565710be6b46622cac99ac5935b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11d86f08dd12a565710be6b46…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 6 15:45:30 2010 +0200 advapi32: Fix a buffer size query in LsaLookupSids. (cherry picked from commit ee18ead5457761c2a330d0005bb5bf1b8711ca80) --- dlls/advapi32/lsa.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c index e12e312..863ddb2 100644 --- a/dlls/advapi32/lsa.c +++ b/dlls/advapi32/lsa.c @@ -483,7 +483,9 @@ NTSTATUS WINAPI LsaLookupSids( (*Names)[i].Name.Length = 0; (*Names)[i].Name.MaximumLength = 0; (*Names)[i].Name.Buffer = NULL; - if (LookupAccountSidW(NULL, Sids[i], NULL, &name_size, NULL, &domain_size, &use)) + + if (!LookupAccountSidW(NULL, Sids[i], NULL, &name_size, NULL, &domain_size, &use) && + GetLastError() == ERROR_INSUFFICIENT_BUFFER) { LSA_UNICODE_STRING domain; @@ -502,11 +504,11 @@ NTSTATUS WINAPI LsaLookupSids( domain.Buffer = NULL; } - (*Names)[i].Use = use; (*Names)[i].Name.Length = (name_size - 1) * sizeof(WCHAR); (*Names)[i].Name.MaximumLength = name_size * sizeof(WCHAR); - (*Names)[i].Name.Buffer = HeapAlloc(GetProcessHeap(),0,name_size * sizeof(WCHAR)); + (*Names)[i].Name.Buffer = HeapAlloc(GetProcessHeap(), 0, name_size * sizeof(WCHAR)); LookupAccountSidW(NULL, Sids[i], (*Names)[i].Name.Buffer, &name_size, domain.Buffer, &domain_size, &use); + (*Names)[i].Use = use; if (domain_size) (*Names)[i].DomainIndex = build_domain(*ReferencedDomains, &domain);
1
0
0
0
Hans Leidekker : advapi32: Fix handling of zero account and domain size parameters in LookupAccountSid .
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: stable Commit: ad1883d251a0a0357941db688d1577d9d93ba77e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad1883d251a0a0357941db688…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 21 12:54:50 2010 +0200 advapi32: Fix handling of zero account and domain size parameters in LookupAccountSid. (cherry picked from commit 0cffcb77d6e624bcc7567ebcfaecb0ef730e7a7e) --- dlls/advapi32/security.c | 15 ++++++++++++--- dlls/advapi32/tests/security.c | 12 +++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 821fb86..2d0ed48 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -2069,6 +2069,11 @@ LookupAccountSidA( } else *domainSize = domainSizeW + 1; } + else + { + *accountSize = accountSizeW + 1; + *domainSize = domainSizeW + 1; + } HeapFree( GetProcessHeap(), 0, systemW ); HeapFree( GetProcessHeap(), 0, accountW ); @@ -2225,8 +2230,11 @@ LookupAccountSidW( if (domain) lstrcpyW(domain, dm); } - if (((*accountSize != 0) && (*accountSize < ac_len)) || - ((*domainSize != 0) && (*domainSize < dm_len))) { + if ((*accountSize && *accountSize < ac_len) || + (!account && !*accountSize && ac_len) || + (*domainSize && *domainSize < dm_len) || + (!domain && !*domainSize && dm_len)) + { SetLastError(ERROR_INSUFFICIENT_BUFFER); status = FALSE; } @@ -2238,9 +2246,10 @@ LookupAccountSidW( *accountSize = ac_len; else *accountSize = ac_len + 1; - *name_use = use; + HeapFree(GetProcessHeap(), 0, account_name); HeapFree(GetProcessHeap(), 0, computer_name); + if (status) *name_use = use; return status; } diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index cd4624a..c9408ad 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1505,7 +1505,7 @@ static void test_LookupAccountSid(void) PSID pUsersSid = NULL; SID_NAME_USE use; BOOL ret; - DWORD size,cbti = 0; + DWORD error, size, cbti = 0; MAX_SID max_sid; CHAR *str_sidA; int i; @@ -1667,6 +1667,16 @@ static void test_LookupAccountSid(void) "LookupAccountSidW() Expected dom_size = %u, got %u\n", real_dom_sizeW + 1, dom_sizeW); + acc_sizeW = dom_sizeW = use = 0; + SetLastError(0xdeadbeef); + ret = LookupAccountSidW(NULL, pUsersSid, NULL, &acc_sizeW, NULL, &dom_sizeW, &use); + error = GetLastError(); + ok(!ret, "LookupAccountSidW failed %u\n", GetLastError()); + ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); + ok(acc_sizeW, "expected non-zero account size\n"); + ok(dom_sizeW, "expected non-zero domain size\n"); + ok(!use, "expected zero use %u\n", use); + FreeSid(pUsersSid); /* Test LookupAccountSid with Sid retrieved from token information.
1
0
0
0
Wolfram Sang : winex11.drv: In GetDIBits() with DIB sections, always use dibpitch from the target.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: master Commit: 27d2b9b81490ca41c23ac3ad1fe057a8d8f44aea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27d2b9b81490ca41c23ac3ad1…
Author: Wolfram Sang <wolfram(a)the-dreams.de> Date: Wed Dec 1 18:10:49 2010 +0100 winex11.drv: In GetDIBits() with DIB sections, always use dibpitch from the target. --- dlls/gdi32/tests/bitmap.c | 15 +++++++++++++-- dlls/winex11.drv/dib.c | 3 +-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index aa723bd..d0d7a9c 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -1218,7 +1218,8 @@ static void test_GetDIBits_selected_DIB(UINT bpp) BITMAPINFO * info2; void * bits; void * bits2; - UINT dib_size; + UINT dib_size, dib32_size; + DWORD pixel; HDC dib_dc, dc; HBITMAP old_bmp; BOOL equalContents; @@ -1254,6 +1255,7 @@ static void test_GetDIBits_selected_DIB(UINT bpp) dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); assert(dib); dib_size = bpp * (info->bmiHeader.biWidth * info->bmiHeader.biHeight) / 8; + dib32_size = 32 * (info->bmiHeader.biWidth * info->bmiHeader.biHeight) / 8; /* Set the bits of the DIB section */ for (i=0; i < dib_size; i++) @@ -1265,7 +1267,7 @@ static void test_GetDIBits_selected_DIB(UINT bpp) dib_dc = CreateCompatibleDC(NULL); old_bmp = SelectObject(dib_dc, dib); dc = CreateCompatibleDC(NULL); - bits2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dib_size); + bits2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dib32_size); assert(bits2); /* Copy the DIB attributes but not the color table */ @@ -1300,6 +1302,15 @@ static void test_GetDIBits_selected_DIB(UINT bpp) } ok(equalContents, "GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits\n",bpp); + /* Map into a 32bit-DIB */ + info2->bmiHeader.biBitCount = 32; + res = GetDIBits(dc, dib, 0, info->bmiHeader.biHeight, bits2, info2, DIB_RGB_COLORS); + ok(res, "GetDIBits failed\n"); + + /* Check if last pixel was set */ + pixel = ((DWORD *)bits2)[info->bmiHeader.biWidth * info->bmiHeader.biHeight - 1]; + ok(pixel != 0, "Pixel: 0x%08x\n", pixel); + HeapFree(GetProcessHeap(), 0, bits2); DeleteDC(dc); diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 11157f1..05bd30c 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -4210,8 +4210,7 @@ INT CDECL X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start descr.ySrc = startscan; } descr.shm_mode = physBitmap->shm_mode; - descr.dibpitch = (obj_size == sizeof(DIBSECTION)) ? dib.dsBm.bmWidthBytes - : (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8); + descr.dibpitch = (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8); X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod ); X11DRV_DIB_GetImageBits( &descr );
1
0
0
0
Aric Stewart : secur32/tests: Skip test on failure to acquire cred_handle.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: master Commit: fe05a73042edb378e47e1be3b1f7817a00e64031 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe05a73042edb378e47e1be3b…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Dec 1 20:28:50 2010 -0600 secur32/tests: Skip test on failure to acquire cred_handle. --- dlls/secur32/tests/schannel.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index c35c2dd..18a5c1e 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -625,6 +625,7 @@ static void test_communication(void) status = pAcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); + if (status != SEC_E_OK) return; /* Initialize the connection */ init_buffers(&buffers[0], 4, buf_size);
1
0
0
0
Andrew Bogott : shdocvw: Add the IPropertySet interface to an internet shortcut, and partially implement it.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: master Commit: cc34ca4c5122b47a4d528e5a79352195f8666adb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc34ca4c5122b47a4d528e5a7…
Author: Andrew Bogott <andrew(a)CodeWeavers.com> Date: Fri Nov 19 21:54:26 2010 -0600 shdocvw: Add the IPropertySet interface to an internet shortcut, and partially implement it. --- dlls/shdocvw/intshcut.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 111 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/intshcut.c b/dlls/shdocvw/intshcut.c index a5ad1b7..8f55a20 100644 --- a/dlls/shdocvw/intshcut.c +++ b/dlls/shdocvw/intshcut.c @@ -46,9 +46,11 @@ typedef struct IUniformResourceLocatorA uniformResourceLocatorA; IUniformResourceLocatorW uniformResourceLocatorW; IPersistFile persistFile; + IPropertySetStorage IPropertySetStorage_iface; LONG refCount; + IPropertySetStorage *property_set_storage; WCHAR *url; BOOLEAN isDirty; LPOLESTR currentFile; @@ -71,6 +73,11 @@ static inline InternetShortcut* impl_from_IPersistFile(IPersistFile *iface) return CONTAINING_RECORD(iface, InternetShortcut, persistFile); } +static inline InternetShortcut* impl_from_IPropertySetStorage(IPropertySetStorage *iface) +{ + return (InternetShortcut*)((char*)iface - FIELD_OFFSET(InternetShortcut, IPropertySetStorage_iface)); +} + static BOOL run_winemenubuilder( const WCHAR *args ) { static const WCHAR menubuilder[] = {'\\','w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',0}; @@ -145,6 +152,8 @@ static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject = &This->uniformResourceLocatorW; else if (IsEqualGUID(&IID_IPersistFile, riid)) *ppvObject = &This->persistFile; + else if (IsEqualGUID(&IID_IPropertySetStorage, riid)) + *ppvObject = &This->IPropertySetStorage_iface; else if (IsEqualGUID(&IID_IShellLinkA, riid)) { FIXME("The IShellLinkA interface is not yet supported by InternetShortcut\n"); @@ -179,6 +188,7 @@ static ULONG Unknown_Release(InternetShortcut *This) { CoTaskMemFree(This->url); CoTaskMemFree(This->currentFile); + IPropertySetStorage_Release(This->property_set_storage); heap_free(This); SHDOCVW_UnlockModule(); } @@ -537,8 +547,78 @@ static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppsz return hr; } +static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%p)\n", iface); + return Unknown_QueryInterface(This, riid, ppvObject); +} + +static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%p)\n", iface); + return Unknown_AddRef(This); +} + +static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%p)\n", iface); + return Unknown_Release(This); +} + +static HRESULT WINAPI PropertySetStorage_Create( + IPropertySetStorage* iface, + REFFMTID rfmtid, + const CLSID *pclsid, + DWORD grfFlags, + DWORD grfMode, + IPropertyStorage **ppprstg) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%s, %p, 0x%x, 0x%x, %p)\n", debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg); + + return IPropertySetStorage_Create(This->property_set_storage, + rfmtid, + pclsid, + grfFlags, + grfMode, + ppprstg); +} + +static HRESULT WINAPI PropertySetStorage_Open( + IPropertySetStorage* iface, + REFFMTID rfmtid, + DWORD grfMode, + IPropertyStorage **ppprstg) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%s, 0x%x, %p)\n", debugstr_guid(rfmtid), grfMode, ppprstg); + + /* Note: The |STGM_SHARE_EXCLUSIVE is to cope with a bug in the implementation. Should be fixed in ole32. */ + return IPropertySetStorage_Open(This->property_set_storage, + rfmtid, + grfMode|STGM_SHARE_EXCLUSIVE, + ppprstg); +} + +static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid) +{ + InternetShortcut *This = impl_from_IPropertySetStorage(iface); + TRACE("(%s)\n", debugstr_guid(rfmtid)); + return IPropertySetStorage_Delete(This->property_set_storage, + rfmtid); +} + +static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum) +{ + FIXME("(%p): stub\n", ppenum); + return E_NOTIMPL; +} + static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl = { UniformResourceLocatorW_QueryInterface, UniformResourceLocatorW_AddRef, @@ -569,6 +649,16 @@ static const IPersistFileVtbl persistFileVtbl = { PersistFile_GetCurFile }; +static const IPropertySetStorageVtbl propertySetStorageVtbl = { + PropertySetStorage_QueryInterface, + PropertySetStorage_AddRef, + PropertySetStorage_Release, + PropertySetStorage_Create, + PropertySetStorage_Open, + PropertySetStorage_Delete, + PropertySetStorage_Enum +}; + static InternetShortcut *create_shortcut(void) { InternetShortcut *newshortcut; @@ -576,10 +666,31 @@ static InternetShortcut *create_shortcut(void) newshortcut = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(InternetShortcut)); if (newshortcut) { + HRESULT hr; + IPropertyStorage *dummy; + newshortcut->uniformResourceLocatorA.lpVtbl = &uniformResourceLocatorAVtbl; newshortcut->uniformResourceLocatorW.lpVtbl = &uniformResourceLocatorWVtbl; newshortcut->persistFile.lpVtbl = &persistFileVtbl; + newshortcut->IPropertySetStorage_iface.lpVtbl = &propertySetStorageVtbl; newshortcut->refCount = 0; + hr = StgCreateStorageEx(NULL, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, STGFMT_STORAGE, 0, NULL, NULL, &IID_IPropertySetStorage, (void **) &newshortcut->property_set_storage); + if FAILED(hr) + { + TRACE("Failed to create the storage object needed for the shortcut.\n"); + heap_free(newshortcut); + return NULL; + } + + hr = IPropertySetStorage_Create(newshortcut->property_set_storage, &FMTID_Intshcut, NULL, PROPSETFLAG_DEFAULT, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &dummy); + if FAILED(hr) + { + TRACE("Failed to create the property object needed for the shortcut.\n"); + IPropertySetStorage_Release(newshortcut->property_set_storage); + heap_free(newshortcut); + return NULL; + } + IPropertySetStorage_Release(dummy); } return newshortcut;
1
0
0
0
Andrew Bogott : shdocvw: Test read/ write of a couple of properties on IUniformResourceLocator.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: master Commit: f471883ade5bbb5ca1443a5fc7d451062f96595e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f471883ade5bbb5ca1443a5fc…
Author: Andrew Bogott <andrew(a)CodeWeavers.com> Date: Wed Nov 10 23:55:48 2010 -0600 shdocvw: Test read/write of a couple of properties on IUniformResourceLocator. --- dlls/shdocvw/tests/intshcut.c | 58 +++++++++++++++++++++++++++++++++++++++++ include/shlobj.h | 17 ++++++++++++ 2 files changed, 75 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index af34614..4cf289d 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -173,6 +173,63 @@ static BOOL check_ie(void) return TRUE; } +static void test_ReadAndWriteProperties(void) +{ + HRESULT hr; + IUniformResourceLocatorA *urlA; + IPropertySetStorage *pPropSetStg; + + hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); + if (hr == S_OK) + { + WCHAR iconPath[] = {'f','i','l','e',':','/','/','/','C',':','/','a','r','b','i','t','r','a','r','y','/','i','c','o','n','/','p','a','t','h',0}; + int iconIndex = 7; + IPropertyStorage *pPropStgWrite; + IPropertyStorage *pPropStgRead; + PROPSPEC ps[2]; + PROPVARIANT pv[2]; + PROPVARIANT pvread[2]; + ps[0].ulKind = PRSPEC_PROPID; + ps[0].propid = PID_IS_ICONFILE; + ps[1].ulKind = PRSPEC_PROPID; + ps[1].propid = PID_IS_ICONINDEX; + pv[0].vt = VT_LPWSTR; + pv[0].pwszVal = (void *) iconPath; + pv[1].vt = VT_I4; + pv[1].iVal = iconIndex; + + hr = urlA->lpVtbl->QueryInterface(urlA, &IID_IPropertySetStorage, (void **) &pPropSetStg); + ok(hr == S_OK, "Unable to get an IPropertySetStorage, hr=0x%x\n", hr); + + hr = IPropertySetStorage_Open(pPropSetStg, &FMTID_Intshcut, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &pPropStgWrite); + ok(hr == S_OK, "Unable to get an IPropertyStorage for writing, hr=0x%x\n", hr); + + hr = IPropertyStorage_WriteMultiple(pPropStgWrite, 2, ps, pv, 0); + ok(hr == S_OK, "Unable to set properties, hr=0x%x\n", hr); + + hr = IPropertyStorage_Commit(pPropStgWrite, STGC_DEFAULT); + ok(hr == S_OK, "Failed to commit properties, hr=0x%x\n", hr); + + pPropStgWrite->lpVtbl->Release(pPropStgWrite); + + hr = IPropertySetStorage_Open(pPropSetStg, &FMTID_Intshcut, STGM_READ | STGM_SHARE_EXCLUSIVE, &pPropStgRead); + ok(hr == S_OK, "Unable to get an IPropertyStorage for reading, hr=0x%x\n", hr); + + hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread); + ok(hr == S_OK, "Unable to read properties, hr=0x%x\n", hr); + + ok(pvread[1].iVal == iconIndex, "Read wrong icon index: %d\n", pvread[1].iVal); + + ok(lstrcmpW(pvread[0].pwszVal, iconPath) == 0, "Wrong icon path read: %s\n",wine_dbgstr_w(pvread[0].pwszVal)); + + IPropertyStorage_Release(pPropStgRead); + IPropertySetStorage_Release(pPropSetStg); + urlA->lpVtbl->Release(urlA); + } + else + skip("could not create a CLSID_InternetShortcut for property tests, hr=0x%x\n", hr); +} + static void test_NullURLs(void) { HRESULT hr; @@ -231,6 +288,7 @@ static void test_InternetShortcut(void) test_QueryInterface(); test_NullURLs(); test_SetURLFlags(); + test_ReadAndWriteProperties(); } } diff --git a/include/shlobj.h b/include/shlobj.h index f3aa3b6..aab93fc 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -1661,6 +1661,23 @@ BOOL WINAPI DAD_DragLeave(void); BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT); HRESULT WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD); +/**************************************************************************** + * Internet shortcut properties + */ + +#define PID_IS_URL 2 +#define PID_IS_NAME 4 +#define PID_IS_WORKINGDIR 5 +#define PID_IS_HOTKEY 6 +#define PID_IS_SHOWCMD 7 +#define PID_IS_ICONINDEX 8 +#define PID_IS_ICONFILE 9 +#define PID_IS_WHATSNEW 10 +#define PID_IS_AUTHOR 11 +#define PID_IS_DESCRIPTION 12 +#define PID_IS_COMMENT 13 + + LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL); LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST); LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
1
0
0
0
Andrew Bogott : shdocvw: Skip some tests if a modern IE is not present.
by Alexandre Julliard
02 Dec '10
02 Dec '10
Module: wine Branch: master Commit: 1a5607b41518add5872c2a0e4f144dc85315f0e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a5607b41518add5872c2a0e4…
Author: Andrew Bogott <andrew(a)CodeWeavers.com> Date: Wed Nov 10 23:52:01 2010 -0600 shdocvw: Skip some tests if a modern IE is not present. --- dlls/shdocvw/tests/intshcut.c | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/dlls/shdocvw/tests/intshcut.c b/dlls/shdocvw/tests/intshcut.c index cf0b225..af34614 100644 --- a/dlls/shdocvw/tests/intshcut.c +++ b/dlls/shdocvw/tests/intshcut.c @@ -32,6 +32,7 @@ #include "shobjidl.h" #include "shlguid.h" #include "ole2.h" +#include "mshtml.h" #include "initguid.h" #include "isguids.h" #include "intshcut.h" @@ -158,6 +159,20 @@ static void check_string_transform(IUniformResourceLocatorA *urlA, LPCSTR input, } } +static BOOL check_ie(void) +{ + IHTMLDocument5 *doc; + HRESULT hres; + + hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IHTMLDocument5, (void**)&doc); + if(FAILED(hres)) + return FALSE; + + IHTMLDocument5_Release(doc); + return TRUE; +} + static void test_NullURLs(void) { HRESULT hr; @@ -210,10 +225,13 @@ static void test_SetURLFlags(void) static void test_InternetShortcut(void) { - test_Aggregability(); - test_QueryInterface(); - test_NullURLs(); - test_SetURLFlags(); + if (check_ie()) + { + test_Aggregability(); + test_QueryInterface(); + test_NullURLs(); + test_SetURLFlags(); + } } START_TEST(intshcut)
1
0
0
0
← Newer
1
...
101
102
103
104
105
106
107
...
110
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
Results per page:
10
25
50
100
200