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
June
May
April
March
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
September 2019
----- 2025 -----
June 2025
May 2025
April 2025
March 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
629 discussions
Start a n
N
ew thread
Hans Leidekker : wbemprox: Map CIM_UINT16 and CIM_UINT32 to VT_I4 by default.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: 34bd6a9cf3b3b40ebb81dab423d2d740e2ad9ac4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34bd6a9cf3b3b40ebb81dab4…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Sep 19 19:33:29 2019 +0200 wbemprox: Map CIM_UINT16 and CIM_UINT32 to VT_I4 by default. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47782
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 134 +++++++++++++++++++-------------------- dlls/wbemprox/class.c | 13 +--- dlls/wbemprox/query.c | 64 ++++++++----------- dlls/wbemprox/tests/query.c | 89 +++++++++++++++----------- dlls/wbemprox/wbemprox_private.h | 2 - 5 files changed, 147 insertions(+), 155 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=34bd6a9cf3b3b40ebb81…
1
0
0
0
Hans Leidekker : wbemprox: Avoid a crash when a class is not implemented.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: 58572fc916ecbd6ae77f2b181f51daf4169dcef1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58572fc916ecbd6ae77f2b18…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Sep 19 19:33:28 2019 +0200 wbemprox: Avoid a crash when a class is not implemented. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/query.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index b311fdaf2d..b60ad956b3 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -1123,6 +1123,8 @@ void set_variant( VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret ) static HRESULT map_view_index( const struct view *view, UINT index, UINT *table_index, UINT *result_index ) { + if (!view->table) return WBEM_E_NOT_FOUND; + switch (view->type) { case VIEW_TYPE_SELECT:
1
0
0
0
Alexandre Julliard : ntdll: Send first chance debug event while on signal stack on ARM64.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: 82c753a273b85eb6b30b3c9d625ea22e3dec94c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82c753a273b85eb6b30b3c9d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 19 19:41:42 2019 +0200 ntdll: Send first chance debug event while on signal stack on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 133 ++++++++++++++++++++++++---------------------- 1 file changed, 69 insertions(+), 64 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 7abf389bbd..43e5969229 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -483,52 +483,6 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) } -/*********************************************************************** - * setup_exception - * - * Setup the exception record and context on the thread stack. - */ -static struct stack_layout *setup_exception( ucontext_t *sigcontext ) -{ - struct stack_layout *stack; - DWORD exception_code = 0; - - /* push the stack_layout structure */ - stack = (struct stack_layout *)((SP_sig(sigcontext) - sizeof(*stack)) & ~15); - - stack->rec.ExceptionRecord = NULL; - stack->rec.ExceptionCode = exception_code; - stack->rec.ExceptionFlags = EXCEPTION_CONTINUABLE; - stack->rec.ExceptionAddress = (LPVOID)PC_sig(sigcontext); - stack->rec.NumberParameters = 0; - - save_context( &stack->context, sigcontext ); - save_fpu( &stack->context, sigcontext ); - return stack; -} - -/********************************************************************** - * raise_generic_exception - */ -static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) -{ - NTSTATUS status = NtRaiseException( rec, context, TRUE ); - raise_status( status, rec ); -} - -/*********************************************************************** - * setup_raise_exception - * - * Modify the signal context to call the exception raise function. - */ -static void setup_raise_exception( ucontext_t *sigcontext, struct stack_layout *stack ) -{ - SP_sig(sigcontext) = (ULONG_PTR)stack; - PC_sig(sigcontext) = (ULONG_PTR)raise_generic_exception; - REGn_sig(0, sigcontext) = (ULONG_PTR)&stack->rec; /* first arg for raise_generic_exception */ - REGn_sig(1, sigcontext) = (ULONG_PTR)&stack->context; /* second arg for raise_generic_exception */ -} - /*********************************************************************** * libunwind_virtual_unwind * @@ -852,6 +806,7 @@ static NTSTATUS call_function_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_con dispatch.TargetPc = 0; dispatch.ContextRecord = &context; dispatch.HistoryTable = &table; + dispatch.NonVolatileRegisters = (BYTE *)&context.u.s.X19; for (;;) { status = virtual_unwind( UNW_FLAG_EHANDLER, &dispatch, &context ); @@ -979,19 +934,12 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f context->u.s.X24, context->u.s.X25, context->u.s.X26, context->u.s.X27 ); TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n", context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp ); - TRACE(" pc=%016lx\n", - context->Pc ); } - status = send_debug_event( rec, TRUE, context ); - if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED) - return STATUS_SUCCESS; + if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) goto done; - if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) - return STATUS_SUCCESS; - - if ((status = call_function_handlers( rec, context )) != STATUS_UNHANDLED_EXCEPTION) - return status; + if ((status = call_function_handlers( rec, context )) == STATUS_SUCCESS) goto done; + if (status != STATUS_UNHANDLED_EXCEPTION) return status; } /* last chance exception */ @@ -1008,7 +956,62 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress ); NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode ); } - return STATUS_SUCCESS; +done: + return NtSetContextThread( GetCurrentThread(), context ); +} + +/*********************************************************************** + * setup_exception + * + * Setup the exception record and context on the thread stack. + */ +static struct stack_layout *setup_exception( ucontext_t *sigcontext ) +{ + struct stack_layout *stack; + DWORD exception_code = 0; + + /* push the stack_layout structure */ + stack = (struct stack_layout *)((SP_sig(sigcontext) - sizeof(*stack)) & ~15); + + stack->rec.ExceptionRecord = NULL; + stack->rec.ExceptionCode = exception_code; + stack->rec.ExceptionFlags = EXCEPTION_CONTINUABLE; + stack->rec.ExceptionAddress = (LPVOID)PC_sig(sigcontext); + stack->rec.NumberParameters = 0; + + save_context( &stack->context, sigcontext ); + save_fpu( &stack->context, sigcontext ); + return stack; +} + +/********************************************************************** + * raise_generic_exception + */ +static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) +{ + NTSTATUS status = raise_exception( rec, context, TRUE ); + raise_status( status, rec ); +} + +/*********************************************************************** + * setup_raise_exception + * + * Modify the signal context to call the exception raise function. + */ +static void setup_raise_exception( ucontext_t *sigcontext, struct stack_layout *stack ) +{ + NTSTATUS status = send_debug_event( &stack->rec, TRUE, &stack->context ); + + if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED) + { + restore_context( &stack->context, sigcontext ); + return; + } + SP_sig(sigcontext) = (ULONG_PTR)stack; + PC_sig(sigcontext) = (ULONG_PTR)raise_generic_exception; + REGn_sig(0, sigcontext) = (ULONG_PTR)&stack->rec; /* first arg for raise_generic_exception */ + REGn_sig(1, sigcontext) = (ULONG_PTR)&stack->context; /* second arg for raise_generic_exception */ + REGn_sig(18, sigcontext) = (ULONG_PTR)NtCurrentTeb(); } /********************************************************************** @@ -1790,10 +1793,10 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec TRACE(" x28=%016lx fp=%016lx lr=%016lx sp=%016lx\n", context->u.s.X28, context->u.s.Fp, context->u.s.Lr, context->Sp ); - dispatch.EstablisherFrame = context->Sp; dispatch.TargetPc = (ULONG64)target_ip; dispatch.ContextRecord = context; dispatch.HistoryTable = table; + dispatch.NonVolatileRegisters = (BYTE *)&context->u.s.X19; for (;;) { @@ -1891,9 +1894,13 @@ void WINAPI RtlUnwind( void *frame, void *target_ip, EXCEPTION_RECORD *rec, void */ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) { - NTSTATUS status = raise_exception( rec, context, first_chance ); - if (status == STATUS_SUCCESS) NtSetContextThread( GetCurrentThread(), context ); - return status; + if (first_chance) + { + NTSTATUS status = send_debug_event( rec, TRUE, context ); + if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED) + NtSetContextThread( GetCurrentThread(), context ); + } + return raise_exception( rec, context, first_chance ); } /*********************************************************************** @@ -1902,12 +1909,10 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) { CONTEXT context; - NTSTATUS status; RtlCaptureContext( &context ); rec->ExceptionAddress = (LPVOID)context.Pc; - status = raise_exception( rec, &context, TRUE ); - if (status) raise_status( status, rec ); + RtlRaiseStatus( NtRaiseException( rec, &context, TRUE )); } /*************************************************************************
1
0
0
0
Alexandre Julliard : ntdll: Avoid server call when possible in NtSetContextThread() on ARM64.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: afe8467110649b303f6b59fd595bc5fea5b53910 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=afe8467110649b303f6b59fd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 19 19:41:14 2019 +0200 ntdll: Avoid server call when possible in NtSetContextThread() on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 25ac7dac02..7abf389bbd 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -435,12 +435,18 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) */ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) { - NTSTATUS ret; - BOOL self; - context_t server_context; + NTSTATUS ret = STATUS_SUCCESS; + BOOL self = (handle == GetCurrentThread()); - context_to_server( &server_context, context ); - ret = set_thread_context( handle, &server_context, &self ); + if (self && (context->ContextFlags & (CONTEXT_DEBUG_REGISTERS & ~CONTEXT_ARM64))) + self = FALSE; + + if (!self) + { + context_t server_context; + context_to_server( &server_context, context ); + ret = set_thread_context( handle, &server_context, &self ); + } if (self && ret == STATUS_SUCCESS) set_cpu_context( context ); return ret; }
1
0
0
0
Jacek Caban : scrobj: Add registration element parser.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: e8d99613fc0abe6b9eb9fefcef0099b8fb9c2485 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e8d99613fc0abe6b9eb9fefc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 19 17:28:54 2019 +0200 scrobj: Add registration element parser. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrobj/scrobj.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 2 deletions(-) diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index 2bc746a179..83a9b099d7 100644 --- a/dlls/scrobj/scrobj.c +++ b/dlls/scrobj/scrobj.c @@ -44,6 +44,14 @@ struct scriptlet_factory IXmlReader *xml_reader; IMoniker *moniker; + + BOOL have_registration; + WCHAR *description; + WCHAR *progid; + WCHAR *versioned_progid; + WCHAR *version; + WCHAR *classid_str; + CLSID classid; }; typedef enum tid_t @@ -148,6 +156,19 @@ static BOOL is_xml_name(struct scriptlet_factory *factory, const WCHAR *name) return hres == S_OK && len == wcslen(name) && !memcmp(qname, name, len * sizeof(WCHAR)); } +static HRESULT expect_end_element(struct scriptlet_factory *factory) +{ + XmlNodeType node_type; + HRESULT hres; + hres = next_xml_node(factory, &node_type); + if (hres != S_OK || node_type != XmlNodeType_EndElement) + { + FIXME("Unexpected node %u %s\n", node_type, debugstr_xml_name(factory)); + return E_FAIL; + } + return S_OK; +} + static HRESULT expect_no_attributes(struct scriptlet_factory *factory) { UINT count; @@ -159,10 +180,122 @@ static HRESULT expect_no_attributes(struct scriptlet_factory *factory) return E_FAIL; } +static BOOL is_case_xml_name(struct scriptlet_factory *factory, const WCHAR *name) +{ + const WCHAR *qname; + UINT len; + HRESULT hres; + hres = IXmlReader_GetQualifiedName(factory->xml_reader, &qname, &len); + return hres == S_OK && len == wcslen(name) && !memicmp(qname, name, len * sizeof(WCHAR)); +} + +static HRESULT read_xml_value(struct scriptlet_factory *factory, WCHAR **ret) +{ + const WCHAR *str; + UINT len; + HRESULT hres; + hres = IXmlReader_GetValue(factory->xml_reader, &str, &len); + if (FAILED(hres)) return hres; + if (!(*ret = heap_alloc((len + 1) * sizeof(WCHAR)))) return E_OUTOFMEMORY; + memcpy(*ret, str, len * sizeof(WCHAR)); + (*ret)[len] = 0; + return S_OK; +} + static HRESULT parse_scriptlet_registration(struct scriptlet_factory *factory) { - FIXME("\n"); - return E_NOTIMPL; + HRESULT hres; + + if (factory->have_registration) + { + FIXME("duplicated registration element\n"); + return E_FAIL; + } + factory->have_registration = TRUE; + + for (;;) + { + hres = IXmlReader_MoveToNextAttribute(factory->xml_reader); + if (hres != S_OK) break; + + if (is_xml_name(factory, L"description")) + { + if (factory->description) + { + FIXME("Duplicated description\n"); + return E_FAIL; + } + hres = read_xml_value(factory, &factory->description); + if (FAILED(hres)) return hres; + } + else if (is_case_xml_name(factory, L"progid")) + { + if (factory->progid) + { + FIXME("Duplicated progid\n"); + return E_FAIL; + } + hres = read_xml_value(factory, &factory->progid); + if (FAILED(hres)) return hres; + } + else if (is_xml_name(factory, L"version")) + { + if (factory->version) + { + FIXME("Duplicated version\n"); + return E_FAIL; + } + hres = read_xml_value(factory, &factory->version); + if (FAILED(hres)) return hres; + } + else if (is_xml_name(factory, L"classid")) + { + if (factory->classid_str) + { + FIXME("Duplicated classid attribute\n"); + return E_FAIL; + } + hres = read_xml_value(factory, &factory->classid_str); + if (FAILED(hres)) return hres; + hres = IIDFromString(factory->classid_str, &factory->classid); + if (FAILED(hres)) + { + FIXME("Invalid classid %s\n", debugstr_w(factory->classid_str)); + + return E_FAIL; + } + } + else + { + FIXME("Unexpected attribute\n"); + return E_NOTIMPL; + } + } + + if (!factory->progid && !factory->classid_str) + { + FIXME("Incomplet registration element\n"); + return E_FAIL; + } + + if (factory->progid) + { + size_t progid_len = wcslen(factory->progid); + size_t version_len = wcslen(factory->version); + + if (!(factory->versioned_progid = heap_alloc((progid_len + version_len + 2) * sizeof(WCHAR)))) + return E_OUTOFMEMORY; + + memcpy(factory->versioned_progid, factory->progid, (progid_len + 1) * sizeof(WCHAR)); + if (version_len) + { + factory->versioned_progid[progid_len++] = '.'; + wcscpy(factory->versioned_progid + progid_len, factory->version); + } + else factory->versioned_progid[progid_len] = 0; + } + + return expect_end_element(factory); } static HRESULT parse_scriptlet_public(struct scriptlet_factory *factory) @@ -305,6 +438,11 @@ static ULONG WINAPI scriptlet_factory_Release(IClassFactory *iface) { if (This->moniker) IMoniker_Release(This->moniker); if (This->xml_reader) IXmlReader_Release(This->xml_reader); + heap_free(This->classid_str); + heap_free(This->description); + heap_free(This->versioned_progid); + heap_free(This->progid); + heap_free(This->version); heap_free(This); } return ref;
1
0
0
0
Jacek Caban : scrobj: Add beginning scriptlet parser implementation.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: f2fdbc3d86a8f282bff023411c74ed4a95fe44cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2fdbc3d86a8f282bff02341…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 19 17:28:44 2019 +0200 scrobj: Add beginning scriptlet parser implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrobj/Makefile.in | 2 +- dlls/scrobj/scrobj.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+), 1 deletion(-) diff --git a/dlls/scrobj/Makefile.in b/dlls/scrobj/Makefile.in index b6965c635a..15a4032401 100644 --- a/dlls/scrobj/Makefile.in +++ b/dlls/scrobj/Makefile.in @@ -1,5 +1,5 @@ MODULE = scrobj.dll -IMPORTS = uuid ole32 oleaut32 advapi32 +IMPORTS = uuid urlmon ole32 oleaut32 xmllite advapi32 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index 87c073eb46..2bc746a179 100644 --- a/dlls/scrobj/scrobj.c +++ b/dlls/scrobj/scrobj.c @@ -27,6 +27,7 @@ #include "initguid.h" #include "scrobj.h" +#include "xmllite.h" #include "wine/debug.h" #include "wine/heap.h" @@ -38,7 +39,11 @@ static HINSTANCE scrobj_instance; struct scriptlet_factory { IClassFactory IClassFactory_iface; + LONG ref; + + IXmlReader *xml_reader; + IMoniker *moniker; }; typedef enum tid_t @@ -116,6 +121,139 @@ static void release_typelib(void) ITypeLib_Release(typelib); } +static const char *debugstr_xml_name(struct scriptlet_factory *factory) +{ + const WCHAR *str; + UINT len; + HRESULT hres; + hres = IXmlReader_GetLocalName(factory->xml_reader, &str, &len); + if (FAILED(hres)) return "#err"; + return debugstr_wn(str, len); +} + +static HRESULT next_xml_node(struct scriptlet_factory *factory, XmlNodeType *node_type) +{ + HRESULT hres; + do hres = IXmlReader_Read(factory->xml_reader, node_type); + while (hres == S_OK && *node_type == XmlNodeType_Whitespace); + return hres; +} + +static BOOL is_xml_name(struct scriptlet_factory *factory, const WCHAR *name) +{ + const WCHAR *qname; + UINT len; + HRESULT hres; + hres = IXmlReader_GetQualifiedName(factory->xml_reader, &qname, &len); + return hres == S_OK && len == wcslen(name) && !memcmp(qname, name, len * sizeof(WCHAR)); +} + +static HRESULT expect_no_attributes(struct scriptlet_factory *factory) +{ + UINT count; + HRESULT hres; + hres = IXmlReader_GetAttributeCount(factory->xml_reader, &count); + if (FAILED(hres)) return hres; + if (!count) return S_OK; + FIXME("Unexpected attributes\n"); + return E_FAIL; +} + +static HRESULT parse_scriptlet_registration(struct scriptlet_factory *factory) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT parse_scriptlet_public(struct scriptlet_factory *factory) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT parse_scriptlet_script(struct scriptlet_factory *factory) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT parse_scriptlet_file(struct scriptlet_factory *factory, const WCHAR *url) +{ + XmlNodeType node_type; + IBindCtx *bind_ctx; + IStream *stream; + HRESULT hres; + + hres = CreateURLMoniker(NULL, url, &factory->moniker); + if (FAILED(hres)) + { + WARN("CreateURLMoniker failed: %08x\n", hres); + return hres; + } + + hres = CreateBindCtx(0, &bind_ctx); + if(FAILED(hres)) + return hres; + + hres = IMoniker_BindToStorage(factory->moniker, bind_ctx, NULL, &IID_IStream, (void**)&stream); + IBindCtx_Release(bind_ctx); + if (FAILED(hres)) + return hres; + + hres = CreateXmlReader(&IID_IXmlReader, (void**)&factory->xml_reader, NULL); + if(SUCCEEDED(hres)) + hres = IXmlReader_SetInput(factory->xml_reader, (IUnknown*)stream); + IStream_Release(stream); + if (FAILED(hres)) + return hres; + + hres = next_xml_node(factory, &node_type); + if (hres == S_OK && node_type == XmlNodeType_XmlDeclaration) + hres = next_xml_node(factory, &node_type); + + if (node_type != XmlNodeType_Element || !is_xml_name(factory, L"component")) + { + FIXME("Unexpected %s element\n", debugstr_xml_name(factory)); + return E_FAIL; + } + + hres = expect_no_attributes(factory); + if (FAILED(hres)) return hres; + + for (;;) + { + hres = next_xml_node(factory, &node_type); + if (FAILED(hres)) return hres; + if (node_type == XmlNodeType_EndElement) break; + if (node_type != XmlNodeType_Element) + { + FIXME("Unexpected node type %u\n", node_type); + return E_FAIL; + } + + if (is_xml_name(factory, L"registration")) + hres = parse_scriptlet_registration(factory); + else if (is_xml_name(factory, L"public")) + hres = parse_scriptlet_public(factory); + else if (is_xml_name(factory, L"script")) + hres = parse_scriptlet_script(factory); + else + { + FIXME("Unexpected element %s\n", debugstr_xml_name(factory)); + return E_NOTIMPL; + } + if (FAILED(hres)) return hres; + } + + hres = next_xml_node(factory, &node_type); + if (hres != S_FALSE) + { + FIXME("Unexpected node type %u\n", node_type); + return E_FAIL; + } + return S_OK; +} + static inline struct scriptlet_factory *impl_from_IClassFactory(IClassFactory *iface) { return CONTAINING_RECORD(iface, struct scriptlet_factory, IClassFactory_iface); @@ -164,7 +302,11 @@ static ULONG WINAPI scriptlet_factory_Release(IClassFactory *iface) TRACE("(%p) ref=%d\n", This, ref); if (!ref) + { + if (This->moniker) IMoniker_Release(This->moniker); + if (This->xml_reader) IXmlReader_Release(This->xml_reader); heap_free(This); + } return ref; } @@ -194,6 +336,7 @@ static const struct IClassFactoryVtbl scriptlet_factory_vtbl = static HRESULT create_scriptlet_factory(const WCHAR *url, struct scriptlet_factory **ret) { struct scriptlet_factory *factory; + HRESULT hres; TRACE("%s\n", debugstr_w(url)); @@ -206,6 +349,13 @@ static HRESULT create_scriptlet_factory(const WCHAR *url, struct scriptlet_facto factory->IClassFactory_iface.lpVtbl = &scriptlet_factory_vtbl; factory->ref = 1; + hres = parse_scriptlet_file(factory, url); + if (FAILED(hres)) + { + IClassFactory_Release(&factory->IClassFactory_iface); + return hres; + } + *ret = factory; return S_OK; }
1
0
0
0
Jacek Caban : scrobj: Add scriptlet factory stub implementation.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: 1f848e760494b836d95d4a743b9be01ce63a8b00 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f848e760494b836d95d4a74…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 19 17:28:25 2019 +0200 scrobj: Add scriptlet factory stub implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/scrobj/Makefile.in | 2 +- dlls/scrobj/scrobj.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 1 deletion(-) diff --git a/dlls/scrobj/Makefile.in b/dlls/scrobj/Makefile.in index b175b54fe6..b6965c635a 100644 --- a/dlls/scrobj/Makefile.in +++ b/dlls/scrobj/Makefile.in @@ -1,5 +1,5 @@ MODULE = scrobj.dll -IMPORTS = uuid ole32 oleaut32 +IMPORTS = uuid ole32 oleaut32 advapi32 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index c27def2b0f..87c073eb46 100644 --- a/dlls/scrobj/scrobj.c +++ b/dlls/scrobj/scrobj.c @@ -27,12 +27,20 @@ #include "initguid.h" #include "scrobj.h" + #include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(scrobj); static HINSTANCE scrobj_instance; +struct scriptlet_factory +{ + IClassFactory IClassFactory_iface; + LONG ref; +}; + typedef enum tid_t { NULL_tid, @@ -108,6 +116,100 @@ static void release_typelib(void) ITypeLib_Release(typelib); } +static inline struct scriptlet_factory *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, struct scriptlet_factory, IClassFactory_iface); +} + +static HRESULT WINAPI scriptlet_factory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) +{ + struct scriptlet_factory *This = impl_from_IClassFactory(iface); + + if (IsEqualGUID(&IID_IUnknown, riid)) + { + TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv); + *ppv = &This->IClassFactory_iface; + } + else if (IsEqualGUID(&IID_IClassFactory, riid)) + { + TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv); + *ppv = &This->IClassFactory_iface; + } + else + { + WARN("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown *)*ppv); + return S_OK; +} + +static ULONG WINAPI scriptlet_factory_AddRef(IClassFactory *iface) +{ + struct scriptlet_factory *This = impl_from_IClassFactory(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI scriptlet_factory_Release(IClassFactory *iface) +{ + struct scriptlet_factory *This = impl_from_IClassFactory(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if (!ref) + heap_free(This); + return ref; +} + +static HRESULT WINAPI scriptlet_factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) +{ + struct scriptlet_factory *This = impl_from_IClassFactory(iface); + FIXME("(%p)->(%p %s %p)\n", This, outer, debugstr_guid(riid), ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI scriptlet_factory_LockServer(IClassFactory *iface, BOOL fLock) +{ + struct scriptlet_factory *This = impl_from_IClassFactory(iface); + TRACE("(%p)->(%x)\n", This, fLock); + return S_OK; +} + +static const struct IClassFactoryVtbl scriptlet_factory_vtbl = +{ + scriptlet_factory_QueryInterface, + scriptlet_factory_AddRef, + scriptlet_factory_Release, + scriptlet_factory_CreateInstance, + scriptlet_factory_LockServer +}; + +static HRESULT create_scriptlet_factory(const WCHAR *url, struct scriptlet_factory **ret) +{ + struct scriptlet_factory *factory; + + TRACE("%s\n", debugstr_w(url)); + + if (!(factory = heap_alloc_zero(sizeof(*factory)))) + { + IClassFactory_Release(&factory->IClassFactory_iface); + return E_OUTOFMEMORY; + } + + factory->IClassFactory_iface.lpVtbl = &scriptlet_factory_vtbl; + factory->ref = 1; + + *ret = factory; + return S_OK; +} + struct scriptlet_typelib { IGenScriptletTLib IGenScriptletTLib_iface; @@ -544,12 +646,39 @@ static IClassFactory scriptlet_typelib_factory = { &scriptlet_typelib_factory_vt */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { + WCHAR key_name[128], *p; + LONG size = 0; + LSTATUS status; + if (IsEqualGUID(&CLSID_TypeLib, rclsid)) { TRACE("(Scriptlet.TypeLib %s %p)\n", debugstr_guid(riid), ppv); return IClassFactory_QueryInterface(&scriptlet_typelib_factory, riid, ppv); } + wcscpy(key_name, L"CLSID\\"); + p = key_name + wcslen(key_name); + p += StringFromGUID2(rclsid, p, ARRAY_SIZE(key_name) - (p - key_name)) - 1; + wcscpy(p, L"\\ScriptletURL"); + status = RegQueryValueW(HKEY_CLASSES_ROOT, key_name, NULL, &size); + if (!status) + { + struct scriptlet_factory *factory; + WCHAR *url; + HRESULT hres; + + if (!(url = heap_alloc(size * sizeof(WCHAR)))) return E_OUTOFMEMORY; + status = RegQueryValueW(HKEY_CLASSES_ROOT, key_name, url, &size); + + hres = create_scriptlet_factory(url, &factory); + heap_free(url); + if (FAILED(hres)) return hres; + + hres = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, ppv); + IClassFactory_Release(&factory->IClassFactory_iface); + return hres; + } + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; }
1
0
0
0
Zhiyi Zhang : gdi32/tests: Add CreateDC tests.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: acd801d3e511a2fc2ac5d5f65d195bfeda5f69c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=acd801d3e511a2fc2ac5d5f6…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Sep 19 15:56:39 2019 +0100 gdi32/tests: Add CreateDC tests. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/dc.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 366ea88924..79f06249bb 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -545,6 +545,67 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale SetBoundsRect( ref_dc, NULL, DCB_RESET | DCB_DISABLE ); } +static void test_CreateDC(void) +{ + DISPLAY_DEVICEW display_device = {sizeof(display_device)}; + WCHAR adapter_name[CCHDEVICENAME]; + DWORD i, j; + HDC hdc; + + hdc = CreateDCW( NULL, NULL, NULL, NULL ); + ok( !hdc, "CreateDC succeeded\n" ); + + hdc = CreateDCW( NULL, L"display", NULL, NULL ); + todo_wine ok( !hdc, "CreateDC succeeded\n" ); + + hdc = CreateDCW( L"display", NULL, NULL, NULL ); + ok( hdc != NULL, "CreateDC failed\n" ); + DeleteDC( hdc ); + + hdc = CreateDCW( L"display", L"deadbeef", NULL, NULL ); + ok( hdc != NULL, "CreateDC failed\n" ); + DeleteDC( hdc ); + + for (i = 0; EnumDisplayDevicesW( NULL, i, &display_device, 0 ); ++i) + { + if (!(display_device.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)) + { + hdc = CreateDCW( display_device.DeviceName, NULL, NULL, NULL ); + todo_wine ok( !hdc, "CreateDC succeeded\n" ); + + hdc = CreateDCW( NULL, display_device.DeviceName, NULL, NULL ); + todo_wine ok( !hdc, "CreateDC succeeded\n" ); + continue; + } + + hdc = CreateDCW( display_device.DeviceName, NULL, NULL, NULL ); + ok( hdc != NULL, "CreateDC failed %s\n", wine_dbgstr_w( display_device.DeviceName ) ); + DeleteDC( hdc ); + + hdc = CreateDCW( NULL, display_device.DeviceName, NULL, NULL ); + ok( hdc != NULL, "CreateDC failed\n" ); + DeleteDC( hdc ); + + hdc = CreateDCW( display_device.DeviceName, display_device.DeviceName, NULL, NULL ); + ok( hdc != NULL, "CreateDC failed\n" ); + DeleteDC( hdc ); + + hdc = CreateDCW( display_device.DeviceName, L"deadbeef", NULL, NULL ); + ok( hdc != NULL, "CreateDC failed\n" ); + DeleteDC( hdc ); + + lstrcpyW( adapter_name, display_device.DeviceName ); + for (j = 0; EnumDisplayDevicesW( adapter_name, j, &display_device, 0 ); ++j) + { + hdc = CreateDCW( display_device.DeviceName, NULL, NULL, NULL ); + ok( !hdc, "CreateDC succeeded\n" ); + + hdc = CreateDCW( NULL, display_device.DeviceName, NULL, NULL ); + ok( !hdc, "CreateDC succeeded\n" ); + } + } +} + static void test_CreateCompatibleDC(void) { BOOL bRet; @@ -1509,6 +1570,7 @@ START_TEST(dc) test_savedc(); test_savedc_2(); test_GdiConvertToDevmodeW(); + test_CreateDC(); test_CreateCompatibleDC(); test_DC_bitmap(); test_DeleteDC();
1
0
0
0
Zhiyi Zhang : gdi32/tests: Fix a test failure on Win10 1809.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: 9cffe80fdc0fcdcea42a5e52f13e7ab1e08d7aa7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9cffe80fdc0fcdcea42a5e52…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Sep 19 15:56:38 2019 +0100 gdi32/tests: Fix a test failure on Win10 1809. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/dc.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 2d9ef1dd88..366ea88924 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -731,19 +731,23 @@ static void test_DeleteDC(void) ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); hdc = GetWindowDC(hwnd); ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); DestroyWindow(hwnd); @@ -755,19 +759,23 @@ static void test_DeleteDC(void) ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); hdc = GetWindowDC(hwnd); ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); /* CS_CLASSDC */ memset(&cls, 0, sizeof(cls)); @@ -802,21 +810,25 @@ static void test_DeleteDC(void) ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); DestroyWindow(hwnd); ret = GetObjectType(hdc_test); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc_test, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = UnregisterClassA("Wine class DC", GetModuleHandleA(NULL)); ok(ret, "UnregisterClassA failed\n"); - ret = GetObjectType(hdc_test); - ok(!ret, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc_test, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); /* CS_OWNDC */ memset(&cls, 0, sizeof(cls)); @@ -849,10 +861,12 @@ static void test_DeleteDC(void) ok(hdc != 0, "GetDC failed\n"); ret = GetObjectType(hdc); ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(ret == DT_RASDISPLAY, "GetDeviceCaps rets %d\n", ret); ret = DeleteDC(hdc); ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); + ret = GetDeviceCaps(hdc, TECHNOLOGY); + ok(!ret, "GetDeviceCaps should fail for a deleted DC\n"); DestroyWindow(hwnd);
1
0
0
0
Alexandre Julliard : include: Import uchar.h from MinGW.
by Alexandre Julliard
19 Sep '19
19 Sep '19
Module: wine Branch: master Commit: dfd63484450449d34c9ce229a4dbc2a20452e09d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfd63484450449d34c9ce229…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Sep 19 14:18:24 2019 +0200 include: Import uchar.h from MinGW. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/msvcrt/uchar.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 0f78085192..d0acefbb55 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -454,6 +454,7 @@ SOURCES = \ msvcrt/sys/unistd.h \ msvcrt/sys/utime.h \ msvcrt/time.h \ + msvcrt/uchar.h \ msvcrt/unistd.h \ msvcrt/wchar.h \ msvcrt/wctype.h \ diff --git a/include/msvcrt/uchar.h b/include/msvcrt/uchar.h new file mode 100644 index 0000000000..a4fd22430a --- /dev/null +++ b/include/msvcrt/uchar.h @@ -0,0 +1,72 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +/* ISO C1x Unicode utilities + * Based on ISO/IEC SC22/WG14 9899 TR 19769 (SC22 N1326) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Date: 2011-09-27 + */ + +#ifndef __UCHAR_H +#define __UCHAR_H + +#include <stddef.h> /* size_t */ +#include <stdint.h> /* uint_leastXX_t */ +#include <wchar.h> /* mbstate_t */ + +/* Remember that g++ >= 4.4 defines these types only in c++0x mode */ +#if !(defined(__cplusplus) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \ + !defined(__GNUC__) || \ + (!defined(__clang__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +#endif + +#ifndef __STDC_UTF_16__ +#define __STDC_UTF_16__ 1 +#endif + +#ifndef __STDC_UTF_32__ +#define __STDC_UTF_32__ 1 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +size_t mbrtoc16 (char16_t *__restrict__ pc16, + const char *__restrict__ s, + size_t n, + mbstate_t *__restrict__ ps); + +size_t c16rtomb (char *__restrict__ s, + char16_t c16, + mbstate_t *__restrict__ ps); + +size_t mbrtoc32 (char32_t *__restrict__ pc32, + const char *__restrict__ s, + size_t n, + mbstate_t *__restrict__ ps); + +size_t c32rtomb (char *__restrict__ s, + char32_t c32, + mbstate_t *__restrict__ ps); + +#ifdef __cplusplus +} +#endif + +#endif /* __UCHAR_H */
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
63
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
Results per page:
10
25
50
100
200