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 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
1233 discussions
Start a n
N
ew thread
Hans Leidekker : wininet: Avoid test failures on win9x.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: d4a7a9d43dad1e63d411f3e7454948a7256115f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4a7a9d43dad1e63d411f3e74…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Dec 22 14:32:56 2009 +0100 wininet: Avoid test failures on win9x. --- dlls/wininet/tests/http.c | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 345172c..5d57549 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -1754,7 +1754,7 @@ static DWORD CALLBACK server_thread(LPVOID param) static void test_basic_request(int port, const char *verb, const char *url) { HINTERNET hi, hc, hr; - DWORD r, count, error; + DWORD r, count; char buffer[0x100]; hi = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); @@ -1766,11 +1766,8 @@ static void test_basic_request(int port, const char *verb, const char *url) hr = HttpOpenRequest(hc, verb, url, NULL, NULL, NULL, 0, 0); ok(hr != NULL, "HttpOpenRequest failed\n"); - SetLastError(0xdeadbeef); r = HttpSendRequest(hr, NULL, 0, NULL, 0); - error = GetLastError(); ok(r, "HttpSendRequest failed\n"); - ok(error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", error); count = 0; memset(buffer, 0, sizeof buffer); @@ -1784,6 +1781,32 @@ static void test_basic_request(int port, const char *verb, const char *url) InternetCloseHandle(hi); } +static void test_last_error(int port) +{ + HINTERNET hi, hc, hr; + DWORD error; + BOOL r; + + hi = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + ok(hi != NULL, "open failed\n"); + + hc = InternetConnect(hi, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); + ok(hc != NULL, "connect failed\n"); + + hr = HttpOpenRequest(hc, NULL, "/test1", NULL, NULL, NULL, 0, 0); + ok(hr != NULL, "HttpOpenRequest failed\n"); + + SetLastError(0xdeadbeef); + r = HttpSendRequest(hr, NULL, 0, NULL, 0); + error = GetLastError(); + ok(r, "HttpSendRequest failed\n"); + ok(error == ERROR_SUCCESS || broken(error != ERROR_SUCCESS), "expected ERROR_SUCCESS, got %u\n", error); + + InternetCloseHandle(hr); + InternetCloseHandle(hc); + InternetCloseHandle(hi); +} + static void test_proxy_indirect(int port) { HINTERNET hi, hc, hr; @@ -2427,6 +2450,7 @@ static void test_http_connection(void) test_response_without_headers(si.port); test_HttpQueryInfo(si.port); test_HttpSendRequestW(si.port); + test_last_error(si.port); /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, "GET", "/quit");
1
0
0
0
Paul Vriens : comctl32/tests: Fix a test failure on older comctl32.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: f0a35db253f23c57ed7417bf30044959e6fd07ac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0a35db253f23c57ed7417bf3…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Dec 22 14:23:46 2009 +0100 comctl32/tests: Fix a test failure on older comctl32. --- dlls/comctl32/tests/progress.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c index 10bbbef..3083e8b 100644 --- a/dlls/comctl32/tests/progress.c +++ b/dlls/comctl32/tests/progress.c @@ -163,6 +163,7 @@ static void cleanup(void) static void test_redraw(void) { RECT client_rect; + LRESULT ret; SendMessageA(hProgressWnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0); @@ -184,7 +185,11 @@ static void test_redraw(void) /* PBM_STEPIT */ ok(SendMessageA(hProgressWnd, PBM_STEPIT, 0, 0) == 80, "PBM_STEPIT must return the previous position\n"); ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_STEPIT: The progress bar should be redrawn immediately\n"); - ok((UINT)SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0) == 100, "PBM_GETPOS returned a wrong position\n"); + ret = SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0); + if (ret == 0) + win_skip("PBM_GETPOS needs comctl32 > 4.70\n"); + else + ok(ret == 100, "PBM_GETPOS returned a wrong position : %d\n", (UINT)ret); /* PBM_SETRANGE and PBM_SETRANGE32: Usually the progress bar doesn't repaint itself immediately. If the
1
0
0
0
Detlef Riekenberg : mstask/tests: Skip some tests when the service is not running.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: dc2868084758a72877c5befc420c7ffd7c52cd84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc2868084758a72877c5befc4…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Tue Dec 22 14:01:22 2009 +0100 mstask/tests: Skip some tests when the service is not running. --- dlls/mstask/tests/task.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index b9dee35..82df6dd 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -427,7 +427,7 @@ static void test_SetAccountInformation_GetAccountInformation(void) /* WinXP returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): 0x80070002 but * Win2K returns SCHED_E_CANNOT_OPEN_TASK: 0x8004130d * Win9x doesn't support security services */ - if (hres == SCHED_E_NO_SECURITY_SERVICES) + if (hres == SCHED_E_NO_SECURITY_SERVICES || hres == SCHED_E_SERVICE_NOT_RUNNING) { win_skip("Security services are not supported\n"); cleanup_task();
1
0
0
0
Eric Pouech : dbghelp: Generalize helper to get a string from an ADDRESS64.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: 2d85d5c2355ab53f1294646abdfdf4a60a48246a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d85d5c2355ab53f1294646ab…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Dec 22 14:20:59 2009 +0100 dbghelp: Generalize helper to get a string from an ADDRESS64. --- dlls/dbghelp/dbghelp.c | 18 ++++++++++++++++++ dlls/dbghelp/dbghelp_private.h | 1 + dlls/dbghelp/stack.c | 18 ------------------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 1fe829a..8381735 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -133,6 +133,24 @@ void* fetch_buffer(struct process* pcs, unsigned size) return pcs->buffer; } +const char* wine_dbgstr_addr(const ADDRESS64* addr) +{ + if (!addr) return "(null)"; + switch (addr->Mode) + { + case AddrModeFlat: + return wine_dbg_sprintf("flat<%s>", wine_dbgstr_longlong(addr->Offset)); + case AddrMode1616: + return wine_dbg_sprintf("1616<%04x:%04x>", addr->Segment, (DWORD)addr->Offset); + case AddrMode1632: + return wine_dbg_sprintf("1632<%04x:%08x>", addr->Segment, (DWORD)addr->Offset); + case AddrModeReal: + return wine_dbg_sprintf("real<%04x:%04x>", addr->Segment, (DWORD)addr->Offset); + default: + return "unknown"; + } +} + /****************************************************************** * SymSetSearchPathW (DBGHELP.@) * diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index b793d14..538086f 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -425,6 +425,7 @@ extern HANDLE hMsvcrt; extern BOOL validate_addr64(DWORD64 addr); extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* data); extern void* fetch_buffer(struct process* pcs, unsigned size); +extern const char* wine_dbgstr_addr(const ADDRESS64* addr); /* crc32.c */ extern DWORD calc_crc32(int fd); diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c index 82b38cc..f83d35c 100644 --- a/dlls/dbghelp/stack.c +++ b/dlls/dbghelp/stack.c @@ -38,24 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); enum st_mode {stm_start, stm_32bit, stm_16bit, stm_done}; -static const char* wine_dbgstr_addr(const ADDRESS64* addr) -{ - if (!addr) return "(null)"; - switch (addr->Mode) - { - case AddrModeFlat: - return wine_dbg_sprintf("flat<%s>", wine_dbgstr_longlong(addr->Offset)); - case AddrMode1616: - return wine_dbg_sprintf("1616<%04x:%04x>", addr->Segment, (DWORD)addr->Offset); - case AddrMode1632: - return wine_dbg_sprintf("1632<%04x:%08x>", addr->Segment, (DWORD)addr->Offset); - case AddrModeReal: - return wine_dbg_sprintf("real<%04x:%04x>", addr->Segment, (DWORD)addr->Offset); - default: - return "unknown"; - } -} - static DWORD64 WINAPI addr_to_linear(HANDLE hProcess, HANDLE hThread, ADDRESS64* addr) { LDT_ENTRY le;
1
0
0
0
Eric Pouech : dbghelp: Rewrote stack_walk with 64 bit structures.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: fdc86c199982adfa5fcddfbd86cc550a749838a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdc86c199982adfa5fcddfbd8…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Dec 22 14:20:49 2009 +0100 dbghelp: Rewrote stack_walk with 64 bit structures. --- dlls/dbghelp/stack.c | 168 ++++++++++++++++++++++++++------------------------ 1 files changed, 88 insertions(+), 80 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fdc86c199982adfa5fcdd…
1
0
0
0
Eric Pouech : winedbg: Fix for stack symbols on 64bit platform.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: 4c661dc822a7aa877668d8c4bda666bbb81d0538 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c661dc822a7aa877668d8c4b…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Dec 22 14:20:38 2009 +0100 winedbg: Fix for stack symbols on 64bit platform. --- programs/winedbg/symbol.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c index ca2feee..1e32bc6 100644 --- a/programs/winedbg/symbol.c +++ b/programs/winedbg/symbol.c @@ -85,7 +85,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base, if (!memory_get_register(sym->Register, &pval, buffer, sz)) return FALSE; lvalue->cookie = DLV_TARGET; - lvalue->addr.Offset = (ULONG)((ULONG64)*pval + sym->Address); + lvalue->addr.Offset = (ULONG64)*pval + sym->Address; } else if (sym->Flags & SYMFLAG_VALUEPRESENT) {
1
0
0
0
Eric Pouech : winedbg: Ensure the stack pointer is also passed to StackWalk .
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: afcd3a6b1a1c7c8ebdc640e9647534bbf9c0f252 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=afcd3a6b1a1c7c8ebdc640e96…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Dec 22 14:20:27 2009 +0100 winedbg: Ensure the stack pointer is also passed to StackWalk. --- programs/winedbg/stack.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c index f448e8b..40e6dae 100644 --- a/programs/winedbg/stack.c +++ b/programs/winedbg/stack.c @@ -178,6 +178,7 @@ unsigned stack_fetch_frames(void) memset(&sf, 0, sizeof(sf)); memory_get_current_frame(&sf.AddrFrame); memory_get_current_pc(&sf.AddrPC); + memory_get_current_stack(&sf.AddrStack); /* don't confuse StackWalk by passing in inconsistent addresses */ if ((sf.AddrPC.Mode == AddrModeFlat) && (sf.AddrFrame.Mode != AddrModeFlat))
1
0
0
0
Eric Pouech : winedbg: Push the correct machine type to StackWalk.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: a775d41c105d32338251bb1fcb823dcc031e3746 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a775d41c105d32338251bb1fc…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Dec 22 14:20:16 2009 +0100 winedbg: Push the correct machine type to StackWalk. --- programs/winedbg/be_alpha.c | 1 + programs/winedbg/be_cpu.h | 1 + programs/winedbg/be_i386.c | 1 + programs/winedbg/be_ppc.c | 1 + programs/winedbg/be_x86_64.c | 1 + programs/winedbg/stack.c | 2 +- 6 files changed, 6 insertions(+), 1 deletions(-) diff --git a/programs/winedbg/be_alpha.c b/programs/winedbg/be_alpha.c index 8ced1d6..57bdfd1 100644 --- a/programs/winedbg/be_alpha.c +++ b/programs/winedbg/be_alpha.c @@ -151,6 +151,7 @@ static int be_alpha_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_alpha = { + IMAGE_FILE_MACHINE_ALPHA, be_cpu_linearize, be_cpu_build_addr, be_alpha_get_addr, diff --git a/programs/winedbg/be_cpu.h b/programs/winedbg/be_cpu.h index 8ce79d1..6679977 100644 --- a/programs/winedbg/be_cpu.h +++ b/programs/winedbg/be_cpu.h @@ -23,6 +23,7 @@ enum be_xpoint_type {be_xpoint_break, be_xpoint_watch_exec, be_xpoint_watch_read be_xpoint_watch_write}; struct backend_cpu { + DWORD machine; /* ------------------------------------------------------------------------------ * address manipulation * ------------------------------------------------------------------------------ */ diff --git a/programs/winedbg/be_i386.c b/programs/winedbg/be_i386.c index e3e7a81..e805a80 100644 --- a/programs/winedbg/be_i386.c +++ b/programs/winedbg/be_i386.c @@ -746,6 +746,7 @@ static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_i386 = { + IMAGE_FILE_MACHINE_I386, be_i386_linearize, be_i386_build_addr, be_i386_get_addr, diff --git a/programs/winedbg/be_ppc.c b/programs/winedbg/be_ppc.c index bff1571..9ba9994 100644 --- a/programs/winedbg/be_ppc.c +++ b/programs/winedbg/be_ppc.c @@ -175,6 +175,7 @@ static int be_ppc_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_ppc = { + IMAGE_FILE_MACHINE_POWERPC, be_cpu_linearize, be_cpu_build_addr, be_ppc_get_addr, diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c index 2f58c88..1ef52b8 100644 --- a/programs/winedbg/be_x86_64.c +++ b/programs/winedbg/be_x86_64.c @@ -376,6 +376,7 @@ static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, struct backend_cpu be_x86_64 = { + IMAGE_FILE_MACHINE_AMD64, be_cpu_linearize, be_cpu_build_addr, be_x86_64_get_addr, diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c index c80e5c3..f448e8b 100644 --- a/programs/winedbg/stack.c +++ b/programs/winedbg/stack.c @@ -186,7 +186,7 @@ unsigned stack_fetch_frames(void) sf.AddrFrame.Mode = AddrModeFlat; } - while (StackWalk64(IMAGE_FILE_MACHINE_I386, dbg_curr_process->handle, + while (StackWalk64(be_cpu->machine, dbg_curr_process->handle, dbg_curr_thread->handle, &sf, &ctx, stack_read_mem, SymFunctionTableAccess64, SymGetModuleBase64, NULL)) {
1
0
0
0
Alexandre Julliard : user32: Get rid of the 16-bit dialog heap.
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: b615656f0093cd7d9f3af5a6bdf9727cd92883dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b615656f0093cd7d9f3af5a6b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 15:18:30 2009 +0100 user32: Get rid of the 16-bit dialog heap. Edit controls don't allocate memory on the 16-bit heap anyway. --- dlls/user32/controls.h | 1 - dlls/user32/defdlg.c | 7 ------- dlls/user32/dialog.c | 1 - dlls/user32/dialog16.c | 16 ---------------- 4 files changed, 0 insertions(+), 25 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index c3fd4ec..f9752ee 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -231,7 +231,6 @@ typedef struct tagDIALOGINFO UINT yBaseUnit; INT idResult; /* EndDialog() result / default pushbutton ID */ UINT flags; /* EndDialog() called for this dialog */ - HGLOBAL16 hDialogHeap; } DIALOGINFO; #define DF_END 0x0001 diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c index 3db59ad..faf5026 100644 --- a/dlls/user32/defdlg.c +++ b/dlls/user32/defdlg.c @@ -234,12 +234,6 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam, { WND *wndPtr; - /* Free dialog heap (if created) */ - if (dlgInfo->hDialogHeap) - { - GlobalUnlock16(dlgInfo->hDialogHeap); - GlobalFree16(dlgInfo->hDialogHeap); - } if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont ); if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu ); HeapFree( GetProcessHeap(), 0, dlgInfo ); @@ -347,7 +341,6 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) dlgInfo->yBaseUnit = 0; dlgInfo->idResult = 0; dlgInfo->flags = 0; - dlgInfo->hDialogHeap = 0; wndPtr->dlgInfo = dlgInfo; wndPtr->flags |= WIN_ISDIALOG; } diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 021955b..f0d194d 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -674,7 +674,6 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate, dlgInfo->yBaseUnit = yBaseUnit; dlgInfo->idResult = IDOK; dlgInfo->flags = flags; - dlgInfo->hDialogHeap = 0; if (template.helpId) SetWindowContextHelpId( hwnd, template.helpId ); diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c index 189ba77..fc6ad1e 100644 --- a/dlls/user32/dialog16.c +++ b/dlls/user32/dialog16.c @@ -151,22 +151,6 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, SEGPTR segptr; template = DIALOG_GetControl16( template, &info ); - if (HIWORD(info.className) && !strcmp( info.className, "EDIT") && - !(GetWindowLongW( hwnd, GWL_STYLE ) & DS_LOCALEDIT)) - { - if (!dlgInfo->hDialogHeap) - { - dlgInfo->hDialogHeap = GlobalAlloc16(GMEM_FIXED, 0x10000); - if (!dlgInfo->hDialogHeap) - { - ERR("Insufficient memory to create heap for edit control\n" ); - continue; - } - LocalInit16(dlgInfo->hDialogHeap, 0, 0xffff); - } - instance = dlgInfo->hDialogHeap; - } - segptr = MapLS( info.data ); hwndCtrl = WIN_Handle32( CreateWindowEx16( WS_EX_NOPARENTNOTIFY, info.className, info.windowName,
1
0
0
0
Alexandre Julliard : user32: Delay creation of the 16-bit dialog info structure until the window is created .
by Alexandre Julliard
22 Dec '09
22 Dec '09
Module: wine Branch: master Commit: 009badeb32cceea4de5cacda9f6e53068e42f06b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=009badeb32cceea4de5cacda9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 15:16:03 2009 +0100 user32: Delay creation of the 16-bit dialog info structure until the window is created. This mirrors the behavior of the 32-bit side. --- dlls/user32/dialog16.c | 77 +++++++++++++++++++++-------------------------- 1 files changed, 34 insertions(+), 43 deletions(-) diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c index e529b2d..189ba77 100644 --- a/dlls/user32/dialog16.c +++ b/dlls/user32/dialog16.c @@ -292,35 +292,24 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, RECT rect; POINT pos; SIZE size; - WND * wndPtr; DLG_TEMPLATE template; DIALOGINFO * dlgInfo; BOOL ownerEnabled = TRUE; DWORD exStyle = 0; DWORD units = GetDialogBaseUnits(); + HMENU16 hMenu = 0; + HFONT hUserFont = 0; + UINT flags = 0; + UINT xBaseUnit = LOWORD(units); + UINT yBaseUnit = HIWORD(units); /* Parse dialog template */ dlgTemplate = DIALOG_ParseTemplate16( dlgTemplate, &template ); - /* Initialise dialog extra data */ - - if (!(dlgInfo = HeapAlloc( GetProcessHeap(), 0, sizeof(*dlgInfo) ))) return 0; - dlgInfo->hwndFocus = 0; - dlgInfo->hUserFont = 0; - dlgInfo->hMenu = 0; - dlgInfo->xBaseUnit = LOWORD(units); - dlgInfo->yBaseUnit = HIWORD(units); - dlgInfo->idResult = 0; - dlgInfo->flags = 0; - dlgInfo->hDialogHeap = 0; - /* Load menu */ - if (template.menuName) - { - dlgInfo->hMenu = HMENU_32(LoadMenu16( hInst, template.menuName )); - } + if (template.menuName) hMenu = LoadMenu16( hInst, template.menuName ); /* Create custom font if needed */ @@ -332,32 +321,32 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, int pixels; dc = GetDC(0); pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72); - dlgInfo->hUserFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE, - FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0, - PROOF_QUALITY, FF_DONTCARE, template.faceName ); - if (dlgInfo->hUserFont) + hUserFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE, + FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0, + PROOF_QUALITY, FF_DONTCARE, template.faceName ); + if (hUserFont) { SIZE charSize; - HFONT hOldFont = SelectObject( dc, dlgInfo->hUserFont ); + HFONT hOldFont = SelectObject( dc, hUserFont ); charSize.cx = GdiGetCharDimensions( dc, NULL, &charSize.cy ); if (charSize.cx) { - dlgInfo->xBaseUnit = charSize.cx; - dlgInfo->yBaseUnit = charSize.cy; + xBaseUnit = charSize.cx; + yBaseUnit = charSize.cy; } SelectObject( dc, hOldFont ); } ReleaseDC(0, dc); - TRACE("units = %d,%d\n", dlgInfo->xBaseUnit, dlgInfo->yBaseUnit ); + TRACE("units = %d,%d\n", xBaseUnit, yBaseUnit ); } /* Create dialog main window */ rect.left = rect.top = 0; - rect.right = MulDiv(template.cx, dlgInfo->xBaseUnit, 4); - rect.bottom = MulDiv(template.cy, dlgInfo->yBaseUnit, 8); + rect.right = MulDiv(template.cx, xBaseUnit, 4); + rect.bottom = MulDiv(template.cy, yBaseUnit, 8); if (template.style & DS_MODALFRAME) exStyle |= WS_EX_DLGMODALFRAME; - AdjustWindowRectEx( &rect, template.style, (dlgInfo->hMenu != 0), exStyle ); + AdjustWindowRectEx( &rect, template.style, (hMenu != 0), exStyle ); pos.x = rect.left; pos.y = rect.top; size.cx = rect.right - rect.left; @@ -388,8 +377,8 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, } else { - pos.x += MulDiv(template.x, dlgInfo->xBaseUnit, 4); - pos.y += MulDiv(template.y, dlgInfo->yBaseUnit, 8); + pos.x += MulDiv(template.x, xBaseUnit, 4); + pos.y += MulDiv(template.y, yBaseUnit, 8); if (!(template.style & (WS_CHILD|DS_ABSALIGN))) ClientToScreen( owner, &pos ); } if ( !(template.style & WS_CHILD) ) @@ -416,31 +405,33 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, if (modal) { ownerEnabled = DIALOG_DisableOwner( owner ); - if (ownerEnabled) dlgInfo->flags |= DF_OWNERENABLED; + if (ownerEnabled) flags |= DF_OWNERENABLED; } hwnd = WIN_Handle32( CreateWindowEx16(exStyle, template.className, template.caption, template.style & ~WS_VISIBLE, pos.x, pos.y, size.cx, size.cy, - HWND_16(owner), HMENU_16(dlgInfo->hMenu), - hInst, NULL )); + HWND_16(owner), hMenu, hInst, NULL )); if (!hwnd) { - if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont ); - if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu ); - if (modal && (dlgInfo->flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner); - HeapFree( GetProcessHeap(), 0, dlgInfo ); + if (hUserFont) DeleteObject( hUserFont ); + if (hMenu) DestroyMenu16( hMenu ); + if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner); return 0; } - wndPtr = WIN_GetPtr( hwnd ); - wndPtr->flags |= WIN_ISDIALOG; - wndPtr->dlgInfo = dlgInfo; - WIN_ReleasePtr( wndPtr ); + dlgInfo = DIALOG_get_info( hwnd, TRUE ); + dlgInfo->hwndFocus = 0; + dlgInfo->hUserFont = hUserFont; + dlgInfo->hMenu = HMENU_32( hMenu ); + dlgInfo->xBaseUnit = xBaseUnit; + dlgInfo->yBaseUnit = yBaseUnit; + dlgInfo->idResult = IDOK; + dlgInfo->flags = flags; SetWindowLong16( HWND_16(hwnd), DWLP_DLGPROC, (LONG)dlgProc ); - if (dlgInfo->hUserFont) - SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 ); + if (hUserFont) + SendMessageA( hwnd, WM_SETFONT, (WPARAM)hUserFont, 0 ); /* Create controls */
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
124
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
122
123
124
Results per page:
10
25
50
100
200