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
May 2022
----- 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
907 discussions
Start a n
N
ew thread
Eric Pouech : icinfo: Use OEM code page for output.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: f2c4b9fe0793277e8cac11e1a07538799d2daaf5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2c4b9fe0793277e8cac11e1…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Apr 28 11:22:40 2022 +0200 icinfo: Use OEM code page for output. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/icinfo/icinfo.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/programs/icinfo/icinfo.c b/programs/icinfo/icinfo.c index 01ddbfb6833..bd309bfb623 100644 --- a/programs/icinfo/icinfo.c +++ b/programs/icinfo/icinfo.c @@ -35,17 +35,13 @@ static int WINAPIV mywprintf(const WCHAR *format, ...) vswprintf(output_bufW, ARRAY_SIZE(output_bufW), format, parms); va_end(parms); - /* Try to write as unicode whenever we think it's a console */ - if (((DWORD_PTR)hout & 3) == 3) - { - res = WriteConsoleW(hout, output_bufW, lstrlenW(output_bufW), &nOut, NULL); - } - else + res = WriteConsoleW(hout, output_bufW, lstrlenW(output_bufW), &nOut, NULL); + if (!res) { DWORD convertedChars; /* Convert to OEM, then output */ - convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, output_bufW, -1, + convertedChars = WideCharToMultiByte(GetOEMCP(), 0, output_bufW, -1, output_bufA, sizeof(output_bufA), NULL, NULL); res = WriteFile(hout, output_bufA, convertedChars, &nOut, FALSE);
1
0
0
0
Eric Pouech : hostname: Use OEM code page for output.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: aebe845316a035c034e0470cbb549b443b6f7a7f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aebe845316a035c034e0470c…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Apr 28 11:22:40 2022 +0200 hostname: Use OEM code page for output. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/hostname/hostname.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/programs/hostname/hostname.c b/programs/hostname/hostname.c index b8704cff7a7..73f4d259c16 100644 --- a/programs/hostname/hostname.c +++ b/programs/hostname/hostname.c @@ -32,28 +32,26 @@ static int hostname_vprintfW(const WCHAR *msg, va_list va_args) { int wlen; - DWORD count, ret; + DWORD count; WCHAR msg_buffer[8192]; wlen = vswprintf(msg_buffer, ARRAY_SIZE(msg_buffer), msg, va_args); - ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL); - if (!ret) + if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL)) { DWORD len; char *msgA; /* On Windows WriteConsoleW() fails if the output is redirected. So fall - * back to WriteFile(), assuming the console encoding is still the right - * one in that case. + * back to WriteFile() with OEM code page. */ - len = WideCharToMultiByte(CP_ACP, 0, msg_buffer, wlen, + len = WideCharToMultiByte(GetOEMCP(), 0, msg_buffer, wlen, NULL, 0, NULL, NULL); msgA = HeapAlloc(GetProcessHeap(), 0, len); if (!msgA) return 0; - WideCharToMultiByte(CP_ACP, 0, msg_buffer, wlen, msgA, len, NULL, NULL); + WideCharToMultiByte(GetOEMCP(), 0, msg_buffer, wlen, msgA, len, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE); HeapFree(GetProcessHeap(), 0, msgA); }
1
0
0
0
Eric Pouech : fsutil: Use OEM code page for output.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: 92135f66a8d0b4c5df84af53c8dec291e2e8c6ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=92135f66a8d0b4c5df84af53…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Apr 28 11:22:40 2022 +0200 fsutil: Use OEM code page for output. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/fsutil/main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/programs/fsutil/main.c b/programs/fsutil/main.c index 94151ae9b42..8de7027ee0e 100644 --- a/programs/fsutil/main.c +++ b/programs/fsutil/main.c @@ -26,23 +26,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(fsutil); static void output_write(const WCHAR *str, DWORD wlen) { - DWORD count, ret; + DWORD count; - ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL); - if (!ret) + if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL)) { DWORD len; char *msgA; /* On Windows WriteConsoleW() fails if the output is redirected. So fall - * back to WriteFile(), assuming the console encoding is still the right - * one in that case. + * back to WriteFile() with OEM code page. */ - len = WideCharToMultiByte(CP_ACP, 0, str, wlen, NULL, 0, NULL, NULL); + len = WideCharToMultiByte(GetOEMCP(), 0, str, wlen, NULL, 0, NULL, NULL); msgA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char)); if (!msgA) return; - WideCharToMultiByte(CP_ACP, 0, str, wlen, msgA, len, NULL, NULL); + WideCharToMultiByte(GetOEMCP(), 0, str, wlen, msgA, len, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE); HeapFree(GetProcessHeap(), 0, msgA); }
1
0
0
0
Eric Pouech : chcp: Use OEM code page for output.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: ebd24cbbc04d523dbd62232d3971339208a87dc7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ebd24cbbc04d523dbd62232d…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Apr 28 11:22:40 2022 +0200 chcp: Use OEM code page for output. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> ---
programs/chcp.com/main.c
| 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git
a/programs/chcp.com/main.c
b/programs/chcp.com/main.c
index 6c5864d0e19..b4309ff086d 100644 ---
a/programs/chcp.com/main.c
+++
b/programs/chcp.com/main.c
@@ -26,10 +26,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(chcp); static void output_writeconsole(const WCHAR *str, DWORD wlen) { - DWORD count, ret; + DWORD count; - ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL); - if (!ret) + if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL)) { DWORD len; char *msgA; @@ -38,10 +37,11 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen) * back to WriteFile(), assuming the console encoding is still the right * one in that case. */ - len = WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, NULL, 0, NULL, NULL); + len = WideCharToMultiByte(GetOEMCP(), 0, str, wlen, NULL, 0, NULL, NULL); msgA = malloc(len); + if (!msgA) return; - WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL); + WideCharToMultiByte(GetOEMCP(), 0, str, wlen, msgA, len, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE); free(msgA); }
1
0
0
0
Eric Pouech : attrib: Use OEM code page for output.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: 8f06c1c641d14d9c03d6ad8b10decaf2b60618d1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8f06c1c641d14d9c03d6ad8b…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Apr 28 11:22:40 2022 +0200 attrib: Use OEM code page for output. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/attrib/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 4344200b3ec..f4bcc7df779 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -104,7 +104,7 @@ static int WINAPIV ATTRIB_wprintf(const WCHAR *format, ...) } /* Convert to OEM, then output */ - convertedChars = WideCharToMultiByte(CP_ACP, 0, output_bufW, + convertedChars = WideCharToMultiByte(GetOEMCP(), 0, output_bufW, len, output_bufA, MAX_WRITECONSOLE_SIZE, "?", &usedDefaultChar); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), output_bufA, convertedChars,
1
0
0
0
Eric Pouech : winedbg: Correctly read register values through dbg_lvalue structure.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: a596da54f6fe6efd152bd2031fe8a2015e901d9c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a596da54f6fe6efd152bd203…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Fri Apr 29 11:43:12 2022 +0200 winedbg: Correctly read register values through dbg_lvalue structure. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/debugger.h | 4 ++-- programs/winedbg/memory.c | 4 ++-- programs/winedbg/stack.c | 11 ++++++----- programs/winedbg/symbol.c | 10 +++------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h index 1ae2dce4689..293de4c0aa5 100644 --- a/programs/winedbg/debugger.h +++ b/programs/winedbg/debugger.h @@ -404,7 +404,7 @@ extern BOOL memory_get_current_pc(ADDRESS64* address); extern BOOL memory_get_current_stack(ADDRESS64* address); extern BOOL memory_get_string(struct dbg_process* pcs, void* addr, BOOL in_debuggee, BOOL unicode, char* buffer, int size); extern BOOL memory_get_string_indirect(struct dbg_process* pcs, void* addr, BOOL unicode, WCHAR* buffer, int size); -extern BOOL memory_get_register(DWORD regno, DWORD_PTR** value, char* buffer, int len); +extern BOOL memory_get_register(DWORD regno, struct dbg_lvalue* value, char* buffer, int len); extern void memory_disassemble(const struct dbg_lvalue*, const struct dbg_lvalue*, int instruction_count); extern BOOL memory_disasm_one_insn(ADDRESS64* addr); #define MAX_OFFSET_TO_STR_LEN 19 @@ -425,7 +425,7 @@ extern void source_free_files(struct dbg_process* p); extern void stack_info(int len); extern void stack_backtrace(DWORD threadID); extern BOOL stack_set_frame(int newframe); -extern BOOL stack_get_register_frame(const struct dbg_internal_var* div, DWORD_PTR** pval); +extern BOOL stack_get_register_frame(const struct dbg_internal_var* div, struct dbg_lvalue* lvalue); extern unsigned stack_fetch_frames(const dbg_ctx_t *ctx); extern BOOL stack_get_current_symbol(SYMBOL_INFO* sym); static inline struct dbg_frame* diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c index 8321e8b028d..16d322cd82c 100644 --- a/programs/winedbg/memory.c +++ b/programs/winedbg/memory.c @@ -783,7 +783,7 @@ void memory_disassemble(const struct dbg_lvalue* xstart, memory_disasm_one_insn(&last); } -BOOL memory_get_register(DWORD regno, DWORD_PTR** value, char* buffer, int len) +BOOL memory_get_register(DWORD regno, struct dbg_lvalue* lvalue, char* buffer, int len) { const struct dbg_internal_var* div; @@ -813,7 +813,7 @@ BOOL memory_get_register(DWORD regno, DWORD_PTR** value, char* buffer, int len) { if (div->val == regno) { - if (!stack_get_register_frame(div, value)) + if (!stack_get_register_frame(div, lvalue)) { if (buffer) snprintf(buffer, len, "<register %s not accessible in this frame>", div->name); return FALSE; diff --git a/programs/winedbg/stack.c b/programs/winedbg/stack.c index 294694cf85c..ba246889a55 100644 --- a/programs/winedbg/stack.c +++ b/programs/winedbg/stack.c @@ -98,12 +98,13 @@ static BOOL stack_set_frame_internal(int newframe) return TRUE; } -BOOL stack_get_register_frame(const struct dbg_internal_var* div, DWORD_PTR** pval) +BOOL stack_get_register_frame(const struct dbg_internal_var* div, struct dbg_lvalue* lvalue) { struct dbg_frame* currfrm = stack_get_curr_frame(); if (currfrm == NULL) return FALSE; if (currfrm->is_ctx_valid) - *pval = (DWORD_PTR*)((char*)&currfrm->context + (DWORD_PTR)div->pval); + init_lvalue_in_debugger(lvalue, div->typeid, + (char*)&currfrm->context + (DWORD_PTR)div->pval); else { enum be_cpu_addr kind; @@ -114,13 +115,13 @@ BOOL stack_get_register_frame(const struct dbg_internal_var* div, DWORD_PTR** pv switch (kind) { case be_cpu_addr_pc: - *pval = &currfrm->linear_pc; + init_lvalue_in_debugger(lvalue, dbg_itype_unsigned_long_int, &currfrm->linear_pc); break; case be_cpu_addr_stack: - *pval = &currfrm->linear_stack; + init_lvalue_in_debugger(lvalue, dbg_itype_unsigned_long_int, &currfrm->linear_stack); break; case be_cpu_addr_frame: - *pval = &currfrm->linear_frame; + init_lvalue_in_debugger(lvalue, dbg_itype_unsigned_long_int, &currfrm->linear_frame); break; } } diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c index 9cbfc8b77de..4c4486ce5d8 100644 --- a/programs/winedbg/symbol.c +++ b/programs/winedbg/symbol.c @@ -67,24 +67,20 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base, if (buffer) buffer[0] = '\0'; if (sym->Flags & SYMFLAG_REGISTER) { - DWORD_PTR* pval; - - if (!memory_get_register(sym->Register, &pval, buffer, sz)) + if (!memory_get_register(sym->Register, lvalue, buffer, sz)) return FALSE; - init_lvalue(lvalue, FALSE, pval); } else if (sym->Flags & SYMFLAG_REGREL) { - DWORD_PTR* pval; size_t l; *buffer++ = '['; sz--; - if (!memory_get_register(sym->Register, &pval, buffer, sz)) + if (!memory_get_register(sym->Register, lvalue, buffer, sz)) return FALSE; l = strlen(buffer); sz -= l; buffer += l; - init_lvalue(lvalue, TRUE, (void*)(DWORD_PTR)(*pval + sym->Address)); + init_lvalue(lvalue, TRUE, (void*)(DWORD_PTR)(types_extract_as_integer(lvalue) + sym->Address)); if ((LONG64)sym->Address >= 0) snprintf(buffer, sz, "+%I64d]", sym->Address); else
1
0
0
0
Connor McAdams : uiautomationcore/tests: Add tests for UiaProviderFromIAccessible.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: 1ebccd0f442d19efeeffa7dfacbcd71c296ffc80 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ebccd0f442d19efeeffa7df…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Apr 29 09:46:56 2022 -0400 uiautomationcore/tests: Add tests for UiaProviderFromIAccessible. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uiautomationcore/tests/Makefile.in | 2 +- dlls/uiautomationcore/tests/uiautomation.c | 424 +++++++++++++++++++++++++++++ 2 files changed, 425 insertions(+), 1 deletion(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1ebccd0f442d19efeeff…
1
0
0
0
Connor McAdams : uiautomationcore: Implement UiaProviderFromIAccessible.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: 583cbd2383e91af7ed2a35021fa291d2bbaa8b87 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=583cbd2383e91af7ed2a3502…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Apr 29 09:46:55 2022 -0400 uiautomationcore: Implement UiaProviderFromIAccessible. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uiautomationcore/Makefile.in | 3 +- dlls/uiautomationcore/uia_main.c | 1 + dlls/uiautomationcore/uia_provider.c | 226 ++++++++++++++++++++++++++++ dlls/uiautomationcore/uiautomationcore.spec | 2 +- include/uiautomationcoreapi.h | 4 + 5 files changed, 234 insertions(+), 2 deletions(-) diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in index f0973fdec4c..61a560d6c2e 100644 --- a/dlls/uiautomationcore/Makefile.in +++ b/dlls/uiautomationcore/Makefile.in @@ -5,4 +5,5 @@ IMPORTS = uuid ole32 oleaut32 user32 EXTRADLLFLAGS = -Wb,--prefer-native C_SRCS = \ - uia_main.c + uia_main.c \ + uia_provider.c diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c index c250d82a1e6..e4bb83a3fc5 100644 --- a/dlls/uiautomationcore/uia_main.c +++ b/dlls/uiautomationcore/uia_main.c @@ -20,6 +20,7 @@ #include "initguid.h" #include "uiautomation.h" +#include "ocidl.h" #include "wine/debug.h" #include "wine/heap.h" diff --git a/dlls/uiautomationcore/uia_provider.c b/dlls/uiautomationcore/uia_provider.c new file mode 100644 index 00000000000..790593dbcab --- /dev/null +++ b/dlls/uiautomationcore/uia_provider.c @@ -0,0 +1,226 @@ +/* + * Copyright 2022 Connor McAdams for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "uiautomation.h" +#include "ocidl.h" + +#include "wine/debug.h" +#include "wine/heap.h" + +WINE_DEFAULT_DEBUG_CHANNEL(uiautomation); + +static void variant_init_i4(VARIANT *v, int val) +{ + V_VT(v) = VT_I4; + V_I4(v) = val; +} + +/* + * UiaProviderFromIAccessible IRawElementProviderSimple interface. + */ +struct msaa_provider { + IRawElementProviderSimple IRawElementProviderSimple_iface; + LONG refcount; + + IAccessible *acc; + VARIANT cid; + HWND hwnd; +}; + +static inline struct msaa_provider *impl_from_msaa_provider(IRawElementProviderSimple *iface) +{ + return CONTAINING_RECORD(iface, struct msaa_provider, IRawElementProviderSimple_iface); +} + +HRESULT WINAPI msaa_provider_QueryInterface(IRawElementProviderSimple *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + if (IsEqualIID(riid, &IID_IRawElementProviderSimple) || IsEqualIID(riid, &IID_IUnknown)) + *ppv = iface; + else + return E_NOINTERFACE; + + IRawElementProviderSimple_AddRef(iface); + return S_OK; +} + +ULONG WINAPI msaa_provider_AddRef(IRawElementProviderSimple *iface) +{ + struct msaa_provider *msaa_prov = impl_from_msaa_provider(iface); + ULONG refcount = InterlockedIncrement(&msaa_prov->refcount); + + TRACE("%p, refcount %ld\n", iface, refcount); + + return refcount; +} + +ULONG WINAPI msaa_provider_Release(IRawElementProviderSimple *iface) +{ + struct msaa_provider *msaa_prov = impl_from_msaa_provider(iface); + ULONG refcount = InterlockedDecrement(&msaa_prov->refcount); + + TRACE("%p, refcount %ld\n", iface, refcount); + + if (!refcount) + { + IAccessible_Release(msaa_prov->acc); + heap_free(msaa_prov); + } + + return refcount; +} + +HRESULT WINAPI msaa_provider_get_ProviderOptions(IRawElementProviderSimple *iface, + enum ProviderOptions *ret_val) +{ + TRACE("%p, %p\n", iface, ret_val); + *ret_val = ProviderOptions_ServerSideProvider | ProviderOptions_UseComThreading; + return S_OK; +} + +HRESULT WINAPI msaa_provider_GetPatternProvider(IRawElementProviderSimple *iface, + PATTERNID pattern_id, IUnknown **ret_val) +{ + FIXME("%p, %d, %p: stub!\n", iface, pattern_id, ret_val); + *ret_val = NULL; + return E_NOTIMPL; +} + +HRESULT WINAPI msaa_provider_GetPropertyValue(IRawElementProviderSimple *iface, + PROPERTYID prop_id, VARIANT *ret_val) +{ + TRACE("%p, %d, %p\n", iface, prop_id, ret_val); + + VariantInit(ret_val); + switch (prop_id) + { + case UIA_ProviderDescriptionPropertyId: + V_VT(ret_val) = VT_BSTR; + V_BSTR(ret_val) = SysAllocString(L"Wine: MSAA Proxy"); + break; + + default: + FIXME("Unimplemented propertyId %d\n", prop_id); + break; + } + + return S_OK; +} + +HRESULT WINAPI msaa_provider_get_HostRawElementProvider(IRawElementProviderSimple *iface, + IRawElementProviderSimple **ret_val) +{ + FIXME("%p, %p: stub!\n", iface, ret_val); + *ret_val = NULL; + return E_NOTIMPL; +} + +static const IRawElementProviderSimpleVtbl msaa_provider_vtbl = { + msaa_provider_QueryInterface, + msaa_provider_AddRef, + msaa_provider_Release, + msaa_provider_get_ProviderOptions, + msaa_provider_GetPatternProvider, + msaa_provider_GetPropertyValue, + msaa_provider_get_HostRawElementProvider, +}; + +/*********************************************************************** + * UiaProviderFromIAccessible (uiautomationcore.@) + */ +HRESULT WINAPI UiaProviderFromIAccessible(IAccessible *acc, long child_id, DWORD flags, + IRawElementProviderSimple **elprov) +{ + struct msaa_provider *msaa_prov; + IServiceProvider *serv_prov; + HWND hwnd = NULL; + IOleWindow *win; + HRESULT hr; + + TRACE("(%p, %ld, %#lx, %p)\n", acc, child_id, flags, elprov); + + if (elprov) + *elprov = NULL; + + if (!elprov) + return E_POINTER; + if (!acc) + return E_INVALIDARG; + + if (flags != UIA_PFIA_DEFAULT) + { + FIXME("unsupported flags %#lx\n", flags); + return E_NOTIMPL; + } + + hr = IAccessible_QueryInterface(acc, &IID_IServiceProvider, (void **)&serv_prov); + if (SUCCEEDED(hr)) + { + IUnknown *unk; + + hr = IServiceProvider_QueryService(serv_prov, &IIS_IsOleaccProxy, &IID_IUnknown, (void **)&unk); + if (SUCCEEDED(hr)) + { + WARN("Cannot wrap an oleacc proxy IAccessible!\n"); + IUnknown_Release(unk); + IServiceProvider_Release(serv_prov); + return E_INVALIDARG; + } + + IServiceProvider_Release(serv_prov); + } + + hr = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void **)&win); + if (SUCCEEDED(hr)) + { + hr = IOleWindow_GetWindow(win, &hwnd); + if (FAILED(hr)) + hwnd = NULL; + IOleWindow_Release(win); + } + + if (!IsWindow(hwnd)) + { + VARIANT v, cid; + + VariantInit(&v); + variant_init_i4(&cid, CHILDID_SELF); + hr = IAccessible_accNavigate(acc, 10, cid, &v); + if (SUCCEEDED(hr) && V_VT(&v) == VT_I4) + hwnd = ULongToHandle(V_I4(&v)); + + if (!IsWindow(hwnd)) + return E_FAIL; + } + + msaa_prov = heap_alloc(sizeof(*msaa_prov)); + if (!msaa_prov) + return E_OUTOFMEMORY; + + msaa_prov->IRawElementProviderSimple_iface.lpVtbl = &msaa_provider_vtbl; + msaa_prov->refcount = 1; + msaa_prov->hwnd = hwnd; + variant_init_i4(&msaa_prov->cid, child_id); + msaa_prov->acc = acc; + IAccessible_AddRef(acc); + *elprov = &msaa_prov->IRawElementProviderSimple_iface; + + return S_OK; +} diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec index 82071bd2317..70d78d52085 100644 --- a/dlls/uiautomationcore/uiautomationcore.spec +++ b/dlls/uiautomationcore/uiautomationcore.spec @@ -83,7 +83,7 @@ @ stub UiaNodeRelease @ stub UiaPatternRelease #@ stub UiaProviderForNonClient -#@ stub UiaProviderFromIAccessible +@ stdcall UiaProviderFromIAccessible(ptr long long ptr) @ stub UiaRaiseAsyncContentLoadedEvent @ stdcall UiaRaiseAutomationEvent(ptr long) @ stdcall UiaRaiseAutomationPropertyChangedEvent(ptr long int128 int128) diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h index 563d5c602bd..22b3888dc6e 100644 --- a/include/uiautomationcoreapi.h +++ b/include/uiautomationcoreapi.h @@ -34,6 +34,9 @@ extern "C" { #define UiaAppendRuntimeId 3 #define UiaRootObjectId -25 +#define UIA_PFIA_DEFAULT 0x00 +#define UIA_PFIA_UNWRAP_BRIDGE 0x01 + DECLARE_HANDLE(HUIANODE); DECLARE_HANDLE(HUIAPATTERNOBJECT); DECLARE_HANDLE(HUIATEXTRANGE); @@ -71,6 +74,7 @@ void WINAPI UiaRegisterProviderCallback(UiaProviderCallback *pCallback); LRESULT WINAPI UiaReturnRawElementProvider(HWND hwnd, WPARAM wParam, LPARAM lParam, IRawElementProviderSimple *elprov); BOOL WINAPI UiaTextRangeRelease(HUIATEXTRANGE hobj); HRESULT WINAPI UiaHostProviderFromHwnd(HWND hwnd, IRawElementProviderSimple **elprov); +HRESULT WINAPI UiaProviderFromIAccessible(IAccessible *acc, long child_id, DWORD flags, IRawElementProviderSimple **elprov); #ifdef __cplusplus }
1
0
0
0
Drew Ronneberg : setupapi: Remove obsolete -D_SETUPAPI_ from Makefile.in.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: 0fc84a6d947cffe239b83ffd6d559d6955942781 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fc84a6d947cffe239b83ffd…
Author: Drew Ronneberg <drew_ronneberg(a)yahoo.com> Date: Fri Apr 29 06:09:08 2022 -0400 setupapi: Remove obsolete -D_SETUPAPI_ from Makefile.in. Signed-off-by: Drew Ronneberg <drew_ronneberg(a)yahoo.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/Makefile.in | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/setupapi/Makefile.in b/dlls/setupapi/Makefile.in index d1b647cd5e5..6b04a3f71ab 100644 --- a/dlls/setupapi/Makefile.in +++ b/dlls/setupapi/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -D_SETUPAPI_ MODULE = setupapi.dll IMPORTLIB = setupapi IMPORTS = uuid version advapi32 rpcrt4 kernelbase
1
0
0
0
Drew Ronneberg : shlwapi: Remove obsolete -D_SHLWAPI_ from Makefile.in.
by Alexandre Julliard
02 May '22
02 May '22
Module: wine Branch: master Commit: bbb6fce2fe744361387867f6254b0380f4774066 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bbb6fce2fe744361387867f6…
Author: Drew Ronneberg <drew_ronneberg(a)yahoo.com> Date: Fri Apr 29 06:18:33 2022 -0400 shlwapi: Remove obsolete -D_SHLWAPI_ from Makefile.in. Signed-off-by: Drew Ronneberg <drew_ronneberg(a)yahoo.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shlwapi/Makefile.in | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/shlwapi/Makefile.in b/dlls/shlwapi/Makefile.in index 070dc232cee..e0110a241c4 100644 --- a/dlls/shlwapi/Makefile.in +++ b/dlls/shlwapi/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -D_SHLWAPI_ MODULE = shlwapi.dll IMPORTLIB = shlwapi IMPORTS = uuid shcore user32 gdi32 advapi32 kernelbase
1
0
0
0
← Newer
1
...
84
85
86
87
88
89
90
91
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
Results per page:
10
25
50
100
200