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
February 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
4 participants
839 discussions
Start a n
N
ew thread
Mikołaj Zalewski : comctl32: toolbar: Copy bitmaps with CopyImage so that it works also for DIBs ( based on a patch by Oleg Krylov).
by Alexandre Julliard
07 Feb '07
07 Feb '07
Module: wine Branch: master Commit: dadc4248cf901d4a0bcbfaafacb29202f923ecc4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dadc4248cf901d4a0bcbfaafa…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue Feb 6 23:12:46 2007 +0100 comctl32: toolbar: Copy bitmaps with CopyImage so that it works also for DIBs (based on a patch by Oleg Krylov). --- dlls/comctl32/toolbar.c | 82 ++++++---------------------------------------- 1 files changed, 11 insertions(+), 71 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 2dca16e..a60bf09 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -2664,33 +2664,7 @@ TOOLBAR_AddBitmapToImageList(TOOLBAR_INF TRACE("adding hInst=%p nID=%d nButtons=%d\n", bitmap->hInst, bitmap->nID, bitmap->nButtons); /* Add bitmaps to the default image list */ if (bitmap->hInst == NULL) /* a handle was passed */ - { - BITMAP bmp; - HBITMAP hOldBitmapBitmap, hOldBitmapLoad; - HDC hdcImage, hdcBitmap; - - /* copy the bitmap before adding it so that the user's bitmap - * doesn't get modified. - */ - GetObjectW ((HBITMAP)bitmap->nID, sizeof(BITMAP), (LPVOID)&bmp); - - hdcImage = CreateCompatibleDC(0); - hdcBitmap = CreateCompatibleDC(0); - - /* create new bitmap */ - hbmLoad = CreateBitmap (bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes, bmp.bmBitsPixel, NULL); - hOldBitmapBitmap = SelectObject(hdcBitmap, (HBITMAP)bitmap->nID); - hOldBitmapLoad = SelectObject(hdcImage, hbmLoad); - - /* Copy the user's image */ - BitBlt (hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, - hdcBitmap, 0, 0, SRCCOPY); - - SelectObject (hdcImage, hOldBitmapLoad); - SelectObject (hdcBitmap, hOldBitmapBitmap); - DeleteDC (hdcImage); - DeleteDC (hdcBitmap); - } + hbmLoad = (HBITMAP)CopyImage((HBITMAP)bitmap->nID, IMAGE_BITMAP, 0, 0, 0); else hbmLoad = CreateMappedBitmap(bitmap->hInst, bitmap->nID, 0, NULL, 0); @@ -4175,7 +4149,6 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); LPTBREPLACEBITMAP lpReplace = (LPTBREPLACEBITMAP) lParam; HBITMAP hBitmap; - HBITMAP hbmLoad = NULL; int i = 0, nOldButtons = 0, pos = 0; int nOldBitmaps, nNewBitmaps = 0; HIMAGELIST himlDef = 0; @@ -4192,16 +4165,6 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM else if (lpReplace->hInstOld != 0) FIXME("resources not in the current module not implemented\n"); - if (lpReplace->hInstNew) - { - hbmLoad = LoadBitmapW(lpReplace->hInstNew,(LPWSTR)lpReplace->nIDNew); - hBitmap = hbmLoad; - } - else - { - hBitmap = (HBITMAP) lpReplace->nIDNew; - } - TRACE("To be replaced hInstOld %p nIDOld %x\n", lpReplace->hInstOld, lpReplace->nIDOld); for (i = 0; i < infoPtr->nNumBitmapInfos; i++) { TBITMAP_INFO *tbi = &infoPtr->bitmaps[i]; @@ -4222,11 +4185,17 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM if (nOldButtons == 0) { WARN("No hinst/bitmap found! hInst %p nID %x\n", lpReplace->hInstOld, lpReplace->nIDOld); - if (hbmLoad) - DeleteObject (hbmLoad); return FALSE; } + /* copy the bitmap before adding it as ImageList_AddMasked modifies the + * bitmap + */ + if (lpReplace->hInstNew) + hBitmap = LoadBitmapW(lpReplace->hInstNew,(LPWSTR)lpReplace->nIDNew); + else + hBitmap = CopyImage((HBITMAP)lpReplace->nIDNew, IMAGE_BITMAP, 0, 0, 0); + himlDef = GETDEFIMAGELIST(infoPtr, 0); /* fixme: correct? */ nOldBitmaps = ImageList_GetImageCount(himlDef); @@ -4237,35 +4206,9 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM if (hBitmap) { - BITMAP bmp; - HBITMAP hOldBitmapBitmap, hOldBitmapLoad, hbmLoad; - HDC hdcImage, hdcBitmap; - - /* copy the bitmap before adding it so that the user's bitmap - * doesn't get modified. - */ - GetObjectW (hBitmap, sizeof(BITMAP), (LPVOID)&bmp); - - hdcImage = CreateCompatibleDC(0); - hdcBitmap = CreateCompatibleDC(0); - - /* create new bitmap */ - hbmLoad = CreateBitmap (bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes, bmp.bmBitsPixel, NULL); - hOldBitmapBitmap = SelectObject(hdcBitmap, hBitmap); - hOldBitmapLoad = SelectObject(hdcImage, hbmLoad); - - /* Copy the user's image */ - BitBlt (hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, - hdcBitmap, 0, 0, SRCCOPY); - - SelectObject (hdcImage, hOldBitmapLoad); - SelectObject (hdcBitmap, hOldBitmapBitmap); - DeleteDC (hdcImage); - DeleteDC (hdcBitmap); - - ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace); + ImageList_AddMasked (himlDef, hBitmap, comctl32_color.clrBtnFace); nNewBitmaps = ImageList_GetImageCount(himlDef); - DeleteObject (hbmLoad); + DeleteObject(hBitmap); } infoPtr->nNumBitmaps = infoPtr->nNumBitmaps - nOldBitmaps + nNewBitmaps; @@ -4274,9 +4217,6 @@ TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM pos, nOldBitmaps, nNewBitmaps); InvalidateRect(hwnd, NULL, TRUE); - - if (hbmLoad) - DeleteObject (hbmLoad); return TRUE; }
1
0
0
0
Felix Nawothnig : comctl32: Remove unnecessary and misused mask member from TAB_ITEM.
by Alexandre Julliard
07 Feb '07
07 Feb '07
Module: wine Branch: master Commit: 79e265accd5c2a35b6070baa737a21b74a06bbb0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79e265accd5c2a35b6070baa7…
Author: Felix Nawothnig <flexo(a)holycrap.org> Date: Tue Feb 6 22:10:05 2007 +0100 comctl32: Remove unnecessary and misused mask member from TAB_ITEM. --- dlls/comctl32/tab.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index d17f6a7..7ecd977 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -82,7 +82,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(tab); typedef struct { - UINT mask; DWORD dwState; LPWSTR pszText; INT iImage; @@ -217,9 +216,8 @@ TAB_DumpItemInternal(TAB_INFO *infoPtr, TAB_ITEM *ti; ti = TAB_GetItem(infoPtr, iItem); - TRACE("tab %d, mask=0x%08x, dwState=0x%08x, pszText=%s, iImage=%d\n", - iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText), - ti->iImage); + TRACE("tab %d, dwState=0x%08x, pszText=%s, iImage=%d\n", + iItem, ti->dwState, debugstr_w(ti->pszText), ti->iImage); TRACE("tab %d, rect.left=%d, rect.top(row)=%d\n", iItem, ti->rect.left, ti->rect.top); } @@ -1737,7 +1735,7 @@ TAB_DrawItemInterior * * Draw the icon. */ - if (infoPtr->himl && (item->mask & TCIF_IMAGE)) + if (infoPtr->himl && item->iImage != -1) { INT cx; INT cy; @@ -2639,7 +2637,6 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPAR item = TAB_GetItem(infoPtr, iItem); - item->mask = pti->mask; item->pszText = NULL; if (pti->mask & TCIF_TEXT) @@ -2846,7 +2843,7 @@ static LRESULT TAB_DeleteItem (TAB_INFO TAB_InvalidateTabArea(infoPtr); - if ((item->mask & TCIF_TEXT) && item->pszText) + if (item->pszText) Free(item->pszText); infoPtr->uNumItem--;
1
0
0
0
Jacek Caban : itss: Allow reading from ReportData call.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: 42dda83b3fd6adb34da9760eac45872adc9e4122 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42dda83b3fd6adb34da9760ea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 6 20:49:02 2007 +0100 itss: Allow reading from ReportData call. --- dlls/itss/protocol.c | 8 ++++---- dlls/itss/tests/protocol.c | 26 ++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 51fad3c..2d7cd98 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -195,6 +195,10 @@ static HRESULT WINAPI ITSProtocol_Start( CoTaskMemFree(mime); } + release_chm(This); /* Native leaks handle here */ + This->chm_file = chm_file; + memcpy(&This->chm_object, &chm_object, sizeof(chm_object)); + hres = IInternetProtocolSink_ReportData(pOIProtSink, BSCF_FIRSTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE, chm_object.length, chm_object.length); @@ -206,10 +210,6 @@ static HRESULT WINAPI ITSProtocol_Start( hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); - release_chm(This); /* Native leaks handle here */ - This->chm_file = chm_file; - memcpy(&This->chm_object, &chm_object, sizeof(chm_object)); - return report_result(pOIProtSink, hres); } diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index 4b594b2..70f22b9 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -66,6 +66,7 @@ DEFINE_EXPECT(ReportData); DEFINE_EXPECT(ReportResult); static HRESULT expect_hrResult; +static IInternetProtocol *read_protocol = NULL; static enum { ITS_PROTOCOL, @@ -148,11 +149,22 @@ static HRESULT WINAPI ProtocolSink_Repor else ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION), "grcf = %08x\n", grfBSCF); + if(read_protocol) { + BYTE buf[100]; + DWORD cb = 0xdeadbeef; + HRESULT hres; + + hres = IInternetProtocol_Read(read_protocol, buf, sizeof(buf), &cb); + ok(hres == S_OK, "Read failed: %08x\n", hres); + ok(cb == 13, "cb=%u expected 13\n", cb); + ok(!memcmp(buf, "<html></html>", 13), "unexpected data\n"); + } + return S_OK; } -static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, - LPCWSTR szResult) +static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, + DWORD dwError, LPCWSTR szResult) { CHECK_EXPECT(ReportResult); @@ -365,6 +377,16 @@ static void test_protocol_url(IClassFact ok(cb == 2, "cb=%u expected 2\n", cb); ref = IInternetProtocol_Release(protocol); ok(!ref, "protocol ref=%d\n", ref); + + hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&read_protocol); + ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); + if(FAILED(hres)) + return; + + protocol_start(read_protocol, url); + ref = IInternetProtocol_Release(read_protocol); + ok(!ref, "protocol ref=%d\n", ref); + read_protocol = NULL; } static void test_its_protocol(void)
1
0
0
0
Jacek Caban : urlmon: Fix zone tests.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: e39a96c5fbebea61f663c7c35715f63523718a86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e39a96c5fbebea61f663c7c35…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 6 20:48:19 2007 +0100 urlmon: Fix zone tests. --- dlls/urlmon/sec_mgr.c | 2 ++ dlls/urlmon/tests/misc.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index ad423de..609ca4f 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -68,6 +68,8 @@ static HRESULT map_url_to_zone(LPCWSTR u 'P','r','o','t','o','c','o','l','D','e','f','a','u','l','t','s',0}; static const WCHAR wszFile[] = {'f','i','l','e',0}; + *zone = -1; + hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, schema, sizeof(schema)/sizeof(WCHAR), &size, 0); if(FAILED(hres)) return hres; diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index fedd15d..8774410 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -539,7 +539,7 @@ static void test_FindMimeFromData(void) ok(!lstrcmpW(mime, mime_tests[i].mime), "[%d] wrong mime\n", i); CoTaskMemFree(mime); }else { - ok(hres == E_FAIL, "FindMimeFromData failed: %08x, expected E_FAIL\n", hres); + ok(hres == E_FAIL, "[%d] FindMimeFromData failed: %08x, expected E_FAIL\n", i, hres); ok(mime == (LPWSTR)0xf0f0f0f0, "[%d] mime != 0xf0f0f0f0\n", i); } @@ -664,8 +664,11 @@ static void test_SecurityManager(void) ok(hres == secmgr_tests[i].zone_hres, "[%d] MapUrlToZone failed: %08x, expected %08x\n", i, hres, secmgr_tests[i].zone_hres); - ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone, - secmgr_tests[i].zone); + if(SUCCEEDED(hres)) + ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone, + secmgr_tests[i].zone); + else + ok(zone == secmgr_tests[i].zone || zone == -1, "[%d] zone=%d\n", i, zone); size = sizeof(buf); memset(buf, 0xf0, sizeof(buf)); @@ -684,6 +687,7 @@ static void test_SecurityManager(void) zone = 100; hres = IInternetSecurityManager_MapUrlToZone(secmgr, NULL, &zone, 0); ok(hres == E_INVALIDARG, "MapUrlToZone failed: %08x, expected E_INVALIDARG\n", hres); + ok(zone == 100, "zone=%d\n", zone); size = sizeof(buf); hres = IInternetSecurityManager_GetSecurityId(secmgr, NULL, buf, &size, 0);
1
0
0
0
Jacek Caban : hhctrl.ocx: Use mk as default protocol and code clean up.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: 719bfaf4b0dca36cb959189f765d87445d9d14e0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=719bfaf4b0dca36cb959189f7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 6 20:47:29 2007 +0100 hhctrl.ocx: Use mk as default protocol and code clean up. --- dlls/hhctrl.ocx/chm.c | 10 ------- dlls/hhctrl.ocx/chm.h | 1 - dlls/hhctrl.ocx/help.c | 54 +++++++++++++++++++++++++++++------------ dlls/hhctrl.ocx/webbrowser.c | 17 ------------- dlls/hhctrl.ocx/webbrowser.h | 1 - 5 files changed, 38 insertions(+), 45 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 44438d6..2c2f8e7 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -174,13 +174,3 @@ void CHM_CloseCHM(CHMInfo *pCHMInfo) IITStorage_Release(pCHMInfo->pITStorage); IStorage_Release(pCHMInfo->pStorage); } - -/* Creates a Url of a CHM file that can be used with WB_Navigate */ -void CHM_CreateITSUrl(CHMInfo *pChmInfo, LPCWSTR szIndex, LPWSTR szUrl) -{ - static const WCHAR formatW[] = { - 'i','t','s',':','%','s',':',':','%','s',0 - }; - - wsprintfW(szUrl, formatW, pChmInfo->szFile, szIndex); -} diff --git a/dlls/hhctrl.ocx/chm.h b/dlls/hhctrl.ocx/chm.h index 4112ba5..72f7e81 100644 --- a/dlls/hhctrl.ocx/chm.h +++ b/dlls/hhctrl.ocx/chm.h @@ -33,6 +33,5 @@ typedef struct CHMInfo BOOL CHM_OpenCHM(CHMInfo *pCHMInfo, LPCWSTR szFile); BOOL CHM_LoadWinTypeFromCHM(CHMInfo *pCHMInfo, HH_WINTYPEW *pHHWinType); void CHM_CloseCHM(CHMInfo *pCHMInfo); -void CHM_CreateITSUrl(CHMInfo *pCHMInfo, LPCWSTR szIndex, LPWSTR szUrl); #endif diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 426996d..15b023d 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -20,6 +20,8 @@ #include <stdarg.h> +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -28,12 +30,18 @@ #include "commctrl.h" #include "htmlhelp.h" #include "ole2.h" +#include "exdisp.h" +#include "wininet.h" + #include "wine/unicode.h" +#include "wine/debug.h" #include "resource.h" #include "chm.h" #include "webbrowser.h" +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); + static void Help_OnSize(HWND hWnd); /* Window type defaults */ @@ -87,6 +95,34 @@ static LPWSTR HH_LoadString(DWORD dwID) return string; } +static BOOL NavigateToChm(WBInfo *pWBInfo, LPCWSTR file, LPCWSTR index) +{ + WCHAR buf[INTERNET_MAX_URL_LENGTH]; + WCHAR full_path[MAX_PATH]; + VARIANT url; + + static const WCHAR url_format[] = + {'m','k',':','@','M','S','I','T','S','t','o','r','e',':','%','s',':',':','/','%','s',0}; + + if (!pWBInfo->pWebBrowser2) + return FALSE; + + if(!GetFullPathNameW(file, sizeof(full_path), full_path, NULL)) { + WARN("GetFullPathName failed: %u\n", GetLastError()); + return FALSE; + } + + wsprintfW(buf, url_format, full_path, index); + + V_VT(&url) = VT_BSTR; + V_BSTR(&url) = SysAllocString(buf); + + IWebBrowser2_Navigate2(pWBInfo->pWebBrowser2, &url, 0, 0, 0, 0); + VariantClear(&url); + + return TRUE; +} + /* Size Bar */ #define SIZEBAR_WIDTH 4 @@ -321,13 +357,8 @@ static void TB_OnClick(HWND hWnd, DWORD WB_DoPageAction(pHHInfo->pWBInfo, WB_GOBACK); break; case IDTB_HOME: - { - WCHAR szUrl[MAX_PATH]; - - CHM_CreateITSUrl(pHHInfo->pCHMInfo, pHHInfo->pHHWinType->pszHome, szUrl); - WB_Navigate(pHHInfo->pWBInfo, szUrl); + NavigateToChm(pHHInfo->pWBInfo, pHHInfo->pCHMInfo->szFile, pHHInfo->pHHWinType->pszHome); break; - } case IDTB_FORWARD: WB_DoPageAction(pHHInfo->pWBInfo, WB_GOFORWARD); break; @@ -821,15 +852,6 @@ static void HH_Close(HHInfo *pHHInfo) } } -static void HH_OpenDefaultTopic(HHInfo *pHHInfo) -{ - WCHAR url[MAX_PATH]; - LPCWSTR defTopic = pHHInfo->pHHWinType->pszFile; - - CHM_CreateITSUrl(pHHInfo->pCHMInfo, defTopic, url); - WB_Navigate(pHHInfo->pWBInfo, url); -} - static BOOL HH_OpenCHM(HHInfo *pHHInfo) { if (!CHM_OpenCHM(pHHInfo->pCHMInfo, pHHInfo->szCmdLine)) @@ -857,7 +879,7 @@ int WINAPI doWinMain(HINSTANCE hInstance return -1; } - HH_OpenDefaultTopic(pHHInfo); + NavigateToChm(pHHInfo->pWBInfo, pHHInfo->pCHMInfo->szFile, pHHInfo->pHHWinType->pszFile); while (GetMessageW(&msg, 0, 0, 0)) { diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c index d7c5d4e..20572de 100644 --- a/dlls/hhctrl.ocx/webbrowser.c +++ b/dlls/hhctrl.ocx/webbrowser.c @@ -668,23 +668,6 @@ void WB_UnEmbedBrowser(WBInfo *pWBInfo) } } -BOOL WB_Navigate(WBInfo *pWBInfo, LPCWSTR szUrl) -{ - IWebBrowser2 *pWebBrowser2 = pWBInfo->pWebBrowser2; - VARIANT myURL; - - if (!pWebBrowser2) - return FALSE; - - V_VT(&myURL) = VT_BSTR; - V_BSTR(&myURL) = SysAllocString(szUrl); - - IWebBrowser2_Navigate2(pWebBrowser2, &myURL, 0, 0, 0, 0); - VariantClear(&myURL); - - return TRUE; -} - void WB_ResizeBrowser(WBInfo *pWBInfo, DWORD dwWidth, DWORD dwHeight) { IWebBrowser2 *pWebBrowser2 = pWBInfo->pWebBrowser2; diff --git a/dlls/hhctrl.ocx/webbrowser.h b/dlls/hhctrl.ocx/webbrowser.h index eaa2218..c17274f 100644 --- a/dlls/hhctrl.ocx/webbrowser.h +++ b/dlls/hhctrl.ocx/webbrowser.h @@ -42,7 +42,6 @@ typedef struct WBInfo BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent); void WB_UnEmbedBrowser(WBInfo *pWBInfo); -BOOL WB_Navigate(WBInfo *pWBInfo, LPCWSTR szUrl); void WB_ResizeBrowser(WBInfo *pWBInfo, DWORD dwWidth, DWORD dwHeight); void WB_DoPageAction(WBInfo *pWBInfo, DWORD dwAction);
1
0
0
0
Jacek Caban : hhctrl.ocx: Use SetWindowRects to set WebBrowser's size.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: f9a7886121ca25694294295245fbd76aad2d42e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9a7886121ca2569429429524…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 6 20:46:21 2007 +0100 hhctrl.ocx: Use SetWindowRects to set WebBrowser's size. --- dlls/hhctrl.ocx/webbrowser.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c index 154db88..d7c5d4e 100644 --- a/dlls/hhctrl.ocx/webbrowser.c +++ b/dlls/hhctrl.ocx/webbrowser.c @@ -580,6 +580,7 @@ static IStorage MyIStorage = { &MyIStora BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HWND hwndParent) { IOleClientSiteImpl *iOleClientSiteImpl; + IOleInPlaceObject *inplace; IOleObject *browserObject; IWebBrowser2 *webBrowser2; HRESULT hr; @@ -622,16 +623,16 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HW -1, hwndParent, &rc); if (FAILED(hr)) goto error; + hr = IOleObject_QueryInterface(browserObject, &IID_IOleInPlaceObject, (void**)&inplace); + if (FAILED(hr)) goto error; + + IOleInPlaceObject_SetObjectRects(inplace, &rc, &rc); + IOleInPlaceObject_Release(inplace); hr = IOleObject_QueryInterface(browserObject, &IID_IWebBrowser2, (void **)&webBrowser2); if (SUCCEEDED(hr)) { - IWebBrowser2_put_Left(webBrowser2, 0); - IWebBrowser2_put_Top(webBrowser2, 0); - IWebBrowser2_put_Width(webBrowser2, rc.right); - IWebBrowser2_put_Height(webBrowser2, rc.bottom); - pWBInfo->pWebBrowser2 = webBrowser2; pWBInfo->hwndParent = hwndParent;
1
0
0
0
Jacek Caban : hhctrl.ocx: Remove useless SetHostNames call.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: 8baee578cc9357a9efdf29e1b309e030a96f3813 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8baee578cc9357a9efdf29e1b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 6 20:45:26 2007 +0100 hhctrl.ocx: Remove useless SetHostNames call. --- dlls/hhctrl.ocx/webbrowser.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c index b1cb1c9..154db88 100644 --- a/dlls/hhctrl.ocx/webbrowser.c +++ b/dlls/hhctrl.ocx/webbrowser.c @@ -585,8 +585,6 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HW HRESULT hr; RECT rc; - static const WCHAR hostNameW[] = {'H','o','s','t',' ','N','a','m','e',0}; - /* clear out struct to keep from accessing invalid ptrs */ ZeroMemory(pWBInfo, sizeof(WBInfo)); @@ -613,7 +611,6 @@ BOOL WB_EmbedBrowser(WBInfo *pWBInfo, HW /* make the browser object accessible to the IOleClientSite implementation */ iOleClientSiteImpl->pBrowserObject = browserObject; - IOleObject_SetHostNames(browserObject, hostNameW, 0); GetClientRect(hwndParent, &rc);
1
0
0
0
Rob Shearman : oleaut32: Ignore the first named argument when invoking property-put methods
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: e88d033044f1b93cf9dcec8b997bc37080384bce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e88d033044f1b93cf9dcec8b9…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Feb 6 19:26:04 2007 +0000 oleaut32: Ignore the first named argument when invoking property-put methods as it is mandatory and doesn't indicate that the arguments will be passed in as named ones. --- dlls/oleaut32/typelib.c | 30 +++++++++++++++++++----------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 508bb89..63ec327 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5471,8 +5471,24 @@ static HRESULT WINAPI ITypeInfo_fnInvoke VARIANTARG **prgpvarg = INVBUF_GET_ARG_PTR_ARRAY(buffer, func_desc->cParams); VARIANTARG *rgvarg = INVBUF_GET_ARG_ARRAY(buffer, func_desc->cParams); VARTYPE *rgvt = INVBUF_GET_ARG_TYPE_ARRAY(buffer, func_desc->cParams); + UINT cNamedArgs = pDispParams->cNamedArgs; + DISPID *rgdispidNamedArgs = pDispParams->rgdispidNamedArgs; hres = S_OK; + + if (func_desc->invkind & (INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) + { + if (!cNamedArgs || (rgdispidNamedArgs[0] != DISPID_PROPERTYPUT)) + { + ERR("first named arg for property put invocation must be DISPID_PROPERTYPUT\n"); + hres = DISP_E_PARAMNOTOPTIONAL; + goto func_fail; + } + /* ignore the DISPID_PROPERTYPUT named argument from now on */ + cNamedArgs--; + rgdispidNamedArgs++; + } + for (i = 0; i < func_desc->cParams; i++) { TYPEDESC *tdesc = &func_desc->lprgelemdescParam[i].tdesc; @@ -5487,24 +5503,16 @@ static HRESULT WINAPI ITypeInfo_fnInvoke USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; VARIANTARG *src_arg; - if (pDispParams->cNamedArgs) + if (cNamedArgs) { USHORT j; src_arg = NULL; - for (j = 0; j < pDispParams->cNamedArgs; j++) - { - if ((func_desc->invkind & INVOKE_PROPERTYPUT) && - (pDispParams->rgdispidNamedArgs[j] == DISPID_PROPERTYPUT)) - { - src_arg = &pDispParams->rgvarg[0]; - break; - } - if (pDispParams->rgdispidNamedArgs[j] == i) + for (j = 0; j < cNamedArgs; j++) + if (rgdispidNamedArgs[j] == i) { src_arg = &pDispParams->rgvarg[j]; break; } - } } else src_arg = i < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - i] : NULL;
1
0
0
0
Rob Shearman : oleaut32: Add support for named arguments in ITypeInfo:: Invoke.
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: 21140a9a53a6cd025f1c83bbfd388a4632a28de6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21140a9a53a6cd025f1c83bbf…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Feb 6 19:25:27 2007 +0000 oleaut32: Add support for named arguments in ITypeInfo::Invoke. --- dlls/oleaut32/typelib.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index f61f460..508bb89 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5485,6 +5485,29 @@ static HRESULT WINAPI ITypeInfo_fnInvoke for (i = 0; i < func_desc->cParams; i++) { USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags; + VARIANTARG *src_arg; + + if (pDispParams->cNamedArgs) + { + USHORT j; + src_arg = NULL; + for (j = 0; j < pDispParams->cNamedArgs; j++) + { + if ((func_desc->invkind & INVOKE_PROPERTYPUT) && + (pDispParams->rgdispidNamedArgs[j] == DISPID_PROPERTYPUT)) + { + src_arg = &pDispParams->rgvarg[0]; + break; + } + if (pDispParams->rgdispidNamedArgs[j] == i) + { + src_arg = &pDispParams->rgvarg[j]; + break; + } + } + } + else + src_arg = i < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - i] : NULL; if (wParamFlags & PARAMFLAG_FRETVAL) { @@ -5507,9 +5530,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke break; } } - else if (i < pDispParams->cArgs) + else if (src_arg) { - VARIANTARG *src_arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - i]; dump_Variant(src_arg); if (rgvt[i] == VT_VARIANT)
1
0
0
0
Rob Shearman : oleaut32: Copy the value directly returned from the called function
by Alexandre Julliard
06 Feb '07
06 Feb '07
Module: wine Branch: master Commit: 702e2c6dc2cb597c2d5263eec3ac021029d27074 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=702e2c6dc2cb597c2d5263eec…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Tue Feb 6 19:24:51 2007 +0000 oleaut32: Copy the value directly returned from the called function if it is not an HRESULT value, instead of getting it from a [retval] attribute. --- dlls/oleaut32/tests/tmarshal.c | 5 +---- dlls/oleaut32/typelib.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 933dd6b..833c9dd 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -998,10 +998,7 @@ static void test_typelibmarshal(void) VariantInit(&varresult); hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_BSTRRET, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, ITypeInfo_Invoke); - todo_wine - { - ok(V_VT(&varresult) == VT_BSTR, "V_VT(&varresult) should be VT_BSTR instead of %d\n", V_VT(&varresult)); - } + ok(V_VT(&varresult) == VT_BSTR, "V_VT(&varresult) should be VT_BSTR instead of %d\n", V_VT(&varresult)); ok(V_BSTR(&varresult) != NULL, "V_BSTR(&varresult) should not be NULL\n"); VariantClear(&varresult); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 8cd4a79..f61f460 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5689,6 +5689,19 @@ static HRESULT WINAPI ITypeInfo_fnInvoke } } } + if (V_VT(&varresult) != VT_ERROR) + { + TRACE("varresult value: "); + dump_Variant(&varresult); + + if (pVarResult) + { + VariantClear(pVarResult); + *pVarResult = varresult; + } + else + VariantClear(&varresult); + } func_fail: HeapFree(GetProcessHeap(), 0, buffer);
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
...
84
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
Results per page:
10
25
50
100
200