winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1207 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Define common strings only once.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 843382f28472a312c9a5beefa4298f7c4b4a5ccb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=843382f28472a312c9a5beefa…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Oct 15 12:46:27 2009 +0200 msi: Define common strings only once. --- dlls/msi/action.c | 162 +++++++++++++------------------------------------- dlls/msi/appsearch.c | 20 ++---- dlls/msi/classes.c | 13 ---- dlls/msi/cond.y | 1 - dlls/msi/custom.c | 37 +++-------- dlls/msi/database.c | 11 +-- dlls/msi/dialog.c | 19 ++---- dlls/msi/events.c | 4 - dlls/msi/files.c | 11 +--- dlls/msi/helpers.c | 8 +-- dlls/msi/media.c | 5 +- dlls/msi/msi.c | 26 ++------ dlls/msi/msipriv.h | 44 ++++++++++++-- dlls/msi/package.c | 64 ++++++++------------ dlls/msi/registry.c | 10 +--- dlls/msi/source.c | 11 +--- dlls/msi/string.c | 3 +- dlls/msi/table.c | 3 - dlls/msi/upgrade.c | 7 +-- 19 files changed, 145 insertions(+), 314 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=843382f28472a312c9a5b…
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Remove unneeded helper parameter.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: f84a6bdf3ae8b11e9ca40c6e0b38d876f6ea7342 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f84a6bdf3ae8b11e9ca40c6e0…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 15 14:54:23 2009 +0400 comctl32/tooltips: Remove unneeded helper parameter. --- dlls/comctl32/tooltips.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index b6412a8..dba5b3f 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -213,15 +213,12 @@ TOOLTIPS_InitSystemSettings (TOOLTIPS_INFO *infoPtr) /* Custom draw routines */ static void -TOOLTIPS_customdraw_fill(NMTTCUSTOMDRAW *lpnmttcd, - const HWND hwnd, +TOOLTIPS_customdraw_fill(const TOOLTIPS_INFO *infoPtr, NMTTCUSTOMDRAW *lpnmttcd, HDC hdc, const RECT *rcBounds, UINT uFlags) { - TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr(hwnd); - ZeroMemory(lpnmttcd, sizeof(NMTTCUSTOMDRAW)); lpnmttcd->uDrawFlags = uFlags; - lpnmttcd->nmcd.hdr.hwndFrom = hwnd; + lpnmttcd->nmcd.hdr.hwndFrom = infoPtr->hwndSelf; lpnmttcd->nmcd.hdr.code = NM_CUSTOMDRAW; if (infoPtr->nCurrentTool != -1) { TTTOOL_INFO *toolPtr = &infoPtr->tools[infoPtr->nCurrentTool]; @@ -276,7 +273,7 @@ TOOLTIPS_Refresh (const TOOLTIPS_INFO *infoPtr, HDC hdc) /* Custom draw - Call PrePaint once initial properties set up */ /* Note: Contrary to MSDN, CDRF_SKIPDEFAULT still draws a tooltip */ - TOOLTIPS_customdraw_fill(&nmttcd, infoPtr->hwndSelf, hdc, &rc, uFlags); + TOOLTIPS_customdraw_fill(infoPtr, &nmttcd, hdc, &rc, uFlags); cdmode = TOOLTIPS_notify_customdraw(CDDS_PREPAINT, &nmttcd); uFlags = nmttcd.uDrawFlags;
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Remove redundant code, let handlers deal with A<->W conversions.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 38c0d421ecbbfadbb94afbea5da785b44f269b45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38c0d421ecbbfadbb94afbea5…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 15 14:53:28 2009 +0400 comctl32/tooltips: Remove redundant code, let handlers deal with A<->W conversions. --- dlls/comctl32/tooltips.c | 834 +++++++++++----------------------------------- 1 files changed, 203 insertions(+), 631 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=38c0d421ecbbfadbb94af…
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Test the way structure size field is validated.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: f394bed5971be188c5a2d0ca823823a11f52db20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f394bed5971be188c5a2d0ca8…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 15 15:37:06 2009 +0400 comctl32/tooltips: Test the way structure size field is validated. --- dlls/comctl32/tests/tooltips.c | 148 ++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/tooltips.c | 9 +-- 2 files changed, 150 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index ddc162a..4014322 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -23,6 +23,8 @@ #include "wine/test.h" +#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) + static void test_create_tooltip(void) { HWND parent, hwnd; @@ -464,6 +466,152 @@ static void test_ttm_gettoolinfo(void) ok(0xaaaaaaaa == ti.lParam, "Expected 0xaaaaaaaa, got %lx\n", ti.lParam); DestroyWindow(hwnd); + + /* 1. test size parameter validation rules (ansi messages) */ + hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, + 10, 10, 300, 100, + NULL, NULL, NULL, 0); + + ti.cbSize = TTTOOLINFOA_V1_SIZE - 1; + ti.hwnd = NULL; + ti.hinst = GetModuleHandleA(NULL); + ti.uFlags = 0; + ti.uId = 0x1234ABCD; + ti.lpszText = NULL; + ti.lParam = 0xdeadbeef; + GetClientRect(hwnd, &ti.rect); + r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + ti.cbSize = TTTOOLINFOA_V1_SIZE - 1; + ti.hwnd = NULL; + ti.uId = 0x1234ABCD; + SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + ti.cbSize = TTTOOLINFOA_V2_SIZE - 1; + ti.hwnd = NULL; + ti.hinst = GetModuleHandleA(NULL); + ti.uFlags = 0; + ti.uId = 0x1234ABCD; + ti.lpszText = NULL; + ti.lParam = 0xdeadbeef; + GetClientRect(hwnd, &ti.rect); + r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + ti.cbSize = TTTOOLINFOA_V2_SIZE - 1; + ti.hwnd = NULL; + ti.uId = 0x1234ABCD; + SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + ti.cbSize = TTTOOLINFOA_V2_SIZE + 1; + ti.hwnd = NULL; + ti.hinst = GetModuleHandleA(NULL); + ti.uFlags = 0; + ti.uId = 0x1234ABCD; + ti.lpszText = NULL; + ti.lParam = 0xdeadbeef; + GetClientRect(hwnd, &ti.rect); + r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + ti.cbSize = TTTOOLINFOA_V2_SIZE + 1; + ti.hwnd = NULL; + ti.uId = 0x1234ABCD; + SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); + r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + DestroyWindow(hwnd); + + /* 2. test size parameter validation rules (w-messages) */ + hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, + 10, 10, 300, 100, + NULL, NULL, NULL, 0); + if(!hwnd) + { + win_skip("CreateWindowExW() not supported. Skipping.\n"); + return; + } + + tiW.cbSize = TTTOOLINFOW_V1_SIZE - 1; + tiW.hwnd = NULL; + tiW.hinst = GetModuleHandleA(NULL); + tiW.uFlags = 0; + tiW.uId = 0x1234ABCD; + tiW.lpszText = NULL; + tiW.lParam = 0xdeadbeef; + GetClientRect(hwnd, &tiW.rect); + r = SendMessageW(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&tiW); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + tiW.cbSize = TTTOOLINFOW_V1_SIZE - 1; + tiW.hwnd = NULL; + tiW.uId = 0x1234ABCD; + SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + tiW.cbSize = TTTOOLINFOW_V2_SIZE - 1; + tiW.hwnd = NULL; + tiW.hinst = GetModuleHandleA(NULL); + tiW.uFlags = 0; + tiW.uId = 0x1234ABCD; + tiW.lpszText = NULL; + tiW.lParam = 0xdeadbeef; + GetClientRect(hwnd, &tiW.rect); + r = SendMessageW(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&tiW); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + tiW.cbSize = TTTOOLINFOW_V2_SIZE - 1; + tiW.hwnd = NULL; + tiW.uId = 0x1234ABCD; + SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + tiW.cbSize = TTTOOLINFOW_V2_SIZE + 1; + tiW.hwnd = NULL; + tiW.hinst = GetModuleHandleA(NULL); + tiW.uFlags = 0; + tiW.uId = 0x1234ABCD; + tiW.lpszText = NULL; + tiW.lParam = 0xdeadbeef; + GetClientRect(hwnd, &tiW.rect); + r = SendMessageW(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&tiW); + ok(r, "Adding the tool to the tooltip failed\n"); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + /* looks like TTM_DELTOOLW doesn't work with invalid size */ + tiW.cbSize = TTTOOLINFOW_V2_SIZE + 1; + tiW.hwnd = NULL; + tiW.uId = 0x1234ABCD; + SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(1, r); + + tiW.cbSize = TTTOOLINFOW_V2_SIZE; + tiW.hwnd = NULL; + tiW.uId = 0x1234ABCD; + SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); + r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); + expect(0, r); + + DestroyWindow(hwnd); } START_TEST(tooltips) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 05cd0dc..99656d7 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1027,8 +1027,6 @@ TOOLTIPS_AddToolA (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOA *lpToolInfo) if (lpToolInfo == NULL) return FALSE; - if (lpToolInfo->cbSize < TTTOOLINFOA_V1_SIZE) - return FALSE; TRACE("add tool (%p) %p %ld%s!\n", infoPtr->hwndSelf, lpToolInfo->hwnd, lpToolInfo->uId, @@ -1116,8 +1114,6 @@ TOOLTIPS_AddToolW (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo) if (lpToolInfo == NULL) return FALSE; - if (lpToolInfo->cbSize < TTTOOLINFOW_V1_SIZE) - return FALSE; TRACE("add tool (%p) %p %ld%s!\n", infoPtr->hwndSelf, lpToolInfo->hwnd, lpToolInfo->uId, @@ -1279,8 +1275,6 @@ TOOLTIPS_DelToolA (TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOA lpToolInfo) if (lpToolInfo == NULL) return 0; - if (lpToolInfo->cbSize < TTTOOLINFOA_V1_SIZE) - return 0; if (infoPtr->uNumTools == 0) return 0; @@ -1299,7 +1293,8 @@ TOOLTIPS_DelToolW (TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOW lpToolInfo) if (lpToolInfo == NULL) return 0; - if (lpToolInfo->cbSize < TTTOOLINFOW_V1_SIZE) + if (lpToolInfo->cbSize > TTTOOLINFOW_V2_SIZE && + lpToolInfo->cbSize != TTTOOLINFOW_V3_SIZE) return 0; if (infoPtr->uNumTools == 0) return 0;
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Fix an obviously wrong structure size check.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 98a7d8cf9d3c9984af7fec043a07ec73e1383ee3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98a7d8cf9d3c9984af7fec043…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Oct 15 14:49:30 2009 +0400 comctl32/tooltips: Fix an obviously wrong structure size check. --- dlls/comctl32/tests/tooltips.c | 51 ++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/tooltips.c | 30 ++++++++++++----------- include/commctrl.h | 4 +++ 3 files changed, 71 insertions(+), 14 deletions(-) diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index b8c46cb..ddc162a 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -416,6 +416,56 @@ static void test_gettext(void) DestroyWindow(hwnd); } +static void test_ttm_gettoolinfo(void) +{ + TTTOOLINFOA ti; + TTTOOLINFOW tiW; + HWND hwnd; + DWORD r; + + hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, + 10, 10, 300, 100, + NULL, NULL, NULL, 0); + + ti.cbSize = TTTOOLINFOA_V2_SIZE; + ti.hwnd = NULL; + ti.hinst = GetModuleHandleA(NULL); + ti.uFlags = 0; + ti.uId = 0x1234ABCD; + ti.lpszText = NULL; + ti.lParam = 0xdeadbeef; + GetClientRect(hwnd, &ti.rect); + r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); + ok(r, "Adding the tool to the tooltip failed\n"); + + ti.cbSize = TTTOOLINFOA_V2_SIZE; + ti.lParam = 0xaaaaaaaa; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); + ok(r, "Getting tooltip info failed\n"); + ok(0xdeadbeef == ti.lParam, "Expected 0xdeadbeef, got %lx\n", ti.lParam); + + tiW.cbSize = TTTOOLINFOW_V2_SIZE; + tiW.hwnd = NULL; + tiW.uId = 0x1234ABCD; + tiW.lParam = 0xaaaaaaaa; + r = SendMessageA(hwnd, TTM_GETTOOLINFOW, 0, (LPARAM)&tiW); + ok(r, "Getting tooltip info failed\n"); + ok(0xdeadbeef == tiW.lParam, "Expected 0xdeadbeef, got %lx\n", tiW.lParam); + + ti.cbSize = TTTOOLINFOA_V2_SIZE; + ti.uId = 0x1234ABCD; + ti.lParam = 0xaaaaaaaa; + r = SendMessageA(hwnd, TTM_SETTOOLINFOA, 0, (LPARAM)&ti); + + ti.cbSize = TTTOOLINFOA_V2_SIZE; + ti.lParam = 0xdeadbeef; + r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); + ok(r, "Getting tooltip info failed\n"); + ok(0xaaaaaaaa == ti.lParam, "Expected 0xaaaaaaaa, got %lx\n", ti.lParam); + + DestroyWindow(hwnd); +} + START_TEST(tooltips) { InitCommonControls(); @@ -423,4 +473,5 @@ START_TEST(tooltips) test_create_tooltip(); test_customdraw(); test_gettext(); + test_ttm_gettoolinfo(); } diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 54600e8..05cd0dc 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1076,7 +1076,7 @@ TOOLTIPS_AddToolA (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOA *lpToolInfo) } } - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) + if (lpToolInfo->cbSize >= TTTOOLINFOA_V2_SIZE) toolPtr->lParam = lpToolInfo->lParam; /* install subclassing hook */ @@ -1164,7 +1164,7 @@ TOOLTIPS_AddToolW (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo) } } - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW)) + if (lpToolInfo->cbSize >= TTTOOLINFOW_V2_SIZE) toolPtr->lParam = lpToolInfo->lParam; /* install subclassing hook */ @@ -1337,7 +1337,7 @@ TOOLTIPS_EnumToolsA (const TOOLTIPS_INFO *infoPtr, UINT uIndex, LPTTTOOLINFOA lp /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) + if (lpToolInfo->cbSize >= TTTOOLINFOA_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1369,7 +1369,7 @@ TOOLTIPS_EnumToolsW (const TOOLTIPS_INFO *infoPtr, UINT uIndex, LPTTTOOLINFOW lp /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW)) + if (lpToolInfo->cbSize >= TTTOOLINFOW_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1416,7 +1416,7 @@ TOOLTIPS_GetCurrentToolA (const TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOA lpToolInfo /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) + if (lpToolInfo->cbSize >= TTTOOLINFOA_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1448,7 +1448,7 @@ TOOLTIPS_GetCurrentToolW (const TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOW lpToolInfo /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW)) + if (lpToolInfo->cbSize >= TTTOOLINFOW_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1602,7 +1602,7 @@ TOOLTIPS_GetToolInfoA (const TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOA lpToolInfo) /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) + if (lpToolInfo->cbSize >= TTTOOLINFOA_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1637,7 +1637,7 @@ TOOLTIPS_GetToolInfoW (const TOOLTIPS_INFO *infoPtr, LPTTTOOLINFOW lpToolInfo) /* lpToolInfo->lpszText = toolPtr->lpszText; */ lpToolInfo->lpszText = NULL; /* FIXME */ - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW)) + if (lpToolInfo->cbSize >= TTTOOLINFOW_V2_SIZE) lpToolInfo->lParam = toolPtr->lParam; return TRUE; @@ -1660,7 +1660,7 @@ TOOLTIPS_HitTestA (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOA lptthit) TRACE("tool %d!\n", nTool); /* copy tool data */ - if (lptthit->ti.cbSize >= sizeof(TTTOOLINFOA)) { + if (lptthit->ti.cbSize >= TTTOOLINFOA_V1_SIZE) { toolPtr = &infoPtr->tools[nTool]; lptthit->ti.uFlags = toolPtr->uFlags; @@ -1670,7 +1670,8 @@ TOOLTIPS_HitTestA (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOA lptthit) lptthit->ti.hinst = toolPtr->hinst; /* lptthit->ti.lpszText = toolPtr->lpszText; */ lptthit->ti.lpszText = NULL; /* FIXME */ - lptthit->ti.lParam = toolPtr->lParam; + if (lptthit->ti.cbSize >= TTTOOLINFOA_V2_SIZE) + lptthit->ti.lParam = toolPtr->lParam; } return TRUE; @@ -1693,7 +1694,7 @@ TOOLTIPS_HitTestW (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit) TRACE("tool %d!\n", nTool); /* copy tool data */ - if (lptthit->ti.cbSize >= sizeof(TTTOOLINFOW)) { + if (lptthit->ti.cbSize >= TTTOOLINFOW_V1_SIZE) { toolPtr = &infoPtr->tools[nTool]; lptthit->ti.uFlags = toolPtr->uFlags; @@ -1703,7 +1704,8 @@ TOOLTIPS_HitTestW (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit) lptthit->ti.hinst = toolPtr->hinst; /* lptthit->ti.lpszText = toolPtr->lpszText; */ lptthit->ti.lpszText = NULL; /* FIXME */ - lptthit->ti.lParam = toolPtr->lParam; + if (lptthit->ti.cbSize >= TTTOOLINFOW_V2_SIZE) + lptthit->ti.lParam = toolPtr->lParam; } return TRUE; @@ -2018,7 +2020,7 @@ TOOLTIPS_SetToolInfoA (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOA *lpToolInfo) } } - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOA)) + if (lpToolInfo->cbSize >= TTTOOLINFOA_V2_SIZE) toolPtr->lParam = lpToolInfo->lParam; return 0; @@ -2072,7 +2074,7 @@ TOOLTIPS_SetToolInfoW (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo) } } - if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW)) + if (lpToolInfo->cbSize >= TTTOOLINFOW_V2_SIZE) toolPtr->lParam = lpToolInfo->lParam; if (infoPtr->nCurrentTool == nTool) diff --git a/include/commctrl.h b/include/commctrl.h index 2add8b8..f2ea3ae 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -1774,6 +1774,10 @@ typedef struct tagTOOLINFOW { #define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText) #define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText) #define TTTOOLINFO_V1_SIZE CCSIZEOF_STRUCT(WINELIB_NAME_AW(TTTOOLINFO), lpszText) +#define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam) +#define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam) +#define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved) +#define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved) typedef struct _TT_HITTESTINFOA {
1
0
0
0
Stefan Dösinger : opengl32: Give wglSwapBuffers a real function, make it hookable.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 49012919905d2ace7dd6f2546b78780f54a58735 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49012919905d2ace7dd6f2546…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Oct 14 23:20:20 2009 +0200 opengl32: Give wglSwapBuffers a real function, make it hookable. --- dlls/opengl32/make_opengl | 2 +- dlls/opengl32/opengl32.spec | 2 +- dlls/opengl32/wgl.c | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index a1bd02b..c98cd45 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -665,7 +665,7 @@ print SPEC "@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat @ stdcall wglSetLayerPaletteEntries(long long long long ptr) @ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat @ stdcall wglShareLists(long long) gdi32.wglShareLists -@ stdcall wglSwapBuffers(long) gdi32.SwapBuffers +@ stdcall wglSwapBuffers(long) @ stdcall wglSwapLayerBuffers(long long) @ stdcall wglUseFontBitmapsA(long long long long) gdi32.wglUseFontBitmapsA @ stdcall wglUseFontBitmapsW(long long long long) gdi32.wglUseFontBitmapsW diff --git a/dlls/opengl32/opengl32.spec b/dlls/opengl32/opengl32.spec index a965771..238b12a 100644 --- a/dlls/opengl32/opengl32.spec +++ b/dlls/opengl32/opengl32.spec @@ -352,7 +352,7 @@ @ stdcall wglSetLayerPaletteEntries(long long long long ptr) @ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat @ stdcall wglShareLists(long long) gdi32.wglShareLists -@ stdcall wglSwapBuffers(long) gdi32.SwapBuffers +@ stdcall wglSwapBuffers(long) @ stdcall wglSwapLayerBuffers(long long) @ stdcall wglUseFontBitmapsA(long long long long) gdi32.wglUseFontBitmapsA @ stdcall wglUseFontBitmapsW(long long long long) gdi32.wglUseFontBitmapsW diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 34f7f07..f6cf469 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -690,6 +690,13 @@ void WINAPI wine_glGetIntegerv( GLenum pname, GLint* params ) wine_wgl.p_wglGetIntegerv(pname, params); } +/*********************************************************************** + * wglSwapBuffers (OPENGL32.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH wglSwapBuffers( HDC hdc ) +{ + return SwapBuffers(hdc); +} /* This is for brain-dead applications that use OpenGL functions before even creating a rendering context.... */
1
0
0
0
Alexandre Julliard : setupapi: Add support for specifying a fake dll source as '-' to delete it.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 777a30b997abf5ffa4d61893487056ce56b88451 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=777a30b997abf5ffa4d618934…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 15 14:05:46 2009 +0200 setupapi: Add support for specifying a fake dll source as '-' to delete it. --- dlls/setupapi/fakedll.c | 8 +++++++- tools/wine.inf.in | 1 + 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index 6397950..3b5a47c 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -597,7 +597,13 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) if (!(h = create_dest_file( name ))) return TRUE; /* not a fake dll */ if (h == INVALID_HANDLE_VALUE) return FALSE; - if ((buffer = load_fake_dll( source, &size ))) + if (source[0] == '-' && !source[1]) + { + /* '-' source means delete the file */ + TRACE( "deleting %s\n", debugstr_w(name) ); + ret = FALSE; + } + else if ((buffer = load_fake_dll( source, &size ))) { DWORD written; diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 9f0a2de..6e2df39 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2455,6 +2455,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,dosx.exe 11,,dsound.vxd 11,,notepad.exe +11,,winetest.exe,- 11,,winhlp32.exe 12,,mountmgr.sys 16422,Internet Explorer,iexplore.exe
1
0
0
0
Alexandre Julliard : setupapi: Maintain a list of fake dlls that have been created already.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: c94e69c7ff58b74709b0ff68afca1adae278ea59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c94e69c7ff58b74709b0ff68a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 15 13:31:24 2009 +0200 setupapi: Maintain a list of fake dlls that have been created already. --- dlls/setupapi/fakedll.c | 75 ++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 67 insertions(+), 8 deletions(-) diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index 4dd88d7..fa89ace 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -52,6 +52,9 @@ static const unsigned int section_alignment = 4096; static void *file_buffer; static size_t file_buffer_size; +static unsigned int handled_count; +static unsigned int handled_total; +static char **handled_dlls; struct dll_info { @@ -108,6 +111,66 @@ static inline void add_directory( struct dll_info *info, unsigned int idx, DWORD info->nt->OptionalHeader.DataDirectory[idx].Size = size; } +/* convert a dll name W->A without depending on the current codepage */ +static char *dll_name_WtoA( char *nameA, const WCHAR *nameW, unsigned int len ) +{ + unsigned int i; + + for (i = 0; i < len; i++) + { + char c = nameW[i]; + if (nameW[i] > 127) return NULL; + if (c >= 'A' && c <= 'Z') c += 'a' - 'A'; + nameA[i] = c; + } + nameA[i] = 0; + return nameA; +} + +/* add a dll to the list of dll that have been taken care of */ +static BOOL add_handled_dll( const WCHAR *name ) +{ + unsigned int len = strlenW( name ); + int i, min, max, pos, res; + char *nameA; + + if (!(nameA = HeapAlloc( GetProcessHeap(), 0, len + 1 ))) return FALSE; + if (!dll_name_WtoA( nameA, name, len )) goto failed; + + min = 0; + max = handled_count - 1; + while (min <= max) + { + pos = (min + max) / 2; + res = strcmp( handled_dlls[pos], nameA ); + if (!res) goto failed; /* already in the list */ + if (res < 0) min = pos + 1; + else max = pos - 1; + } + + if (handled_count >= handled_total) + { + char **new_dlls; + unsigned int new_count = max( 64, handled_total * 2 ); + + if (handled_dlls) new_dlls = HeapReAlloc( GetProcessHeap(), 0, handled_dlls, + new_count * sizeof(*handled_dlls) ); + else new_dlls = HeapAlloc( GetProcessHeap(), 0, new_count * sizeof(*handled_dlls) ); + if (!new_dlls) goto failed; + handled_dlls = new_dlls; + handled_total = new_count; + } + + for (i = handled_count; i > min; i--) handled_dlls[i] = handled_dlls[i - 1]; + handled_dlls[i] = nameA; + handled_count++; + return TRUE; + +failed: + HeapFree( GetProcessHeap(), 0, nameA ); + return FALSE; +} + /* read in the contents of a file into the global file buffer */ /* return 1 on success, 0 on nonexistent file, -1 on other error */ static int read_file( const char *name, void **data, size_t *size ) @@ -320,14 +383,7 @@ static void *load_fake_dll( const WCHAR *name, size_t *size ) len = strlenW( name ); pos = maxlen - len - sizeof(".fake"); - for (i = 0; i < len; i++) - { - /* we don't want to depend on the current codepage here */ - char c = name[i]; - if (name[i] > 127) goto done; - if (c >= 'A' && c <= 'Z') c += 'a' - 'A'; - file[pos + i] = c; - } + if (!dll_name_WtoA( file + pos, name, len )) goto done; file[--pos] = '/'; if (build_dir) @@ -415,6 +471,7 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) create_directories( name ); return TRUE; } + add_handled_dll( filename ); if (!(h = create_dest_file( name ))) return TRUE; /* not a fake dll */ if (h == INVALID_HANDLE_VALUE) return FALSE; @@ -445,4 +502,6 @@ void cleanup_fake_dlls(void) { HeapFree( GetProcessHeap(), 0, file_buffer ); file_buffer = NULL; + HeapFree( GetProcessHeap(), 0, handled_dlls ); + handled_count = handled_total = 0; }
1
0
0
0
Alexandre Julliard : setupapi: Add support for using a wildcard in fake dll creation.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 7acd74ee0743974b5e500f43d340560899ba9eee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7acd74ee0743974b5e500f43d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 15 13:53:14 2009 +0200 setupapi: Add support for using a wildcard in fake dll creation. This creates fake dlls for all the files we can't find and that haven't been created already. --- dlls/setupapi/fakedll.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++ tools/wine.inf.in | 78 +----------------------------- 2 files changed, 123 insertions(+), 76 deletions(-) diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index fa89ace..6397950 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -23,6 +23,9 @@ #include <stdarg.h> #include <fcntl.h> +#ifdef HAVE_DIRENT_H +# include <dirent.h> +#endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif @@ -49,6 +52,7 @@ static const char fakedll_signature[] = "Wine placeholder DLL"; static const unsigned int file_alignment = 512; static const unsigned int section_alignment = 4096; +static const unsigned int max_dll_name_len = 64; static void *file_buffer; static size_t file_buffer_size; @@ -127,6 +131,16 @@ static char *dll_name_WtoA( char *nameA, const WCHAR *nameW, unsigned int len ) return nameA; } +/* convert a dll name A->W without depending on the current codepage */ +static WCHAR *dll_name_AtoW( WCHAR *nameW, const char *nameA, unsigned int len ) +{ + unsigned int i; + + for (i = 0; i < len; i++) nameW[i] = nameA[i]; + nameW[i] = 0; + return nameW; +} + /* add a dll to the list of dll that have been taken care of */ static BOOL add_handled_dll( const WCHAR *name ) { @@ -451,6 +465,111 @@ static HANDLE create_dest_file( const WCHAR *name ) return h; } +/* copy a fake dll file to the dest directory */ +static void install_fake_dll( WCHAR *dest, char *file, const char *ext ) +{ + int ret; + size_t size; + void *data; + DWORD written; + WCHAR *destname = dest + strlenW(dest); + char *name = strrchr( file, '/' ) + 1; + char *end = name + strlen(name); + + if (ext) strcpy( end, ext ); + if (!(ret = read_file( file, &data, &size ))) return; + + if (end > name + 2 && !strncmp( end - 2, "16", 2 )) end -= 2; /* remove "16" suffix */ + dll_name_AtoW( destname, name, end - name ); + if (!add_handled_dll( destname )) ret = -1; + + if (ret != -1) + { + HANDLE h = create_dest_file( dest ); + + if (h && h != INVALID_HANDLE_VALUE) + { + TRACE( "%s -> %s\n", debugstr_a(file), debugstr_w(dest) ); + + ret = (WriteFile( h, data, size, &written, NULL ) && written == size); + if (!ret) ERR( "failed to write to %s (error=%u)\n", debugstr_w(dest), GetLastError() ); + CloseHandle( h ); + if (!ret) DeleteFileW( dest ); + } + } + *destname = 0; /* restore it for next file */ +} + +/* find and install all fake dlls in a given lib directory */ +static void install_lib_dir( WCHAR *dest, char *file, const char *default_ext ) +{ + DIR *dir; + struct dirent *de; + char *name; + + if (!(dir = opendir( file ))) return; + name = file + strlen(file); + *name++ = '/'; + while ((de = readdir( dir ))) + { + if (strlen( de->d_name ) > max_dll_name_len) continue; + if (!strcmp( de->d_name, "." )) continue; + if (!strcmp( de->d_name, ".." )) continue; + strcpy( name, de->d_name ); + if (default_ext) /* inside build dir */ + { + strcat( name, "/" ); + strcat( name, de->d_name ); + if (!strchr( de->d_name, '.' )) strcat( name, default_ext ); + install_fake_dll( dest, file, ".fake" ); + } + else install_fake_dll( dest, file, NULL ); + } + closedir( dir ); +} + +/* create fake dlls in dirname for all the files we can find */ +static BOOL create_wildcard_dlls( const WCHAR *dirname ) +{ + const char *build_dir = wine_get_build_dir(); + const char *path; + unsigned int i, maxlen = 0; + char *file; + WCHAR *dest; + + if (build_dir) maxlen = strlen(build_dir) + sizeof("/programs/"); + for (i = 0; (path = wine_dll_enum_load_path(i)); i++) maxlen = max( maxlen, strlen(path) ); + maxlen += 2 * max_dll_name_len + 2 + sizeof(".dll.fake"); + if (!(file = HeapAlloc( GetProcessHeap(), 0, maxlen ))) return FALSE; + + if (!(dest = HeapAlloc( GetProcessHeap(), 0, (strlenW(dirname) + max_dll_name_len) * sizeof(WCHAR) ))) + { + HeapFree( GetProcessHeap(), 0, file ); + return FALSE; + } + strcpyW( dest, dirname ); + dest[strlenW(dest) - 1] = 0; /* remove wildcard */ + + if (build_dir) + { + strcpy( file, build_dir ); + strcat( file, "/dlls" ); + install_lib_dir( dest, file, ".dll" ); + strcpy( file, build_dir ); + strcat( file, "/programs" ); + install_lib_dir( dest, file, ".exe" ); + } + for (i = 0; (path = wine_dll_enum_load_path( i )); i++) + { + strcpy( file, path ); + strcat( file, "/fakedlls" ); + install_lib_dir( dest, file, NULL ); + } + HeapFree( GetProcessHeap(), 0, file ); + HeapFree( GetProcessHeap(), 0, dest ); + return TRUE; +} + /*********************************************************************** * create_fake_dll */ @@ -471,6 +590,8 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) create_directories( name ); return TRUE; } + if (filename[0] == '*' && !filename[1]) return create_wildcard_dlls( name ); + add_handled_dll( filename ); if (!(h = create_dest_file( name ))) return TRUE; /* not a fake dll */ diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 6b6acf9..9f0a2de 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2446,93 +2446,19 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 10,,hh.exe 10,,notepad.exe 10,,regedit.exe +10,,twain.dll,twain.dll16 10,,twain_32.dll 10,,winhelp.exe,winhelp.exe16 10,,winhlp32.exe 10,command,start.exe -11,,actxprxy.dll -11,,advapi32.dll -11,,advpack.dll -11,,appwiz.cpl -11,,cabinet.dll -11,,cmd.exe -11,,comctl32.dll -11,,comdlg32.dll -11,,control.exe -11,,crypt32.dll -11,,d3d8.dll -11,,d3d9.dll -11,,dbghelp.dll -11,,ddeml.dll,ddeml.dll16 11,,ddhelp.exe -11,,ddraw.dll -11,,dinput8.dll 11,,dosx.exe -11,,dsound.dll 11,,dsound.vxd -11,,dxdiagn.dll -11,,gdi32.dll -11,,glu32.dll -11,,hal.dll -11,,hhctrl.ocx -11,,imaadp32.acm -11,,imagehlp.dll -11,,itircl.dll -11,,itss.dll -11,,kernel32.dll -11,,mapi32.dll -11,,msadp32.acm -11,,msg711.acm -11,,msgsm32.acm -11,,mshtml.dll -11,,msi.dll -11,,msiexec.exe -11,,msvcrt.dll -11,,msxml3.dll 11,,notepad.exe -11,,ntdll.dll -11,,ntoskrnl.exe -11,,ole32.dll -11,,oleaut32.dll -11,,oledlg.dll -11,,olepro32.dll -11,,opengl32.dll -11,,progman.exe -11,,psapi.dll -11,,pstorec.dll -11,,quartz.dll -11,,regsvr32.exe -11,,reg.exe -11,,riched20.dll -11,,riched32.dll -11,,rpcrt4.dll -11,,rsabase.dll -11,,rsaenh.dll -11,,rundll32.exe -11,,schannel.dll -11,,sensapi.dll -11,,setupapi.dll -11,,shdocvw.dll -11,,shell32.dll -11,,shfolder.dll -11,,shlwapi.dll -11,,stdole2.tlb -11,,urlmon.dll -11,,user32.dll -11,,version.dll -11,,windowscodecs.dll -11,,winebrowser.exe 11,,winhlp32.exe -11,,wininet.dll -11,,winmm.dll -11,,winspool.drv -11,,wintab32.dll -11,,winver.exe -11,,wordpad.exe -11,,ws2_32.dll -11,,wsock32.dll 12,,mountmgr.sys 16422,Internet Explorer,iexplore.exe +11,,* [SystemIni] system.ini, mci,,"MPEGVideo=mciqtz32.dll"
1
0
0
0
Alexandre Julliard : setupapi: Abstract the creation of the fake dll destination to a separate function.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: d59a4d189459cff999a60b36e7db7f556c292a26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d59a4d189459cff999a60b36e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 15 12:25:11 2009 +0200 setupapi: Abstract the creation of the fake dll destination to a separate function. --- dlls/setupapi/fakedll.c | 51 +++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 21 deletions(-) diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index 2f9f80c..4dd88d7 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -367,32 +367,18 @@ done: return NULL; } -/*********************************************************************** - * create_fake_dll - */ -BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) +/* create the fake dll destination file */ +static HANDLE create_dest_file( const WCHAR *name ) { - HANDLE h; - BOOL ret; - unsigned int size = 0; - void *buffer; - - /* check for empty name which means to only create the directory */ - if (name[strlenW(name) - 1] == '\\') - { - create_directories( name ); - return TRUE; - } - /* first check for an existing file */ - h = CreateFileW( name, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); + HANDLE h = CreateFileW( name, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); if (h != INVALID_HANDLE_VALUE) { if (!is_fake_dll( h )) { TRACE( "%s is not a fake dll, not overwriting it\n", debugstr_w(name) ); CloseHandle( h ); - return TRUE; + return 0; } /* truncate the file */ SetFilePointer( h, 0, NULL, FILE_BEGIN ); @@ -404,11 +390,34 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) h = CreateFileW( name, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL ); if (h == INVALID_HANDLE_VALUE) - { ERR( "failed to create %s (error=%u)\n", debugstr_w(name), GetLastError() ); - return FALSE; - } } + return h; +} + +/*********************************************************************** + * create_fake_dll + */ +BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) +{ + HANDLE h; + BOOL ret; + size_t size; + const WCHAR *filename; + void *buffer; + + if (!(filename = strrchrW( name, '\\' ))) filename = name; + else filename++; + + /* check for empty name which means to only create the directory */ + if (!filename[0]) + { + create_directories( name ); + return TRUE; + } + + if (!(h = create_dest_file( name ))) return TRUE; /* not a fake dll */ + if (h == INVALID_HANDLE_VALUE) return FALSE; if ((buffer = load_fake_dll( source, &size ))) {
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
121
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
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200