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 2012
----- 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
549 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Don' t set the Preselected property for a full reinstall.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: c66b78a81000f48d9dda76ef2b30a75f39a16bcd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c66b78a81000f48d9dda76ef2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Dec 11 14:04:16 2012 +0100 msi: Don't set the Preselected property for a full reinstall. --- dlls/msi/action.c | 3 ++- dlls/msi/msipriv.h | 1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 076d1b3..babf0f0 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1784,7 +1784,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level ) ret |= process_state_property( package, level, szReinstall, INSTALLSTATE_UNKNOWN ); ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED ); - if (ret) + if (ret && !package->full_reinstall) msi_set_property( package->db, szPreselected, szOne, -1 ); return ret; @@ -7785,6 +7785,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, { TRACE("setting REINSTALL property to ALL\n"); msi_set_property( package->db, szReinstall, szAll, -1 ); + package->full_reinstall = 1; } /* properties may have been added by a transform */ diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 4110ec6..c7a42cb 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -414,6 +414,7 @@ typedef struct tagMSIPACKAGE unsigned char need_reboot_at_end : 1; unsigned char need_reboot_now : 1; unsigned char need_rollback : 1; + unsigned char full_reinstall : 1; } MSIPACKAGE; typedef struct tagMSIPREVIEW
1
0
0
0
Nikolay Sivov : comctl32: Fix font style when item is bold and hovered in track mode.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: fbd7f8813f0792616012875e714adb0b0381fcdd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbd7f8813f0792616012875e7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 11 19:51:56 2012 +0300 comctl32: Fix font style when item is bold and hovered in track mode. --- dlls/comctl32/treeview.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 57cb70c..22d7180 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -110,6 +110,7 @@ typedef struct tagTREEVIEW_INFO HFONT hDefaultFont; HFONT hBoldFont; HFONT hUnderlineFont; + HFONT hBoldUnderlineFont; HCURSOR hcurHand; HWND hwndToolTip; @@ -303,11 +304,22 @@ TREEVIEW_CreateUnderlineFont(HFONT hOrigFont) return CreateFontIndirectW(&font); } +static HFONT +TREEVIEW_CreateBoldUnderlineFont(HFONT hfont) +{ + LOGFONTW font; + + GetObjectW(hfont, sizeof(font), &font); + font.lfWeight = FW_BOLD; + font.lfUnderline = TRUE; + return CreateFontIndirectW(&font); +} + static inline HFONT TREEVIEW_FontForItem(const TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item) { if ((infoPtr->dwStyle & TVS_TRACKSELECT) && (item == infoPtr->hotItem)) - return infoPtr->hUnderlineFont; + return item->state & TVIS_BOLD ? infoPtr->hBoldUnderlineFont : infoPtr->hUnderlineFont; if (item->state & TVIS_BOLD) return infoPtr->hBoldFont; return infoPtr->hFont; @@ -1903,8 +1915,10 @@ TREEVIEW_SetFont(TREEVIEW_INFO *infoPtr, HFONT hFont, BOOL bRedraw) DeleteObject(infoPtr->hBoldFont); DeleteObject(infoPtr->hUnderlineFont); + DeleteObject(infoPtr->hBoldUnderlineFont); infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont); infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont); + infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont); if (!infoPtr->bHeightSet) infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr); @@ -5059,6 +5073,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectW(&lf); infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont); infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont); + infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont); infoPtr->hcurHand = LoadCursorW(NULL, (LPWSTR)IDC_HAND); infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr); @@ -5118,6 +5133,7 @@ TREEVIEW_Destroy(TREEVIEW_INFO *infoPtr) DeleteObject(infoPtr->hDefaultFont); DeleteObject(infoPtr->hBoldFont); DeleteObject(infoPtr->hUnderlineFont); + DeleteObject(infoPtr->hBoldUnderlineFont); Free(infoPtr); return 0;
1
0
0
0
Nikolay Sivov : msxml3: GetMaxSize() is not a stub.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 9336a3903c231dd8261ed498e7c881e36aa6b327 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9336a3903c231dd8261ed498e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 11 13:31:29 2012 +0300 msxml3: GetMaxSize() is not a stub. --- dlls/msxml3/domdoc.c | 2 +- dlls/msxml3/tests/domdoc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 52b41a7..49e6168 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -803,7 +803,7 @@ static HRESULT WINAPI PersistStreamInit_GetSizeMax( IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize) { domdoc *This = impl_from_IPersistStreamInit(iface); - TRACE("(%p)->(%p): stub!\n", This, pcbSize); + TRACE("(%p)->(%p)\n", This, pcbSize); return E_NOTIMPL; } diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index df72987..eda98f1 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -1755,16 +1755,20 @@ static void test_persiststreaminit(void) { IXMLDOMDocument *doc; IPersistStreamInit *streaminit; + ULARGE_INTEGER size; HRESULT hr; doc = create_document(&IID_IXMLDOMDocument); if (!doc) return; hr = IXMLDOMDocument_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&streaminit); - ok( hr == S_OK, "failed with 0x%08x\n", hr ); + ok(hr == S_OK, "got 0x%08x\n", hr); hr = IPersistStreamInit_InitNew(streaminit); - ok( hr == S_OK, "failed with 0x%08x\n", hr ); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IPersistStreamInit_GetSizeMax(streaminit, &size); + ok(hr == E_NOTIMPL, "got 0x%08x\n", hr); IXMLDOMDocument_Release(doc); }
1
0
0
0
Alexandre Julliard : gdi32: Fix text justification to properly handle logical coordinates.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 351e58318ab453d88efb236bc350099d2c151634 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=351e58318ab453d88efb236bc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 11 16:52:43 2012 +0100 gdi32: Fix text justification to properly handle logical coordinates. --- dlls/gdi32/font.c | 13 ++++++------- dlls/gdi32/tests/dc.c | 13 +++++++++++++ dlls/gdi32/tests/font.c | 40 ++++++++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 3d75682..34520f5 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -1189,7 +1189,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, /* Perform device size to world size transformations. */ if (ret) { - INT extra = dc->charExtra, + INT extra = abs(INTERNAL_XWSTODS(dc, dc->charExtra)), breakExtra = dc->breakExtra, breakRem = dc->breakRem, i; @@ -1198,7 +1198,6 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, { for (i = 0; i < count; ++i) { - dxs[i] = abs(INTERNAL_XDSTOWS(dc, dxs[i])); dxs[i] += (i+1) * extra; if (count > 1 && (breakExtra || breakRem) && str[i] == tm.tmBreakChar) { @@ -1209,15 +1208,12 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, dxs[i]++; } } + dxs[i] = abs(INTERNAL_XDSTOWS(dc, dxs[i])); if (dxs[i] <= maxExt) ++nFit; } - breakRem = dc->breakRem; } - size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); - size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); - - if (!dxs && count > 1 && (breakExtra || breakRem)) + else if (count > 1 && (breakExtra || breakRem)) { for (i = 0; i < count; i++) { @@ -1232,6 +1228,9 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count, } } } + size->cx += count * extra; + size->cx = abs(INTERNAL_XDSTOWS(dc, size->cx)); + size->cy = abs(INTERNAL_YDSTOWS(dc, size->cy)); } if (lpnFit) diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 8baacc2..802d82a 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -58,6 +58,7 @@ static void test_dc_values(void) { HDC hdc = CreateDCA("DISPLAY", NULL, NULL, NULL); COLORREF color; + int extra; ok( hdc != NULL, "CreateDC failed\n" ); color = SetBkColor( hdc, 0x12345678 ); @@ -86,6 +87,18 @@ static void test_dc_values(void) color = GetTextColor( hdc ); ok( color == 0, "wrong color %08x\n", color ); + extra = GetTextCharacterExtra( hdc ); + ok( extra == 0, "initial extra %d\n", extra ); + SetTextCharacterExtra( hdc, 123 ); + extra = GetTextCharacterExtra( hdc ); + ok( extra == 123, "initial extra %d\n", extra ); + SetMapMode( hdc, MM_LOMETRIC ); + extra = GetTextCharacterExtra( hdc ); + ok( extra == 123, "initial extra %d\n", extra ); + SetMapMode( hdc, MM_TEXT ); + extra = GetTextCharacterExtra( hdc ); + ok( extra == 123, "initial extra %d\n", extra ); + DeleteDC( hdc ); } diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 1064ce2..8508d70 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1753,18 +1753,17 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea) { INT y, breakCount, - justifiedWidth = 0, /* to test GetTextExtentExPointW() */ areaWidth = clientArea->right - clientArea->left, nErrors = 0, e; - BOOL lastExtent = FALSE; PSTR pFirstChar, pLastChar; SIZE size; TEXTMETRICA tm; struct err { - char extent[100]; + char *start; + int len; int GetTextExtentExPointWWidth; - } error[10]; + } error[20]; GetTextMetricsA(hdc, &tm); y = clientArea->top; @@ -1803,18 +1802,16 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea) { SetTextJustification(hdc, areaWidth - size.cx, breakCount); GetTextExtentPoint32(hdc, pFirstChar, pLastChar - pFirstChar, &size); - justifiedWidth = size.cx; + if (size.cx != areaWidth && nErrors < sizeof(error)/sizeof(error[0]) - 1) + { + error[nErrors].start = pFirstChar; + error[nErrors].len = pLastChar - pFirstChar; + error[nErrors].GetTextExtentExPointWWidth = size.cx; + nErrors++; + } } - else lastExtent = TRUE; - /* catch errors and report them */ - if (!lastExtent && (justifiedWidth != areaWidth)) - { - memset(error[nErrors].extent, 0, 100); - memcpy(error[nErrors].extent, pFirstChar, pLastChar - pFirstChar); - error[nErrors].GetTextExtentExPointWWidth = justifiedWidth; - nErrors++; - } + trace( "%u %.*s\n", size.cx, (int)(pLastChar - pFirstChar), pFirstChar); y += size.cy; str = pLastChar; @@ -1825,8 +1822,8 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea) /* The width returned by GetTextExtentPoint32() is exactly the same returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */ ok(error[e].GetTextExtentExPointWWidth == areaWidth, - "GetTextExtentPointW() for \"%s\" should have returned a width of %d, not %d.\n", - error[e].extent, areaWidth, error[e].GetTextExtentExPointWWidth); + "GetTextExtentPointW() for \"%.*s\" should have returned a width of %d, not %d.\n", + error[e].len, error[e].start, areaWidth, error[e].GetTextExtentExPointWWidth); } } @@ -1862,6 +1859,17 @@ static void test_SetTextJustification(void) testJustification(hdc, testText, &clientArea); + SetMapMode( hdc, MM_ANISOTROPIC ); + SetWindowExtEx( hdc, 2, 2, NULL ); + GetClientRect( hwnd, &clientArea ); + DPtoLP( hdc, (POINT *)&clientArea, 2 ); + testJustification(hdc, testText, &clientArea); + + SetViewportExtEx( hdc, 3, 3, NULL ); + GetClientRect( hwnd, &clientArea ); + DPtoLP( hdc, (POINT *)&clientArea, 2 ); + testJustification(hdc, testText, &clientArea); + DeleteObject(hfont); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd);
1
0
0
0
Alexandre Julliard : winex11: Send WM_ENTERSIZEMOVE when starting to poll for a window move/resize.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 91ebca2bf10e3ef5edcb65868a8f3ce96d514e1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91ebca2bf10e3ef5edcb65868…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 11 13:57:35 2012 +0100 winex11: Send WM_ENTERSIZEMOVE when starting to poll for a window move/resize. --- dlls/winex11.drv/mouse.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 47a453c..8870665 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1350,6 +1350,8 @@ void move_resize_window( HWND hwnd, int dir ) /* (some apps don't like it if we return before the size/move is done) */ if (!button) return; + SendMessageW( hwnd, WM_ENTERSIZEMOVE, 0, 0 ); + for (;;) { MSG msg;
1
0
0
0
Michael Stefaniuc : netapi32: Avoid sizeof on structs with a varlength array.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 54b75f3de3b3ab7b1cd3807b18bb9bb5f2f8cc8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54b75f3de3b3ab7b1cd3807b1…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Dec 11 13:37:41 2012 +0100 netapi32: Avoid sizeof on structs with a varlength array. --- dlls/netapi32/nbt.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/netapi32/nbt.c b/dlls/netapi32/nbt.c index 3cd8a61..1bbcaf0 100644 --- a/dlls/netapi32/nbt.c +++ b/dlls/netapi32/nbt.c @@ -407,9 +407,8 @@ static BOOL NetBTFindNameAnswerCallback(void *pVoid, WORD answerCount, { if (queryData->cacheEntry == NULL) { - queryData->cacheEntry = HeapAlloc( - GetProcessHeap(), 0, sizeof(NBNameCacheEntry) + - (answerCount - 1) * sizeof(DWORD)); + queryData->cacheEntry = HeapAlloc(GetProcessHeap(), 0, + FIELD_OFFSET(NBNameCacheEntry, addresses[answerCount])); if (queryData->cacheEntry) queryData->cacheEntry->numAddresses = 0; else @@ -541,8 +540,8 @@ static UCHAR NetBTinetResolve(const UCHAR name[NCBNAMSZ], if (addr != INADDR_NONE) { - *cacheEntry = HeapAlloc(GetProcessHeap(), - 0, sizeof(NBNameCacheEntry)); + *cacheEntry = HeapAlloc(GetProcessHeap(), 0, + FIELD_OFFSET(NBNameCacheEntry, addresses[1])); if (*cacheEntry) { memcpy((*cacheEntry)->name, name, NCBNAMSZ); @@ -566,9 +565,8 @@ static UCHAR NetBTinetResolve(const UCHAR name[NCBNAMSZ], ; if (host->h_addr_list && host->h_addr_list[0]) { - *cacheEntry = HeapAlloc( - GetProcessHeap(), 0, sizeof(NBNameCacheEntry) + - (i - 1) * sizeof(DWORD)); + *cacheEntry = HeapAlloc(GetProcessHeap(), 0, + FIELD_OFFSET(NBNameCacheEntry, addresses[i])); if (*cacheEntry) { memcpy((*cacheEntry)->name, name, NCBNAMSZ);
1
0
0
0
Michael Stefaniuc : localui: Avoid sizeof on structs with a varlength array .
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: f417dc1efbd227c6c88ab57143c2f8363d62c0b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f417dc1efbd227c6c88ab5714…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Dec 11 13:35:40 2012 +0100 localui: Avoid sizeof on structs with a varlength array. --- dlls/localui/localui.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/localui/localui.c b/dlls/localui/localui.c index b9e4c4e..382e2db 100644 --- a/dlls/localui/localui.c +++ b/dlls/localui/localui.c @@ -122,7 +122,7 @@ static BOOL dlg_configure_com(HANDLE hXcv, HWND hWnd, PCWSTR pPortName) shortname[len-1] = '\0'; /* get current settings */ - len = sizeof(cfg); + len = FIELD_OFFSET(COMMCONFIG, wcProviderData[1]); status = ERROR_SUCCESS; res = XcvDataW( hXcv, cmd_GetDefaultCommConfigW, (PBYTE) shortname,
1
0
0
0
Jacek Caban : atl: Reimplemented AtlModuleLoadTypeLib on top of AtlLoadTypeLib.
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 9e2d5cae7367a716f4b1ce08dcfe63d24f6acdd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e2d5cae7367a716f4b1ce08d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 11 13:03:04 2012 +0100 atl: Reimplemented AtlModuleLoadTypeLib on top of AtlLoadTypeLib. --- dlls/atl/atl_main.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index 415fbc3..8f8cd76 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -111,25 +111,12 @@ static _ATL_OBJMAP_ENTRYW_V1 *get_objmap_entry( _ATL_MODULEW *mod, unsigned int HRESULT WINAPI AtlModuleLoadTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex, BSTR *pbstrPath, ITypeLib **ppTypeLib) { - HRESULT hRes; - OLECHAR path[MAX_PATH+8]; /* leave some space for index */ - TRACE("(%p, %s, %p, %p)\n", pM, debugstr_w(lpszIndex), pbstrPath, ppTypeLib); if (!pM) return E_INVALIDARG; - GetModuleFileNameW(pM->m_hInstTypeLib, path, MAX_PATH); - if (lpszIndex) - lstrcatW(path, lpszIndex); - - hRes = LoadTypeLib(path, ppTypeLib); - if (FAILED(hRes)) - return hRes; - - *pbstrPath = SysAllocString(path); - - return S_OK; + return AtlLoadTypeLib(pM->m_hInstTypeLib, lpszIndex, pbstrPath, ppTypeLib); } HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM)
1
0
0
0
Jacek Caban : atl100: Added AtlLoadTypeLib implementation ( based on AtlModuleLoadTypeLib).
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: b09af0d0b2ab6cceac849533fad0069b3acd85e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b09af0d0b2ab6cceac849533f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 11 13:02:46 2012 +0100 atl100: Added AtlLoadTypeLib implementation (based on AtlModuleLoadTypeLib). --- dlls/atl100/atl.c | 23 +++++++++++++++++++++++ dlls/atl100/atl100.spec | 2 +- include/atlbase.h | 1 + 3 files changed, 25 insertions(+), 1 deletions(-) diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c index dd08867..7e273b7 100644 --- a/dlls/atl100/atl.c +++ b/dlls/atl100/atl.c @@ -265,6 +265,29 @@ void WINAPI AtlCallTermFunc(_ATL_MODULE *pM) } /*********************************************************************** + * AtlLoadTypeLib [atl100.@] + */ +HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex, + BSTR *pbstrPath, ITypeLib **ppTypeLib) +{ + OLECHAR path[MAX_PATH+8]; /* leave some space for index */ + HRESULT hres; + + TRACE("(%p %s %p %p)\n", inst, debugstr_w(lpszIndex), pbstrPath, ppTypeLib); + + GetModuleFileNameW(inst, path, MAX_PATH); + if(lpszIndex) + lstrcatW(path, lpszIndex); + + hres = LoadTypeLib(path, ppTypeLib); + if(FAILED(hres)) + return hres; + + *pbstrPath = SysAllocString(path); + return S_OK; +} + +/*********************************************************************** * AtlGetVersion [atl100.@] */ DWORD WINAPI AtlGetVersion(void *pReserved) diff --git a/dlls/atl100/atl100.spec b/dlls/atl100/atl100.spec index 13e043b..ec8a858 100644 --- a/dlls/atl100/atl100.spec +++ b/dlls/atl100/atl100.spec @@ -38,7 +38,7 @@ 52 stub AtlIPersistPropertyBag_Load 53 stub AtlIPersistPropertyBag_Save 54 stub AtlGetObjectSourceInterface -56 stub AtlLoadTypeLib +56 stdcall AtlLoadTypeLib(long wstr ptr ptr) 58 stdcall AtlModuleAddTermFunc(ptr ptr long) 59 stub AtlAxCreateControlLic 60 stub AtlAxCreateControlLicEx diff --git a/include/atlbase.h b/include/atlbase.h index 5dd0d5b..4aeabe9 100644 --- a/include/atlbase.h +++ b/include/atlbase.h @@ -211,5 +211,6 @@ HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID * iid, DWORD dw); HRESULT WINAPI AtlUnmarshalPtr(IStream *pStream, const IID *iid, IUnknown **ppUnk); HRESULT WINAPI AtlCreateRegistrar(IRegistrar**); HRESULT WINAPI AtlUpdateRegistryFromResourceD(HINSTANCE,LPCOLESTR,BOOL,struct _ATL_REGMAP_ENTRY*,IRegistrar*); +HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**); #endif /* __WINE_ATLBASE_H__ */
1
0
0
0
Jacek Caban : atl: Reimplemented AtlModuleUpdateRegistryFromResourceD on top of AtlUpdateRegistryFromResourceD .
by Alexandre Julliard
11 Dec '12
11 Dec '12
Module: wine Branch: master Commit: 77c7fcdc946c1ac7b5b1a2002ad841246201dd9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=77c7fcdc946c1ac7b5b1a2002…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 11 13:02:32 2012 +0100 atl: Reimplemented AtlModuleUpdateRegistryFromResourceD on top of AtlUpdateRegistryFromResourceD. --- dlls/atl/registrar.c | 53 ++----------------------------------------------- 1 files changed, 3 insertions(+), 50 deletions(-) diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c index 41a5dc3..fc4e08b 100644 --- a/dlls/atl/registrar.c +++ b/dlls/atl/registrar.c @@ -108,63 +108,16 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject) extern HINSTANCE hInst; -static HRESULT do_register_dll_server(IRegistrar *pRegistrar, LPCOLESTR wszDll, - LPCOLESTR wszId, BOOL do_register, - const struct _ATL_REGMAP_ENTRY* pMapEntries) -{ - IRegistrar *registrar; - HRESULT hres; - const struct _ATL_REGMAP_ENTRY *pMapEntry; - - static const WCHAR wszModule[] = {'M','O','D','U','L','E',0}; - static const WCHAR wszRegistry[] = {'R','E','G','I','S','T','R','Y',0}; - - if(pRegistrar) { - registrar = pRegistrar; - }else { - hres = AtlCreateRegistrar(®istrar); - if(FAILED(hres)) - return hres; - } - - IRegistrar_AddReplacement(registrar, wszModule, wszDll); - - for (pMapEntry = pMapEntries; pMapEntry && pMapEntry->szKey; pMapEntry++) - IRegistrar_AddReplacement(registrar, pMapEntry->szKey, pMapEntry->szData); - - if(do_register) - hres = IRegistrar_ResourceRegisterSz(registrar, wszDll, wszId, wszRegistry); - else - hres = IRegistrar_ResourceUnregisterSz(registrar, wszDll, wszId, wszRegistry); - - if(registrar != pRegistrar) - IRegistrar_Release(registrar); - return hres; -} - /*********************************************************************** * AtlModuleUpdateRegistryFromResourceD [ATL.@] * */ HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW* pM, LPCOLESTR lpszRes, - BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries, IRegistrar* pReg) + BOOL bRegister, struct _ATL_REGMAP_ENTRY* pMapEntries, IRegistrar* pReg) { - HINSTANCE lhInst = pM->m_hInst; - /* everything inside this function below this point - * should go into atl71.AtlUpdateRegistryFromResourceD - */ - WCHAR module_name[MAX_PATH]; - - if(!GetModuleFileNameW(lhInst, module_name, MAX_PATH)) { - FIXME("hinst %p: did not get module name\n", - lhInst); - return E_FAIL; - } - - TRACE("%p (%s), %s, %d, %p, %p\n", hInst, debugstr_w(module_name), - debugstr_w(lpszRes), bRegister, pMapEntries, pReg); + TRACE("(%p %s %d %p %p)\n", pM, debugstr_w(lpszRes), bRegister, pMapEntries, pReg); - return do_register_dll_server(pReg, module_name, lpszRes, bRegister, pMapEntries); + return AtlUpdateRegistryFromResourceD(pM->m_hInst, lpszRes, bRegister, pMapEntries, pReg); } /***********************************************************************
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
55
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
Results per page:
10
25
50
100
200