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
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 2009
----- 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
3 participants
866 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added RegExp function call implementation.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 9e523c61304213792812ece5a47fa1ad680be749 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e523c61304213792812ece5a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 23 16:09:22 2009 +0200 jscript: Added RegExp function call implementation. --- dlls/jscript/error.c | 24 +++++++++++++++++++----- dlls/jscript/jscript.h | 2 ++ dlls/jscript/jscript_En.rc | 1 + dlls/jscript/regexp.c | 33 +++++++++
…
[View More]
++++++++++++++++++++++-- dlls/jscript/resource.h | 1 + dlls/jscript/tests/api.js | 1 + dlls/jscript/tests/regexp.js | 12 ++++++++++++ 7 files changed, 67 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index 2aa5436..bced477 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -310,6 +310,14 @@ static HRESULT ReferenceErrorConstr_value(DispatchEx *dispex, LCID lcid, WORD fl dispex->ctx->reference_error_constr); } +static HRESULT RegExpErrorConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, + DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + TRACE("\n"); + return error_constr(dispex, flags, dp, retv, ei, + dispex->ctx->regexp_error_constr); +} + static HRESULT SyntaxErrorConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { @@ -341,25 +349,26 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype) static const WCHAR EvalErrorW[] = {'E','v','a','l','E','r','r','o','r',0}; static const WCHAR RangeErrorW[] = {'R','a','n','g','e','E','r','r','o','r',0}; static const WCHAR ReferenceErrorW[] = {'R','e','f','e','r','e','n','c','e','E','r','r','o','r',0}; + static const WCHAR RegExpErrorW[] = {'R','e','g','E','x','p','E','r','r','o','r',0}; static const WCHAR SyntaxErrorW[] = {'S','y','n','t','a','x','E','r','r','o','r',0}; static const WCHAR TypeErrorW[] = {'T','y','p','e','E','r','r','o','r',0}; static const WCHAR URIErrorW[] = {'U','R','I','E','r','r','o','r',0}; static const WCHAR *names[] = {ErrorW, EvalErrorW, RangeErrorW, - ReferenceErrorW, SyntaxErrorW, TypeErrorW, URIErrorW}; + ReferenceErrorW, RegExpErrorW, SyntaxErrorW, TypeErrorW, URIErrorW}; DispatchEx **constr_addr[] = {&ctx->error_constr, &ctx->eval_error_constr, - &ctx->range_error_constr, &ctx->reference_error_constr, + &ctx->range_error_constr, &ctx->reference_error_constr, &ctx->regexp_error_constr, &ctx->syntax_error_constr, &ctx->type_error_constr, &ctx->uri_error_constr}; static builtin_invoke_t constr_val[] = {ErrorConstr_value, EvalErrorConstr_value, - RangeErrorConstr_value, ReferenceErrorConstr_value, SyntaxErrorConstr_value, - TypeErrorConstr_value, URIErrorConstr_value}; + RangeErrorConstr_value, ReferenceErrorConstr_value, RegExpErrorConstr_value, + SyntaxErrorConstr_value, TypeErrorConstr_value, URIErrorConstr_value}; ErrorInstance *err; INT i; VARIANT v; HRESULT hres; - for(i=0; i<7; i++) { + for(i=0; i < sizeof(names)/sizeof(names[0]); i++) { hres = alloc_error(ctx, i==0 ? object_prototype : NULL, NULL, &err); if(FAILED(hres)) return hres; @@ -433,6 +442,11 @@ HRESULT throw_reference_error(script_ctx_t *ctx, jsexcept_t *ei, UINT id, const return throw_error(ctx, ei, id, str, ctx->reference_error_constr); } +HRESULT throw_regexp_error(script_ctx_t *ctx, jsexcept_t *ei, UINT id, const WCHAR *str) +{ + return throw_error(ctx, ei, id, str, ctx->regexp_error_constr); +} + HRESULT throw_syntax_error(script_ctx_t *ctx, jsexcept_t *ei, UINT id, const WCHAR *str) { return throw_error(ctx, ei, id, str, ctx->syntax_error_constr); diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index f09e257..6f861b8 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -151,6 +151,7 @@ HRESULT Function_value(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IS HRESULT throw_eval_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT throw_range_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT throw_reference_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); +HRESULT throw_regexp_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT throw_syntax_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT throw_type_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT throw_uri_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); @@ -208,6 +209,7 @@ struct _script_ctx_t { DispatchEx *eval_error_constr; DispatchEx *range_error_constr; DispatchEx *reference_error_constr; + DispatchEx *regexp_error_constr; DispatchEx *syntax_error_constr; DispatchEx *type_error_constr; DispatchEx *uri_error_constr; diff --git a/dlls/jscript/jscript_En.rc b/dlls/jscript/jscript_En.rc index eca9bc8..b7f8744 100644 --- a/dlls/jscript/jscript_En.rc +++ b/dlls/jscript/jscript_En.rc @@ -38,5 +38,6 @@ STRINGTABLE DISCARDABLE IDS_ILLEGAL_ASSIGN "Illegal assignment" IDS_UNDEFINED "'|' is undefined" IDS_NOT_BOOL "Boolean object expected" + IDS_REGEXP_SYNTAX_ERROR "Syntax error in regular expression" IDS_INVALID_LENGTH "Array length must be a finite positive integer" } diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index 1c017b0..28154da 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -3819,8 +3819,12 @@ static HRESULT regexp_constructor(script_ctx_t *ctx, DISPPARAMS *dp, VARIANT *re if(FAILED(hres)) return hres; - V_VT(retv) = VT_DISPATCH; - V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(ret); + if(retv) { + V_VT(retv) = VT_DISPATCH; + V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(ret); + }else { + jsdisp_release(ret); + } return S_OK; } @@ -3830,6 +3834,31 @@ static HRESULT RegExpConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS TRACE("\n"); switch(flags) { + case DISPATCH_METHOD: + if(arg_cnt(dp)) { + VARIANT *arg = get_arg(dp,0); + if(V_VT(arg) == VT_DISPATCH) { + DispatchEx *jsdisp = iface_to_jsdisp((IUnknown*)V_DISPATCH(arg)); + if(jsdisp) { + if(is_class(jsdisp, JSCLASS_REGEXP)) { + if(arg_cnt(dp) > 1 && V_VT(get_arg(dp,1)) != VT_EMPTY) { + jsdisp_release(jsdisp); + return throw_regexp_error(dispex->ctx, ei, IDS_REGEXP_SYNTAX_ERROR, NULL); + } + + if(retv) { + V_VT(retv) = VT_DISPATCH; + V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(jsdisp); + }else { + jsdisp_release(jsdisp); + } + return S_OK; + } + jsdisp_release(jsdisp); + } + } + } + /* fall through */ case DISPATCH_CONSTRUCT: return regexp_constructor(dispex->ctx, dp, retv); default: diff --git a/dlls/jscript/resource.h b/dlls/jscript/resource.h index 2749bd6..9e33ebc 100644 --- a/dlls/jscript/resource.h +++ b/dlls/jscript/resource.h @@ -34,4 +34,5 @@ #define IDS_ILLEGAL_ASSIGN 0x1390 #define IDS_UNDEFINED 0x1391 #define IDS_NOT_BOOL 0x1392 +#define IDS_REGEXP_SYNTAX_ERROR 0x1399 #define IDS_INVALID_LENGTH 0x13A5 diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 7a39d0f..7b22212 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1617,6 +1617,7 @@ exception_test(function() {eval("while(")}, "SyntaxError", -2146827286); exception_test(function() {eval("if(")}, "SyntaxError", -2146827286); exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273); exception_test(function() {eval("nonexistingfunc()")}, "TypeError", -2146823281); +exception_test(function() {RegExp(/a/, "g");}, "RegExpError", -2146823271); function testObjectInherit(obj, constr, ts, tls, vo) { ok(obj instanceof Object, "obj is not instance of Object"); diff --git a/dlls/jscript/tests/regexp.js b/dlls/jscript/tests/regexp.js index a839adb..ff98b48 100644 --- a/dlls/jscript/tests/regexp.js +++ b/dlls/jscript/tests/regexp.js @@ -286,4 +286,16 @@ ok(re.source === "abc[^d]", "re.source = '" + re.source + "', expected 'abc[^d]' re = /a\bc[^d]/g; ok(re.source === "a\\bc[^d]", "re.source = '" + re.source + "', expected 'a\\bc[^d]'"); +re = /abc/; +ok(re === RegExp(re), "re !== RegExp(re)"); + +re = RegExp("abc[^d]", "g"); +ok(re.source === "abc[^d]", "re.source = '" + re.source + "', expected 'abc[^d]'"); + +re = /abc/; +ok(re === RegExp(re, undefined), "re !== RegExp(re, undefined)"); + +re = /abc/; +ok(re === RegExp(re, undefined, 1), "re !== RegExp(re, undefined, 1)"); + reportSuccess();
[View Less]
1
0
0
0
Alexander Scott-Johns : user32: Send a WM_DRAWCLIPBOARD message to the new viewer when SetClipboardViewer is called .
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 9c9ebe04c5804e543da3cbc86c71179b4f275b91 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c9ebe04c5804e543da3cbc86…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Wed Sep 23 01:35:57 2009 +0100 user32: Send a WM_DRAWCLIPBOARD message to the new viewer when SetClipboardViewer is called. --- dlls/user32/clipboard.c | 30 +++++++++++++++++++----------- dlls/user32/tests/msg.c | 4 ++-- 2 files changed, 21
…
[View More]
insertions(+), 13 deletions(-) diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index ec991b8..c69d0c3 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -188,6 +188,21 @@ static BOOL CLIPBOARD_CloseClipboard(void) return bRet; } +static HWND CLIPBOARD_SetClipboardViewer( HWND hWnd ) +{ + HWND hwndPrev = 0; + + SERVER_START_REQ( set_clipboard_info ) + { + req->flags = SET_CB_VIEWER; + req->viewer = wine_server_user_handle( hWnd ); + if (!wine_server_call_err( req )) + hwndPrev = wine_server_ptr_handle( reply->old_viewer ); + } + SERVER_END_REQ; + + return hwndPrev; +} /************************************************************************** * WIN32 Clipboard implementation @@ -390,17 +405,10 @@ HWND WINAPI GetOpenClipboardWindow(void) */ HWND WINAPI SetClipboardViewer( HWND hWnd ) { - HWND hwndPrev = 0; - - SERVER_START_REQ( set_clipboard_info ) - { - req->flags = SET_CB_VIEWER; - req->viewer = wine_server_user_handle( hWnd ); - if (!wine_server_call_err( req )) - hwndPrev = wine_server_ptr_handle( reply->old_viewer ); - } - SERVER_END_REQ; + HWND hwndPrev = CLIPBOARD_SetClipboardViewer(hWnd); + if (hWnd) + SendMessageW(hWnd, WM_DRAWCLIPBOARD, (WPARAM) GetClipboardOwner(), 0); TRACE("(%p): returning %p\n", hWnd, hwndPrev); return hwndPrev; @@ -438,7 +446,7 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext) if (hWndViewer) { if (WIN_GetFullHandle(hWnd) == hWndViewer) - SetClipboardViewer(WIN_GetFullHandle(hWndNext)); + CLIPBOARD_SetClipboardViewer(WIN_GetFullHandle(hWndNext)); else bRet = !SendMessageW(hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext); } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 517e029..9208c9d 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11813,7 +11813,7 @@ static void test_clipboard_viewers(void) /* Test registering hWnd1 as a viewer. */ hRet = SetClipboardViewer(hWnd1); wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "set viewer NULL->1", TRUE); + ok_sequence(wm_clipboard_changed, "set viewer NULL->1", FALSE); expect_HWND(NULL, hRet); expect_HWND(hWnd1, GetClipboardViewer()); @@ -11830,7 +11830,7 @@ static void test_clipboard_viewers(void) /* Test re-registering same window. */ hRet = SetClipboardViewer(hWnd1); wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "set viewer 1->1", TRUE); + ok_sequence(wm_clipboard_changed, "set viewer 1->1", FALSE); expect_HWND(hWnd1, hRet); expect_HWND(hWnd1, GetClipboardViewer());
[View Less]
1
0
0
0
Alexander Scott-Johns : user32: When sending the WM_DRAWCLIPBOARD message, pass the clipboard owner in wParam.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 64569c66e42df9f04cbe6965213376fd1cdec2ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64569c66e42df9f04cbe69652…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Wed Sep 23 01:30:28 2009 +0100 user32: When sending the WM_DRAWCLIPBOARD message, pass the clipboard owner in wParam. --- dlls/user32/clipboard.c | 2 +- dlls/user32/tests/msg.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
…
[View More]
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index b0ff10d..ec991b8 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -285,7 +285,7 @@ BOOL WINAPI CloseClipboard(void) USER_Driver->pEndClipboardUpdate(); if (hWndViewer) - SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, 0, 0); + SendMessageW(hWndViewer, WM_DRAWCLIPBOARD, (WPARAM) GetClipboardOwner(), 0); bCBHasChanged = FALSE; } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 5c1a9d7..517e029 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11820,12 +11820,12 @@ static void test_clipboard_viewers(void) /* Test that changing the clipboard actually refreshes the registered viewer. */ clear_clipboard(hWnd1); wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", TRUE); + ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", FALSE); /* Again, but with different owner. */ clear_clipboard(hWnd2); wm_clipboard_changed_and_owned[1].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", TRUE); + ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", FALSE); /* Test re-registering same window. */ hRet = SetClipboardViewer(hWnd1);
[View Less]
1
0
0
0
Alexander Scott-Johns : user32/tests: Add some clipboard viewer tests.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 4807fd99a76e932eb68f284aad79973341913ab8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4807fd99a76e932eb68f284aa…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Sat Sep 19 23:29:44 2009 +0100 user32/tests: Add some clipboard viewer tests. --- dlls/user32/tests/msg.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 166 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/
…
[View More]
msg.c b/dlls/user32/tests/msg.c index 540b494..5c1a9d7 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11724,6 +11724,171 @@ static void test_defwinproc(void) DestroyWindow( hwnd); } +#define clear_clipboard(hwnd) clear_clipboard_(__LINE__, (hwnd)) +static void clear_clipboard_(int line, HWND hWnd) +{ + BOOL succ; + succ = OpenClipboard(hWnd); + ok_(__FILE__, line)(succ, "OpenClipboard failed, err=%u\n", GetLastError()); + succ = EmptyClipboard(); + ok_(__FILE__, line)(succ, "EmptyClipboard failed, err=%u\n", GetLastError()); + succ = CloseClipboard(); + ok_(__FILE__, line)(succ, "CloseClipboard failed, err=%u\n", GetLastError()); +} + +#define expect_HWND(expected, got) expect_HWND_(__LINE__, (expected), (got)) +static void expect_HWND_(int line, HWND expected, HWND got) +{ + ok_(__FILE__, line)(got==expected, "Expected %p, got %p\n", expected, got); +} + +static WNDPROC pOldViewerProc; + +static LRESULT CALLBACK recursive_viewer_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + static BOOL recursion_guard; + + if (message == WM_DRAWCLIPBOARD && !recursion_guard) + { + recursion_guard = TRUE; + clear_clipboard(hWnd); + recursion_guard = FALSE; + } + return CallWindowProcA(pOldViewerProc, hWnd, message, wParam, lParam); +} + +static void test_clipboard_viewers(void) +{ + static struct message wm_change_cb_chain[] = + { + { WM_CHANGECBCHAIN, sent|wparam|lparam, 0, 0 }, + { 0 } + }; + static const struct message wm_clipboard_destroyed[] = + { + { WM_DESTROYCLIPBOARD, sent|wparam|lparam, 0, 0 }, + { 0 } + }; + static struct message wm_clipboard_changed[] = + { + { WM_DRAWCLIPBOARD, sent|wparam|lparam, 0, 0 }, + { 0 } + }; + static struct message wm_clipboard_changed_and_owned[] = + { + { WM_DESTROYCLIPBOARD, sent|wparam|lparam, 0, 0 }, + { WM_DRAWCLIPBOARD, sent|wparam|lparam, 0, 0 }, + { 0 } + }; + + HINSTANCE hInst = GetModuleHandleA(NULL); + HWND hWnd1, hWnd2, hWnd3; + HWND hOrigViewer; + HWND hRet; + + hWnd1 = CreateWindowExA(0, "TestWindowClass", "Clipboard viewer test wnd 1", + WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + GetDesktopWindow(), NULL, hInst, NULL); + hWnd2 = CreateWindowExA(0, "SimpleWindowClass", "Clipboard viewer test wnd 2", + WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + GetDesktopWindow(), NULL, hInst, NULL); + hWnd3 = CreateWindowExA(0, "SimpleWindowClass", "Clipboard viewer test wnd 3", + WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + GetDesktopWindow(), NULL, hInst, NULL); + trace("clipbd viewers: hWnd1=%p, hWnd2=%p, hWnd3=%p\n", hWnd1, hWnd2, hWnd3); + assert(hWnd1 && hWnd2 && hWnd3); + + flush_sequence(); + + /* Test getting the clipboard viewer and setting the viewer to NULL. */ + hOrigViewer = GetClipboardViewer(); + hRet = SetClipboardViewer(NULL); + ok_sequence(WmEmptySeq, "set viewer to NULL", FALSE); + expect_HWND(hOrigViewer, hRet); + expect_HWND(NULL, GetClipboardViewer()); + + /* Test registering hWnd1 as a viewer. */ + hRet = SetClipboardViewer(hWnd1); + wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); + ok_sequence(wm_clipboard_changed, "set viewer NULL->1", TRUE); + expect_HWND(NULL, hRet); + expect_HWND(hWnd1, GetClipboardViewer()); + + /* Test that changing the clipboard actually refreshes the registered viewer. */ + clear_clipboard(hWnd1); + wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); + ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", TRUE); + + /* Again, but with different owner. */ + clear_clipboard(hWnd2); + wm_clipboard_changed_and_owned[1].wParam = (WPARAM) GetClipboardOwner(); + ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", TRUE); + + /* Test re-registering same window. */ + hRet = SetClipboardViewer(hWnd1); + wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); + ok_sequence(wm_clipboard_changed, "set viewer 1->1", TRUE); + expect_HWND(hWnd1, hRet); + expect_HWND(hWnd1, GetClipboardViewer()); + + /* Test ChangeClipboardChain. */ + ChangeClipboardChain(hWnd2, hWnd3); + wm_change_cb_chain[0].wParam = (WPARAM) hWnd2; + wm_change_cb_chain[0].lParam = (LPARAM) hWnd3; + ok_sequence(wm_change_cb_chain, "change chain (viewer=1, remove=2, next=3)", FALSE); + expect_HWND(hWnd1, GetClipboardViewer()); + + ChangeClipboardChain(hWnd2, NULL); + wm_change_cb_chain[0].wParam = (WPARAM) hWnd2; + wm_change_cb_chain[0].lParam = 0; + ok_sequence(wm_change_cb_chain, "change chain (viewer=1, remove=2, next=NULL)", FALSE); + expect_HWND(hWnd1, GetClipboardViewer()); + + ChangeClipboardChain(NULL, hWnd2); + ok_sequence(WmEmptySeq, "change chain (viewer=1, remove=NULL, next=2)", TRUE); + expect_HWND(hWnd1, GetClipboardViewer()); + + /* Actually change clipboard viewer with ChangeClipboardChain. */ + ChangeClipboardChain(hWnd1, hWnd2); + ok_sequence(WmEmptySeq, "change chain (viewer=remove=1, next=2)", FALSE); + expect_HWND(hWnd2, GetClipboardViewer()); + + /* Test that no refresh messages are sent when viewer has unregistered. */ + clear_clipboard(hWnd2); + ok_sequence(WmEmptySeq, "clear clipd (viewer=2, owner=1)", FALSE); + + /* Register hWnd1 again. */ + ChangeClipboardChain(hWnd2, hWnd1); + ok_sequence(WmEmptySeq, "change chain (viewer=remove=2, next=1)", FALSE); + expect_HWND(hWnd1, GetClipboardViewer()); + + /* Subclass hWnd1 so that when it receives a WM_DRAWCLIPBOARD message, it + * changes the clipboard. When this happens, the system shouldn't send + * another WM_DRAWCLIPBOARD (as this could cause an infinite loop). + */ + pOldViewerProc = (WNDPROC) SetWindowLongPtrA(hWnd1, GWLP_WNDPROC, (LONG_PTR) recursive_viewer_proc); + clear_clipboard(hWnd2); + /* The clipboard owner is changed in recursive_viewer_proc: */ + wm_clipboard_changed[0].wParam = (WPARAM) hWnd2; + ok_sequence(wm_clipboard_changed, "recursive clear clipbd (viewer=1, owner=2)", TRUE); + + /* Test unregistering. */ + ChangeClipboardChain(hWnd1, NULL); + ok_sequence(WmEmptySeq, "change chain (viewer=remove=1, next=NULL)", FALSE); + expect_HWND(NULL, GetClipboardViewer()); + + clear_clipboard(hWnd1); + ok_sequence(wm_clipboard_destroyed, "clear clipbd (no viewer, owner=1)", FALSE); + + DestroyWindow(hWnd1); + DestroyWindow(hWnd2); + DestroyWindow(hWnd3); + SetClipboardViewer(hOrigViewer); +} + static void test_PostMessage(void) { static const struct @@ -11867,6 +12032,7 @@ START_TEST(msg) test_menu_messages(); test_paintingloop(); test_defwinproc(); + test_clipboard_viewers(); /* keep it the last test, under Windows it tends to break the tests * which rely on active/foreground windows being correct. */
[View Less]
1
0
0
0
Wilfried Pasquazzo : user32/tests: Test for correct scaling of DrawIcon.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 1a5db6901934ed97661d982b1c65798ccfb0334f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a5db6901934ed97661d982b1…
Author: Wilfried Pasquazzo <wilfried.pasquazzo(a)gmail.com> Date: Tue Sep 22 15:56:06 2009 +0000 user32/tests: Test for correct scaling of DrawIcon. --- dlls/user32/tests/cursoricon.c | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/
…
[View More]
tests/cursoricon.c index 3f8bd82..064f6c7 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1039,6 +1039,8 @@ static void check_DrawIcon(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, COLOR HICON hicon = create_test_icon(hdc, 1, 1, bpp, maskvalue, &color, sizeof(color)); if (!hicon) return; SetPixelV(hdc, 0, 0, background); + SetPixelV(hdc, GetSystemMetrics(SM_CXICON)-1, GetSystemMetrics(SM_CYICON)-1, background); + SetPixelV(hdc, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), background); DrawIcon(hdc, 0, 0, hicon); result = GetPixel(hdc, 0, 0); @@ -1047,6 +1049,21 @@ static void check_DrawIcon(HDC hdc, BOOL maskvalue, UINT32 color, int bpp, COLOR "Overlaying Mask %d on Color %06X with DrawIcon. " "Expected a close match to %06X (modern), or %06X (legacy). Got %06X from line %d\n", maskvalue, color, modern_expected, legacy_expected, result, line); + + result = GetPixel(hdc, GetSystemMetrics(SM_CXICON)-1, GetSystemMetrics(SM_CYICON)-1); + + ok (color_match(result, modern_expected) || /* Windows 2000 and up */ + broken(color_match(result, legacy_expected)), /* Windows NT 4.0, 9X and below */ + "Overlaying Mask %d on Color %06X with DrawIcon. " + "Expected a close match to %06X (modern), or %06X (legacy). Got %06X from line %d\n", + maskvalue, color, modern_expected, legacy_expected, result, line); + + result = GetPixel(hdc, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON)); + + ok (color_match(result, background), + "Overlaying Mask %d on Color %06X with DrawIcon. " + "Expected unchanged background color %06X. Got %06X from line %d\n", + maskvalue, color, background, result, line); } static void test_DrawIcon(void) @@ -1070,8 +1087,8 @@ static void test_DrawIcon(void) memset(&bitmapInfo, 0, sizeof(bitmapInfo)); bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bitmapInfo.bmiHeader.biWidth = 1; - bitmapInfo.bmiHeader.biHeight = 1; + bitmapInfo.bmiHeader.biWidth = GetSystemMetrics(SM_CXICON)+1; + bitmapInfo.bmiHeader.biHeight = GetSystemMetrics(SM_CYICON)+1; bitmapInfo.bmiHeader.biBitCount = 32; bitmapInfo.bmiHeader.biPlanes = 1; bitmapInfo.bmiHeader.biCompression = BI_RGB;
[View Less]
1
0
0
0
Wilfried Pasquazzo : user32: Correct scaling of DrawIcon.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 32ca9b27c376af255dacd67c2744b3b5285b8cf1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32ca9b27c376af255dacd67c2…
Author: Wilfried Pasquazzo <wilfried.pasquazzo(a)gmail.com> Date: Tue Sep 22 14:20:28 2009 +0000 user32: Correct scaling of DrawIcon. --- dlls/user32/cursoricon.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 48a1a59..23de6a5
…
[View More]
100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1715,7 +1715,9 @@ BOOL WINAPI DrawIcon( HDC hdc, INT x, INT y, HICON hIcon ) /* Do the alpha blending render */ premultiply_alpha_channel(dibBits, xorBitmapBits, dibLength); hBitTemp = SelectObject( hMemDC, hXorBits ); - GdiAlphaBlend(hdc, x, y, ptr->nWidth, ptr->nHeight, hMemDC, + /* Destination width/height has to be "System Large" size */ + GdiAlphaBlend(hdc, x, y, GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), hMemDC, 0, 0, ptr->nWidth, ptr->nHeight, pixelblend); SelectObject( hMemDC, hBitTemp ); } @@ -1729,9 +1731,13 @@ BOOL WINAPI DrawIcon( HDC hdc, INT x, INT y, HICON hIcon ) if (hXorBits && hAndBits) { hBitTemp = SelectObject( hMemDC, hAndBits ); - BitBlt( hdc, x, y, ptr->nWidth, ptr->nHeight, hMemDC, 0, 0, SRCAND ); + StretchBlt( hdc, x, y, GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), hMemDC, 0, 0, + ptr->nWidth, ptr->nHeight, SRCAND ); SelectObject( hMemDC, hXorBits ); - BitBlt(hdc, x, y, ptr->nWidth, ptr->nHeight, hMemDC, 0, 0,SRCINVERT); + StretchBlt( hdc, x, y, GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), hMemDC, 0, 0, + ptr->nWidth, ptr->nHeight, SRCINVERT ); SelectObject( hMemDC, hBitTemp ); } }
[View Less]
1
0
0
0
Huw Davies : oledb32: Implement DBTYPE_STR and DBTYPE_WSTR src types.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 4a61c1d265adc3cbfee7edb7ac4abf310735c4a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a61c1d265adc3cbfee7edb7a…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Sep 22 16:58:24 2009 +0100 oledb32: Implement DBTYPE_STR and DBTYPE_WSTR src types. --- dlls/oledb32/convert.c | 43 +++++++++++++++++++++++++++++++++++++++++- dlls/oledb32/tests/convert.c | 16 --------------- 2 files changed, 42 insertions(+), 17 deletions(-)
…
[View More]
diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index f49a699..9803caf 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -25,6 +25,7 @@ #include "windef.h" #include "winbase.h" +#include "winnls.h" #include "ole2.h" #include "msdadc.h" #include "oledberr.h" @@ -143,7 +144,7 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, convert *This = impl_from_IDataConvert(iface); HRESULT hr; - TRACE("(%p)->(%d, %d, %d, %p, %p, %p, %d, %d, %p, %d, %d, %x): stub\n", This, + TRACE("(%p)->(%d, %d, %d, %p, %p, %p, %d, %d, %p, %d, %d, %x)\n", This, src_type, dst_type, src_len, dst_len, src, dst, dst_max_len, src_status, dst_status, precision, scale, flags); @@ -155,6 +156,46 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, return DB_E_UNSUPPORTEDCONVERSION; } + if(src_type == DBTYPE_STR) + { + BSTR b; + DWORD len; + + if(flags & DBDATACONVERT_LENGTHFROMNTS) + len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0) - 1; + else + len = MultiByteToWideChar(CP_ACP, 0, src, src_len, NULL, 0); + b = SysAllocStringLen(NULL, len); + if(!b) return E_OUTOFMEMORY; + if(flags & DBDATACONVERT_LENGTHFROMNTS) + MultiByteToWideChar(CP_ACP, 0, src, -1, b, len + 1); + else + MultiByteToWideChar(CP_ACP, 0, src, src_len, b, len); + + hr = IDataConvert_DataConvert(iface, DBTYPE_BSTR, dst_type, 0, dst_len, + &b, dst, dst_max_len, src_status, dst_status, + precision, scale, flags); + + SysFreeString(b); + return hr; + } + + if(src_type == DBTYPE_WSTR) + { + BSTR b; + + if(flags & DBDATACONVERT_LENGTHFROMNTS) + b = SysAllocString(src); + else + b = SysAllocStringLen(src, src_len / 2); + if(!b) return E_OUTOFMEMORY; + hr = IDataConvert_DataConvert(iface, DBTYPE_BSTR, dst_type, 0, dst_len, + &b, dst, dst_max_len, src_status, dst_status, + precision, scale, flags); + SysFreeString(b); + return hr; + } + switch(dst_type) { case DBTYPE_I4: diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index acda3a9..7a733c2 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -541,49 +541,33 @@ todo_wine i4 = 0x12345678; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 2, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); -todo_wine -{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); -} ok(dst_len == sizeof(i4), "got %d\n", dst_len); -todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); -todo_wine -{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); -} ok(dst_len == sizeof(i4), "got %d\n", dst_len); -todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 4, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); -todo_wine -{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); -} ok(dst_len == sizeof(i4), "got %d\n", dst_len); -todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); -todo_wine -{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); -} ok(dst_len == sizeof(i4), "got %d\n", dst_len); -todo_wine ok(i4 == 10, "got %08x\n", i4); IDataConvert_Release(convert);
[View Less]
1
0
0
0
Huw Davies : oledb32: Implement some conversions to DBTYPE_I4.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: a3d947c70f0a36915fcf9268fcb6bd017728498b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3d947c70f0a36915fcf9268f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Sep 22 16:17:22 2009 +0100 oledb32: Implement some conversions to DBTYPE_I4. --- dlls/oledb32/convert.c | 96 +++++++++++++++++++++++++++++++++++++----- dlls/oledb32/tests/convert.c | 57 +++++++++++++++++++----- 2 files changed, 130 insertions(+), 23 deletions(
…
[View More]
-) diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index a2385f0..f49a699 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -109,21 +109,95 @@ static ULONG WINAPI convert_Release(IDataConvert* iface) return ref; } +static int get_length(DBTYPE type) +{ + switch(type) + { + case DBTYPE_I1: + case DBTYPE_UI1: + return 1; + case DBTYPE_I2: + case DBTYPE_UI2: + return 2; + case DBTYPE_I4: + case DBTYPE_UI4: + return 4; + case DBTYPE_I8: + case DBTYPE_UI8: + return 8; + default: + FIXME("Unhandled type %04x\n", type); + return 0; + } +} + static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, - DBTYPE wSrcType, DBTYPE wDstType, - DBLENGTH cbSrcLength, DBLENGTH *pcbDstLength, - void *pSrc, void *pDst, - DBLENGTH cbDstMaxLength, - DBSTATUS dbsSrcStatus, DBSTATUS *pdbsDstStatus, - BYTE bPrecision, BYTE bScale, - DBDATACONVERT dwFlags) + DBTYPE src_type, DBTYPE dst_type, + DBLENGTH src_len, DBLENGTH *dst_len, + void *src, void *dst, + DBLENGTH dst_max_len, + DBSTATUS src_status, DBSTATUS *dst_status, + BYTE precision, BYTE scale, + DBDATACONVERT flags) { convert *This = impl_from_IDataConvert(iface); - FIXME("(%p)->(%d, %d, %d, %p, %p, %p, %d, %d, %p, %d, %d, %x): stub\n", This, - wSrcType, wDstType, cbSrcLength, pcbDstLength, pSrc, pDst, cbDstMaxLength, - dbsSrcStatus, pdbsDstStatus, bPrecision, bScale, dwFlags); + HRESULT hr; - return E_NOTIMPL; + TRACE("(%p)->(%d, %d, %d, %p, %p, %p, %d, %d, %p, %d, %d, %x): stub\n", This, + src_type, dst_type, src_len, dst_len, src, dst, dst_max_len, + src_status, dst_status, precision, scale, flags); + + *dst_len = get_length(dst_type); + *dst_status = DBSTATUS_E_BADACCESSOR; + + if(IDataConvert_CanConvert(iface, src_type, dst_type) != S_OK) + { + return DB_E_UNSUPPORTEDCONVERSION; + } + + switch(dst_type) + { + case DBTYPE_I4: + { + signed int *d = dst; + switch(src_type) + { + case DBTYPE_EMPTY: *d = 0; hr = S_OK; break; + case DBTYPE_I2: hr = VarI4FromI2(*(signed short*)src, d); break; + case DBTYPE_I4: *d = *(signed int*)src; hr = S_OK; break; + case DBTYPE_R4: hr = VarI4FromR4(*(FLOAT*)src, d); break; + case DBTYPE_R8: hr = VarI4FromR8(*(double*)src, d); break; + case DBTYPE_CY: hr = VarI4FromCy(*(CY*)src, d); break; + case DBTYPE_DATE: hr = VarI4FromDate(*(DATE*)src, d); break; + case DBTYPE_BSTR: hr = VarI4FromStr(*(WCHAR**)src, LOCALE_USER_DEFAULT, 0, d); break; + case DBTYPE_BOOL: hr = VarI4FromBool(*(VARIANT_BOOL*)src, d); break; + case DBTYPE_DECIMAL: hr = VarI4FromDec((DECIMAL*)src, d); break; + case DBTYPE_I1: hr = VarI4FromI1(*(signed char*)src, d); break; + case DBTYPE_UI1: hr = VarI4FromUI1(*(BYTE*)src, d); break; + case DBTYPE_UI2: hr = VarI4FromUI2(*(WORD*)src, d); break; + case DBTYPE_UI4: hr = VarI4FromUI4(*(DWORD*)src, d); break; + case DBTYPE_I8: hr = VarI4FromI8(*(LONGLONG*)src, d); break; + case DBTYPE_UI8: hr = VarI4FromUI8(*(ULONGLONG*)src, d); break; + default: FIXME("Unimplemented conversion %04x -> I4\n", src_type); return E_NOTIMPL; + } + break; + } + + default: + FIXME("Unimplemented conversion %04x -> %04x\n", src_type, dst_type); + return E_NOTIMPL; + + } + + if(hr == DISP_E_OVERFLOW) + { + *dst_status = DBSTATUS_E_DATAOVERFLOW; + hr = DB_E_ERRORSOCCURRED; + } + else if(hr == S_OK) + *dst_status = DBSTATUS_S_OK; + + return hr; } static inline WORD get_dbtype_class(DBTYPE type) diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 7c3fd20..acda3a9 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -356,8 +356,6 @@ static void test_converttoi4(void) return; } -todo_wine -{ i4 = 0x12345678; hr = IDataConvert_DataConvert(convert, DBTYPE_EMPTY, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); ok(hr == S_OK, "got %08x\n", hr); @@ -370,11 +368,8 @@ todo_wine ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); ok(dst_len == sizeof(i4), "got %d\n", dst_len); -} ok(i4 == 0x12345678, "got %08x\n", i4); -todo_wine -{ i4 = 0x12345678; *(short *)src = 0x4321; hr = IDataConvert_DataConvert(convert, DBTYPE_I2, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); @@ -447,11 +442,8 @@ todo_wine ok(hr == DB_E_UNSUPPORTEDCONVERSION, "got %08x\n", hr); ok(dst_status == DBSTATUS_E_BADACCESSOR, "got %08x\n", dst_status); ok(dst_len == sizeof(i4), "got %d\n", dst_len); -} ok(i4 == 0x12345678, "got %08x\n", i4); -todo_wine -{ i4 = 0x12345678; *(VARIANT_BOOL *)src = VARIANT_TRUE; hr = IDataConvert_DataConvert(convert, DBTYPE_BOOL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); @@ -472,6 +464,19 @@ todo_wine V_VT((VARIANT*)src) = VT_I2; V_I2((VARIANT*)src) = 0x1234; hr = IDataConvert_DataConvert(convert, DBTYPE_VARIANT, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); +todo_wine +{ + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); +} + ok(dst_len == sizeof(i4), "got %d\n", dst_len); +todo_wine + ok(i4 == 0x1234, "got %08x\n", i4); + + i4 = 0x12345678; + memset(src, 0, sizeof(DECIMAL)); + ((DECIMAL*)src)->u1.Lo64 = 0x1234; + hr = IDataConvert_DataConvert(convert, DBTYPE_DECIMAL, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); ok(dst_len == sizeof(i4), "got %d\n", dst_len); @@ -507,11 +512,8 @@ todo_wine ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); ok(dst_len == sizeof(i4), "got %d\n", dst_len); -} ok(i4 == 0x12345678, "got %08x\n", i4); -todo_wine -{ i4 = 0x12345678; *(DWORD*)src = 0x1234abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_UI4, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); @@ -521,37 +523,68 @@ todo_wine ok(i4 == 0x1234abcd, "got %08x\n", i4); i4 = 0x12345678; + ((LARGE_INTEGER*)src)->QuadPart = 0x1234abcd; + hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(i4), "got %d\n", dst_len); + ok(i4 == 0x1234abcd, "got %08x\n", i4); + + i4 = 0x12345678; + ((ULARGE_INTEGER*)src)->QuadPart = 0x1234abcd; + hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(i4), "got %d\n", dst_len); + ok(i4 == 0x1234abcd, "got %08x\n", i4); + + i4 = 0x12345678; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 2, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); +todo_wine +{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); +} ok(dst_len == sizeof(i4), "got %d\n", dst_len); +todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; strcpy((char *)src, "10"); hr = IDataConvert_DataConvert(convert, DBTYPE_STR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); +todo_wine +{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); +} ok(dst_len == sizeof(i4), "got %d\n", dst_len); +todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 4, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); +todo_wine +{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); +} ok(dst_len == sizeof(i4), "got %d\n", dst_len); +todo_wine ok(i4 == 10, "got %08x\n", i4); i4 = 0x12345678; memcpy(src, ten, sizeof(ten)); hr = IDataConvert_DataConvert(convert, DBTYPE_WSTR, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, DBDATACONVERT_LENGTHFROMNTS); +todo_wine +{ ok(hr == S_OK, "got %08x\n", hr); ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); +} ok(dst_len == sizeof(i4), "got %d\n", dst_len); +todo_wine ok(i4 == 10, "got %08x\n", i4); -} IDataConvert_Release(convert); }
[View Less]
1
0
0
0
Ge van Geldorp : mshtml/tests: Fix htmldoc test on Windows Server and Win7.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 73b3d35d05992688e815237752a7f40700e5be87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73b3d35d05992688e81523775…
Author: Ge van Geldorp <ggeldorp(a)vmware.com> Date: Wed Sep 23 12:37:28 2009 +0200 mshtml/tests: Fix htmldoc test on Windows Server and Win7. --- dlls/mshtml/tests/dom.c | 22 +--------------------- dlls/mshtml/tests/htmldoc.c | 28 +++++++++++++++++++++++----- dlls/mshtml/tests/mshtml_test.h | 38 +++++++
…
[View More]
+++++++++++++++++++++++++++++++ dlls/mshtml/tests/script.c | 22 +--------------------- dlls/urlmon/tests/sec_mgr.c | 2 +- 5 files changed, 64 insertions(+), 48 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index b489ce0..fd7cc44 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -31,6 +31,7 @@ #include "mshtmhst.h" #include "docobj.h" #include "dispex.h" +#include "mshtml_test.h" static const char doc_blank[] = "<html></html>"; static const char doc_str1[] = "<html><body>test</body></html>"; @@ -5394,27 +5395,6 @@ static void gecko_installer_workaround(BOOL disable) RegCloseKey(hkey); } -/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ -/* Note: this code is duplicated in dlls/mshtml/tests/dom.c, dlls/mshtml/tests/script.c and dlls/urlmon/tests/sec_mgr.c */ -static BOOL is_ie_hardened(void) -{ - HKEY zone_map; - DWORD ie_harden, type, size; - - ie_harden = 0; - if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap", - 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { - size = sizeof(DWORD); - if (RegQueryValueEx(zone_map, "IEHarden", NULL, &type, (LPBYTE) &ie_harden, &size) != ERROR_SUCCESS || - type != REG_DWORD) { - ie_harden = 0; - } - RegCloseKey(zone_map); - } - - return ie_harden != 0; -} - START_TEST(dom) { gecko_installer_workaround(TRUE); diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 1eb0cea..7a4d5ee 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -37,6 +37,7 @@ #include "idispids.h" #include "shlguid.h" #include "perhist.h" +#include "mshtml_test.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); DEFINE_GUID(IID_IProxyManager,0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); @@ -104,6 +105,7 @@ DEFINE_EXPECT(Exec_ShellDocView_37); DEFINE_EXPECT(Exec_ShellDocView_84); DEFINE_EXPECT(Exec_ShellDocView_103); DEFINE_EXPECT(Exec_ShellDocView_105); +DEFINE_EXPECT(Exec_ShellDocView_140); DEFINE_EXPECT(Exec_UPDATECOMMANDS); DEFINE_EXPECT(Exec_SETTITLE); DEFINE_EXPECT(Exec_HTTPEQUIV); @@ -2310,6 +2312,14 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID return E_NOTIMPL; + case 140: + CHECK_EXPECT2(Exec_ShellDocView_140); + + ok(pvaIn == NULL, "pvaIn != NULL\n"); + ok(pvaOut == NULL, "pvaOut != NULL\n"); + + return E_NOTIMPL; + default: ok(0, "unexpected command %d\n", nCmdID); return E_FAIL; @@ -2499,9 +2509,10 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; DEFINE_GUID(IID_unk1, 0xD48A6EC6,0x6A4A,0x11CF,0x94,0xA7,0x44,0x45,0x53,0x54,0x00,0x00); /* HTMLWindow2 ? */ -DEFINE_GUID(IID_unk2, 0x7BB0B520,0xB1A7,0x11D2,0xBB,0x23,0x00,0xC0,0x4F,0x79,0xAB,0xCD); -DEFINE_GUID(IID_unk3, 0x000670BA,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); +DEFINE_GUID(IID_IThumbnailView, 0x7BB0B520,0xB1A7,0x11D2,0xBB,0x23,0x00,0xC0,0x4F,0x79,0xAB,0xCD); +DEFINE_GUID(IID_IRenMailEditor, 0x000670BA,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_unk4, 0x305104a6,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b); +DEFINE_GUID(IID_IDocHostUIHandlerPriv, 0xf0d241d1,0x5d0e,0x4e85,0xbc,0xb4,0xfa,0xd7,0xf7,0xc5,0x52,0x8c); static HRESULT QueryInterface(REFIID riid, void **ppv) { @@ -2533,12 +2544,14 @@ static HRESULT QueryInterface(REFIID riid, void **ppv) return E_NOINTERFACE; /* ? */ else if(IsEqualGUID(&IID_unk1, riid)) return E_NOINTERFACE; /* HTMLWindow2 ? */ - else if(IsEqualGUID(&IID_unk2, riid)) + else if(IsEqualGUID(&IID_IThumbnailView, riid)) return E_NOINTERFACE; /* ? */ - else if(IsEqualGUID(&IID_unk3, riid)) + else if(IsEqualGUID(&IID_IRenMailEditor, riid)) return E_NOINTERFACE; /* ? */ else if(IsEqualGUID(&IID_unk4, riid)) return E_NOINTERFACE; /* ? */ + else if(IsEqualGUID(&IID_IDocHostUIHandlerPriv, riid)) + return E_NOINTERFACE; /* ? */ else ok(0, "unexpected riid %s\n", debugstr_guid(riid)); @@ -2811,6 +2824,7 @@ static void test_download(DWORD flags) SET_EXPECT(Exec_SETDOWNLOADSTATE_0); SET_EXPECT(Exec_ShellDocView_103); SET_EXPECT(Exec_ShellDocView_105); + SET_EXPECT(Exec_ShellDocView_140); SET_EXPECT(Exec_MSHTML_PARSECOMPLETE); SET_EXPECT(Exec_HTTPEQUIV_DONE); SET_EXPECT(SetStatusText); @@ -2870,6 +2884,7 @@ static void test_download(DWORD flags) CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); SET_CALLED(Exec_ShellDocView_103); SET_CALLED(Exec_ShellDocView_105); + SET_CALLED(Exec_ShellDocView_140); CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE); CHECK_CALLED(Exec_HTTPEQUIV_DONE); SET_CALLED(SetStatusText); @@ -4030,7 +4045,10 @@ static void test_HTMLDocument_http(void) return; } - test_download(DWL_HTTP); + if (winetest_interactive || ! is_ie_hardened()) + test_download(DWL_HTTP); + else + win_skip("IE running in Enhanced Security Configuration\n"); test_IsDirty(unk, S_FALSE); test_MSHTML_QueryStatus(unk, OLECMDF_SUPPORTED); diff --git a/dlls/mshtml/tests/mshtml_test.h b/dlls/mshtml/tests/mshtml_test.h new file mode 100644 index 0000000..7768f75 --- /dev/null +++ b/dlls/mshtml/tests/mshtml_test.h @@ -0,0 +1,38 @@ +/* + * Copyright 2009 Ge van Geldorp + * + * 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 + */ + +/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ +/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */ +static BOOL is_ie_hardened(void) +{ + HKEY zone_map; + DWORD ie_harden, type, size; + + ie_harden = 0; + if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap", + 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { + size = sizeof(DWORD); + if (RegQueryValueEx(zone_map, "IEHarden", NULL, &type, (LPBYTE) &ie_harden, &size) != ERROR_SUCCESS || + type != REG_DWORD) { + ie_harden = 0; + } + RegCloseKey(zone_map); + } + + return ie_harden != 0; +} diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index bc140bd..a4ef3d0 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -33,6 +33,7 @@ #include "activdbg.h" #include "objsafe.h" #include "mshtmdid.h" +#include "mshtml_test.h" DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); @@ -1404,27 +1405,6 @@ static void gecko_installer_workaround(BOOL disable) RegCloseKey(hkey); } -/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ -/* Note: this code is duplicated in dlls/mshtml/tests/dom.c, dlls/mshtml/tests/script.c and dlls/urlmon/tests/sec_mgr.c */ -static BOOL is_ie_hardened(void) -{ - HKEY zone_map; - DWORD ie_harden, type, size; - - ie_harden = 0; - if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap", - 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { - size = sizeof(DWORD); - if (RegQueryValueEx(zone_map, "IEHarden", NULL, &type, (LPBYTE) &ie_harden, &size) != ERROR_SUCCESS || - type != REG_DWORD) { - ie_harden = 0; - } - RegCloseKey(zone_map); - } - - return ie_harden != 0; -} - START_TEST(script) { gecko_installer_workaround(TRUE); diff --git a/dlls/urlmon/tests/sec_mgr.c b/dlls/urlmon/tests/sec_mgr.c index e607259..9d9e19c 100644 --- a/dlls/urlmon/tests/sec_mgr.c +++ b/dlls/urlmon/tests/sec_mgr.c @@ -168,7 +168,7 @@ static void test_SecurityManager(void) } /* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ -/* Note: this code is duplicated in dlls/mshtml/tests/dom.c, dlls/mshtml/tests/script.c and dlls/urlmon/tests/sec_mgr.c */ +/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */ static BOOL is_ie_hardened(void) { HKEY zone_map;
[View Less]
1
0
0
0
Alexandre Julliard : oleaut32: Use the appropriate PSFactoryBuffer guid when registering interfaces.
by Alexandre Julliard
23 Sep '09
23 Sep '09
Module: wine Branch: master Commit: 9cb140c43dc1eeb2b3d7a2fbf479e98ca09520f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9cb140c43dc1eeb2b3d7a2fbf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 23 14:32:01 2009 +0200 oleaut32: Use the appropriate PSFactoryBuffer guid when registering interfaces. --- dlls/oleaut32/Makefile.in | 3 +- dlls/oleaut32/oleaut.c | 16 ++++++++------ dlls/oleaut32/regsvr.c | 51 +++-------------------------------
…
[View More]
---------- 3 files changed, 15 insertions(+), 55 deletions(-) diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in index 7e90511..a8ab7b4 100644 --- a/dlls/oleaut32/Makefile.in +++ b/dlls/oleaut32/Makefile.in @@ -7,7 +7,8 @@ IMPORTLIB = oleaut32 IMPORTS = uuid ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll DELAYIMPORTS = comctl32 urlmon windowscodecs EXTRADEFS = -D_OLEAUT32_ -DCOM_NO_WINDOWS_H \ - -DENTRY_PREFIX=OLEAUTPS_ -DPROXY_CLSID=CLSID_PSDispatch -DPROXY_DELEGATION -DREGISTER_PROXY_DLL + -DENTRY_PREFIX=OLEAUTPS_ -DPROXY_DELEGATION -DREGISTER_PROXY_DLL \ + -DPROXY_CLSID_IS="{0xb196b286,0xbab4,0x101a,{0xb6,0x9c,0x00,0xaa,0x00,0x34,0x1d,0x07}}" C_SRCS = \ connpt.c \ diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 0eaddb1..896d6d4 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -696,6 +696,7 @@ HRESULT WINAPI OleTranslateColor( extern HRESULT WINAPI OLEAUTPS_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN; extern BOOL WINAPI OLEAUTPS_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN; +extern GUID const CLSID_PSFactoryBuffer DECLSPEC_HIDDEN; extern void _get_STDFONT_CF(LPVOID *); extern void _get_STDPIC_CF(LPVOID *); @@ -728,7 +729,7 @@ static HRESULT WINAPI PSDispatchFacBuf_CreateProxy(IPSFactoryBuffer *iface, IUnk HRESULT hr; if (IsEqualIID(riid, &IID_IDispatch)) - hr = OLEAUTPS_DllGetClassObject(&CLSID_PSDispatch, &IID_IPSFactoryBuffer, (void **)&pPSFB); + hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&pPSFB); else hr = TMARSHAL_DllGetClassObject(&CLSID_PSOAInterface, &IID_IPSFactoryBuffer, (void **)&pPSFB); @@ -746,7 +747,7 @@ static HRESULT WINAPI PSDispatchFacBuf_CreateStub(IPSFactoryBuffer *iface, REFII HRESULT hr; if (IsEqualIID(riid, &IID_IDispatch)) - hr = OLEAUTPS_DllGetClassObject(&CLSID_PSDispatch, &IID_IPSFactoryBuffer, (void **)&pPSFB); + hr = OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, &IID_IPSFactoryBuffer, (void **)&pPSFB); else hr = TMARSHAL_DllGetClassObject(&CLSID_PSOAInterface, &IID_IPSFactoryBuffer, (void **)&pPSFB); @@ -790,11 +791,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return S_OK; } } - if (IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) || - IsEqualCLSID(rclsid, &CLSID_PSTypeLib) || - IsEqualCLSID(rclsid, &CLSID_PSEnumVariant)) { - return OLEAUTPS_DllGetClassObject(&CLSID_PSDispatch, iid, ppv); - } if (IsEqualCLSID(rclsid, &CLSID_PSDispatch) && IsEqualIID(iid, &IID_IPSFactoryBuffer)) { *ppv = &pPSDispatchFacBuf; IPSFactoryBuffer_AddRef((IPSFactoryBuffer *)*ppv); @@ -805,6 +801,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return S_OK; /*FALLTHROUGH*/ } + if (IsEqualCLSID(rclsid, &CLSID_PSTypeInfo) || + IsEqualCLSID(rclsid, &CLSID_PSTypeLib) || + IsEqualCLSID(rclsid, &CLSID_PSDispatch) || + IsEqualCLSID(rclsid, &CLSID_PSEnumVariant)) + return OLEAUTPS_DllGetClassObject(&CLSID_PSFactoryBuffer, iid, ppv); + return OLEAUTPS_DllGetClassObject(rclsid, iid, ppv); } diff --git a/dlls/oleaut32/regsvr.c b/dlls/oleaut32/regsvr.c index 75deac7..12f64fa 100644 --- a/dlls/oleaut32/regsvr.c +++ b/dlls/oleaut32/regsvr.c @@ -413,9 +413,6 @@ static GUID const CLSID_RecordInfo = { static GUID const CLSID_OldFont = { 0x46763EE0, 0xCAB2, 0x11CE, {0x8C,0x20,0x00,0xAA,0x00,0x51,0xE5,0xD4} }; -static GUID const CLSID_PSFactoryBuffer = { - 0xB196B286, 0xBAB4, 0x101A, {0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07} }; - static struct regsvr_coclass const coclass_list[] = { { &CLSID_RecordInfo, "CLSID_RecordInfo", @@ -483,12 +480,6 @@ static struct regsvr_coclass const coclass_list[] = { "Obsolete Font", "OldFont" }, - { &CLSID_PSFactoryBuffer, - "PSFactoryBuffer", - NULL, - "oleaut32.dll", - "Both" - }, { NULL } /* list terminator */ }; @@ -497,7 +488,6 @@ static struct regsvr_coclass const coclass_list[] = { */ #define INTERFACE_ENTRY(interface, clsid16, clsid32) { &IID_##interface, #interface, NULL, sizeof(interface##Vtbl)/sizeof(void*), clsid16, clsid32 } #define LCL_INTERFACE_ENTRY(interface) INTERFACE_ENTRY(interface, NULL, NULL) -#define PSFAC_INTERFACE_ENTRY(interface) INTERFACE_ENTRY(interface, NULL, &CLSID_PSFactoryBuffer) #define CLSID_INTERFACE_ENTRY(interface,clsid) INTERFACE_ENTRY(interface, clsid, clsid) static struct regsvr_interface const interface_list[] = { @@ -508,43 +498,10 @@ static struct regsvr_interface const interface_list[] = { CLSID_INTERFACE_ENTRY(ITypeComp,&CLSID_PSTypeComp), CLSID_INTERFACE_ENTRY(ITypeInfo,&CLSID_PSTypeInfo), CLSID_INTERFACE_ENTRY(ITypeLib,&CLSID_PSTypeLib), - PSFAC_INTERFACE_ENTRY(IAdviseSinkEx), - PSFAC_INTERFACE_ENTRY(IClassFactory2), - PSFAC_INTERFACE_ENTRY(IConnectionPoint), - PSFAC_INTERFACE_ENTRY(IConnectionPointContainer), - PSFAC_INTERFACE_ENTRY(ICreateErrorInfo), - PSFAC_INTERFACE_ENTRY(IEnumConnectionPoints), - PSFAC_INTERFACE_ENTRY(IEnumConnections), - PSFAC_INTERFACE_ENTRY(IEnumOleUndoUnits), - PSFAC_INTERFACE_ENTRY(IErrorInfo), - PSFAC_INTERFACE_ENTRY(IErrorLog), - PSFAC_INTERFACE_ENTRY(IFont), - PSFAC_INTERFACE_ENTRY(IObjectWithSite), - PSFAC_INTERFACE_ENTRY(IOleControl), - PSFAC_INTERFACE_ENTRY(IOleControlSite), - PSFAC_INTERFACE_ENTRY(IOleInPlaceSiteEx), - PSFAC_INTERFACE_ENTRY(IOleParentUndoUnit), - PSFAC_INTERFACE_ENTRY(IOleUndoManager), - PSFAC_INTERFACE_ENTRY(IOleUndoUnit), - PSFAC_INTERFACE_ENTRY(IPerPropertyBrowsing), - PSFAC_INTERFACE_ENTRY(IPersistMemory), - PSFAC_INTERFACE_ENTRY(IPersistPropertyBag), - PSFAC_INTERFACE_ENTRY(IPersistPropertyBag2), - PSFAC_INTERFACE_ENTRY(IPersistStreamInit), - PSFAC_INTERFACE_ENTRY(IPicture), - PSFAC_INTERFACE_ENTRY(IPointerInactive), - PSFAC_INTERFACE_ENTRY(IPropertyBag), - PSFAC_INTERFACE_ENTRY(IPropertyBag2), - PSFAC_INTERFACE_ENTRY(IPropertyNotifySink), - PSFAC_INTERFACE_ENTRY(IPropertyPage), - PSFAC_INTERFACE_ENTRY(IPropertyPage2), - PSFAC_INTERFACE_ENTRY(IPropertyPageSite), - PSFAC_INTERFACE_ENTRY(IProvideClassInfo), - PSFAC_INTERFACE_ENTRY(IProvideClassInfo2), - PSFAC_INTERFACE_ENTRY(IProvideMultipleClassInfo), - PSFAC_INTERFACE_ENTRY(IQuickActivate), - PSFAC_INTERFACE_ENTRY(ISimpleFrameSite), - PSFAC_INTERFACE_ENTRY(ISpecifyPropertyPages), + INTERFACE_ENTRY(ISupportErrorInfo,NULL,&CLSID_PSDispatch), + INTERFACE_ENTRY(ITypeFactory,NULL,&CLSID_PSDispatch), + INTERFACE_ENTRY(ITypeInfo2,NULL,&CLSID_PSDispatch), + INTERFACE_ENTRY(ITypeLib2,NULL,&CLSID_PSDispatch), { NULL } /* list terminator */ };
[View Less]
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
87
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
Results per page:
10
25
50
100
200