winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2014
----- 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
503 discussions
Start a n
N
ew thread
Nikolay Sivov : ntdll: Use case-insensitive matching for typelib flags.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 88fc9164422f48fc67fee58753753e60d09b5058 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88fc9164422f48fc67fee5875…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:17:44 2014 +0400 ntdll: Use case-insensitive matching for typelib flags. Spotted by Austin English. --- dlls/kernel32/tests/actctx.c | 2 +- dlls/ntdll/actctx.c | 8 ++++---- dlls/oleaut32/tests/typelib.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 06b5c9c..ae9674a 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -186,7 +186,7 @@ static const char manifest_wndcls2[] = " <windowClass versioned=\"no\">wndClass3</windowClass>" " <windowClass>wndClass4</windowClass>" " <typelib tlbid=\"{99999999-8888-7777-6666-555555555555}\" version=\"1.0\" helpdir=\"help\" resourceid=\"409\"" -" flags=\"HIDDEN,CONTROL,RESTRICTED\" />" +" flags=\"HiddeN,CoNTROL,rESTRICTED\" />" " <typelib tlbid=\"{99999999-8888-7777-6666-555555555556}\" version=\"1.0\" helpdir=\"help1\" resourceid=\"409\" />" " <typelib tlbid=\"{99999999-8888-7777-6666-555555555557}\" version=\"1.0\" helpdir=\"\" />" "</file>" diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index bdbb330..5d88b9a 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1646,13 +1646,13 @@ static BOOL parse_typelib_flags(const xmlstr_t *value, struct entity *entity) start = str; while (*str != ',' && (i++ < value->len)) str++; - if (!strncmpW(start, restrictedW, str-start)) + if (!strncmpiW(start, restrictedW, str-start)) *flags |= LIBFLAG_FRESTRICTED; - else if (!strncmpW(start, controlW, str-start)) + else if (!strncmpiW(start, controlW, str-start)) *flags |= LIBFLAG_FCONTROL; - else if (!strncmpW(start, hiddenW, str-start)) + else if (!strncmpiW(start, hiddenW, str-start)) *flags |= LIBFLAG_FHIDDEN; - else if (!strncmpW(start, hasdiskimageW, str-start)) + else if (!strncmpiW(start, hasdiskimageW, str-start)) *flags |= LIBFLAG_FHASDISKIMAGE; else { diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 73ec679..7adf064 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -4806,7 +4806,7 @@ static const char manifest_dep[] = "<assemblyIdentity version=\"1.2.3.4\" name=\"testdep\" type=\"win32\" processorArchitecture=\"" ARCH "\"/>" "<file name=\"test_actctx_tlb.tlb\">" " <typelib tlbid=\"{d96d8a3e-78b6-4c8d-8f27-059db959be8a}\" version=\"2.7\" helpdir=\"\" resourceid=\"409\"" -" flags=\"RESTRICTED,CONTROL\"" +" flags=\"Restricted,cONTROL\"" " />" "</file>" "<file name=\"test_actctx_tlb2.tlb\">"
1
0
0
0
Nikolay Sivov : oleaut32: Some tests for IFontEventsDisp change event.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 0fb770492d30b8fee4a295a08fc0c98e0b63f12a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0fb770492d30b8fee4a295a08…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:17:19 2014 +0400 oleaut32: Some tests for IFontEventsDisp change event. --- dlls/oleaut32/olefont.c | 5 +- dlls/oleaut32/tests/olefont.c | 167 +++++++++++++++++++++++++++++++---------- 2 files changed, 130 insertions(+), 42 deletions(-) diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index bf69950..7f8ab5d 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -388,7 +388,7 @@ static void OLEFont_SendNotify(OLEFontImpl* this, DISPID dispID) static const WCHAR wszUnder[] = {'U','n','d','e','r','l','i','n','e',0}; static const WCHAR wszStrike[] = {'S','t','r','i','k','e','t','h','r','o','u','g','h',0}; static const WCHAR wszWeight[] = {'W','e','i','g','h','t',0}; - static const WCHAR wszCharset[] = {'C','h','a','r','s','s','e','t',0}; + static const WCHAR wszCharset[] = {'C','h','a','r','s','e','t',0}; static const LPCWSTR dispid_mapping[] = { wszName, @@ -1305,9 +1305,6 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames( /************************************************************************ * OLEFontImpl_Invoke (IDispatch) * - * Note: Do not call _put_Xxx methods, since setting things here - * should not call notify functions as I found out debugging the generic - * MS VB5 installer. */ static HRESULT WINAPI OLEFontImpl_Invoke( IDispatch* iface, diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index 0eab729..53afc8d 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -261,10 +261,7 @@ static void test_type_info(void) IFontDisp_Release(fontdisp); } -static HRESULT WINAPI FontEventsDisp_QueryInterface( - IFontEventsDisp *iface, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) +static HRESULT WINAPI FontEventsDisp_QueryInterface(IFontEventsDisp *iface, REFIID riid, void **ppvObject) { if (IsEqualIID(riid, &IID_IFontEventsDisp) || IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) { @@ -291,26 +288,48 @@ static ULONG WINAPI FontEventsDisp_Release( return 1; } -static int fonteventsdisp_invoke_called = 0; +static HRESULT WINAPI FontEventsDisp_GetTypeInfoCount(IFontEventsDisp *iface, UINT *pctinfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI FontEventsDisp_GetTypeInfo(IFontEventsDisp *iface, UINT itinfo, LCID lcid, ITypeInfo **pptinfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI FontEventsDisp_GetIDsOfNames(IFontEventsDisp *iface, REFIID riid, LPOLESTR *names, UINT cNames, LCID lcid, + DISPID *dispid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static int fonteventsdisp_invoke_called; +static BSTR fonteventsdisp_invoke_arg0; static HRESULT WINAPI FontEventsDisp_Invoke( - IFontEventsDisp __RPC_FAR * iface, - /* [in] */ DISPID dispIdMember, - /* [in] */ REFIID riid, - /* [in] */ LCID lcid, - /* [in] */ WORD wFlags, - /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, - /* [out] */ VARIANT __RPC_FAR *pVarResult, - /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, - /* [out] */ UINT __RPC_FAR *puArgErr) + IFontEventsDisp *iface, + DISPID dispid, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS *pDispParams, + VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, + UINT *puArgErr) { - static const WCHAR wszBold[] = {'B','o','l','d',0}; - ok(wFlags == INVOKE_FUNC, "invoke flags should have been INVOKE_FUNC instead of 0x%x\n", wFlags); - ok(dispIdMember == DISPID_FONT_CHANGED, "dispIdMember should have been DISPID_FONT_CHANGED instead of 0x%x\n", dispIdMember); - ok(pDispParams->cArgs == 1, "pDispParams->cArgs should have been 1 instead of %d\n", pDispParams->cArgs); - ok(V_VT(&pDispParams->rgvarg[0]) == VT_BSTR, "VT of first param should have been VT_BSTR instead of %d\n", V_VT(&pDispParams->rgvarg[0])); - ok(!lstrcmpW(V_BSTR(&pDispParams->rgvarg[0]), wszBold), "String in first param should have been \"Bold\"\n"); + VARIANTARG *arg0 = &pDispParams->rgvarg[0]; + + ok(dispid == DISPID_FONT_CHANGED, "expected DISPID_FONT_CHANGED instead of 0x%x\n", dispid); + ok(IsEqualGUID(riid, &GUID_NULL), "got riid %s\n", wine_dbgstr_guid(riid)); + ok(wFlags == INVOKE_FUNC, "expected INVOKE_FUNC instead of 0x%x\n", wFlags); + ok(pDispParams->cArgs == 1, "expected arg count 1, got %d\n", pDispParams->cArgs); + ok(V_VT(arg0) == VT_BSTR, "expected VT_BSTR, got %d\n", V_VT(arg0)); + fonteventsdisp_invoke_arg0 = SysAllocString(V_BSTR(arg0)); fonteventsdisp_invoke_called++; return S_OK; } @@ -320,16 +339,43 @@ static IFontEventsDispVtbl FontEventsDisp_Vtbl = FontEventsDisp_QueryInterface, FontEventsDisp_AddRef, FontEventsDisp_Release, - NULL, - NULL, - NULL, + FontEventsDisp_GetTypeInfoCount, + FontEventsDisp_GetTypeInfo, + FontEventsDisp_GetIDsOfNames, FontEventsDisp_Invoke }; static IFontEventsDisp FontEventsDisp = { &FontEventsDisp_Vtbl }; + struct font_dispid + { + DISPID dispid; + const WCHAR *name; + }; + static void test_font_events_disp(void) { + static const WCHAR nameW[] = {'N','a','m','e',0}; + static const WCHAR sizeW[] = {'S','i','z','e',0}; + static const WCHAR boldW[] = {'B','o','l','d',0}; + static const WCHAR italicW[] = {'I','t','a','l','i','c',0}; + static const WCHAR underlineW[] = {'U','n','d','e','r','l','i','n','e',0}; + static const WCHAR strikeW[] = {'S','t','r','i','k','e','t','h','r','o','u','g','h',0}; + static const WCHAR weightW[] = {'W','e','i','g','h','t',0}; + static const WCHAR charsetW[] = {'C','h','a','r','s','e','t',0}; + + static const struct font_dispid font_dispids[] = + { + { DISPID_FONT_NAME, nameW }, + { DISPID_FONT_SIZE, sizeW }, + { DISPID_FONT_BOLD, boldW }, + { DISPID_FONT_ITALIC, italicW }, + { DISPID_FONT_UNDER, underlineW }, + { DISPID_FONT_STRIKE, strikeW }, + { DISPID_FONT_WEIGHT, weightW }, + { DISPID_FONT_CHARSET, charsetW } + }; + IFont *pFont; IFont *pFont2; IConnectionPointContainer *pCPC; @@ -340,6 +386,7 @@ static void test_font_events_disp(void) IFontDisp *pFontDisp; DISPPARAMS dispparams; VARIANTARG vararg; + INT i; fontdesc.cbSizeofstruct = sizeof(fontdesc); fontdesc.lpstrName = MSSansSerif_font; @@ -364,6 +411,7 @@ static void test_font_events_disp(void) EXPECT_HR(hr, S_OK); IConnectionPoint_Release(pCP); + fonteventsdisp_invoke_called = 0; hr = IFont_put_Bold(pFont, TRUE); EXPECT_HR(hr, S_OK); @@ -372,30 +420,73 @@ static void test_font_events_disp(void) hr = IFont_QueryInterface(pFont, &IID_IFontDisp, (void **)&pFontDisp); EXPECT_HR(hr, S_OK); - V_VT(&vararg) = VT_BOOL; - V_BOOL(&vararg) = VARIANT_FALSE; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IFontDisp_Invoke(pFontDisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - EXPECT_HR(hr, S_OK); + for (i = 0; i < sizeof(font_dispids)/sizeof(font_dispids[0]); i++) + { + switch (font_dispids[i].dispid) + { + case DISPID_FONT_NAME: + { + static const WCHAR arialW[] = {'A','r','i','a','l',0}; + V_VT(&vararg) = VT_BSTR; + V_BSTR(&vararg) = SysAllocString(arialW); + break; + } + case DISPID_FONT_SIZE: + V_VT(&vararg) = VT_CY; + V_CY(&vararg).Lo = 25; + V_CY(&vararg).Hi = 0; + break; + case DISPID_FONT_BOLD: + V_VT(&vararg) = VT_BOOL; + V_BOOL(&vararg) = VARIANT_FALSE; + break; + case DISPID_FONT_ITALIC: + case DISPID_FONT_UNDER: + case DISPID_FONT_STRIKE: + V_VT(&vararg) = VT_BOOL; + V_BOOL(&vararg) = VARIANT_TRUE; + break; + case DISPID_FONT_WEIGHT: + V_VT(&vararg) = VT_I2; + V_I2(&vararg) = FW_BLACK; + break; + case DISPID_FONT_CHARSET: + V_VT(&vararg) = VT_I2; + V_I2(&vararg) = 1; + break; + default: + ; + } - IFontDisp_Release(pFontDisp); + dispparams.cNamedArgs = 0; + dispparams.rgdispidNamedArgs = NULL; + dispparams.cArgs = 1; + dispparams.rgvarg = &vararg; + fonteventsdisp_invoke_called = 0; + hr = IFontDisp_Invoke(pFontDisp, font_dispids[i].dispid, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); + ok(hr == S_OK, "dispid=%d, got 0x%08x\n", font_dispids[i].dispid, hr); + ok(fonteventsdisp_invoke_called == 1, "dispid=%d, DISPID_FONT_CHANGED not called, got %d\n", font_dispids[i].dispid, + fonteventsdisp_invoke_called); + if (hr == S_OK) + { + ok(!lstrcmpW(font_dispids[i].name, fonteventsdisp_invoke_arg0), "dispid=%d, got %s, expected %s\n", + font_dispids[i].dispid, wine_dbgstr_w(fonteventsdisp_invoke_arg0), wine_dbgstr_w(font_dispids[i].name)); + SysFreeString(fonteventsdisp_invoke_arg0); + } + VariantClear(&vararg); + } - ok(fonteventsdisp_invoke_called == 2, "IFontEventDisp::Invoke was called %d times instead of twice\n", - fonteventsdisp_invoke_called); + IFontDisp_Release(pFontDisp); hr = IFont_Clone(pFont, &pFont2); EXPECT_HR(hr, S_OK); IFont_Release(pFont); + /* this test shows that the notification routine isn't called again */ + fonteventsdisp_invoke_called = 0; hr = IFont_put_Bold(pFont2, FALSE); EXPECT_HR(hr, S_OK); - - /* this test shows that the notification routine isn't called again */ - ok(fonteventsdisp_invoke_called == 2, "IFontEventDisp::Invoke was called %d times instead of twice\n", - fonteventsdisp_invoke_called); + ok(fonteventsdisp_invoke_called == 0, "got %d\n", fonteventsdisp_invoke_called); IFont_Release(pFont2); }
1
0
0
0
Nikolay Sivov : include: Use existing DISPID values instead of magic numbers.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 1eb7cca1b9cd065c29c1f412d26a4e4f62aa86d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1eb7cca1b9cd065c29c1f412d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:16:59 2014 +0400 include: Use existing DISPID values instead of magic numbers. --- include/stdole2.idl | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/include/stdole2.idl b/include/stdole2.idl index 9537fd3..432314f 100644 --- a/include/stdole2.idl +++ b/include/stdole2.idl @@ -20,6 +20,8 @@ #pragma makedep typelib +#include <olectl.h> + [ uuid(00020430-0000-0000-C000-000000000046), version(2.0), @@ -272,14 +274,14 @@ library stdole ] dispinterface Font { properties: - [id(0x0)] BSTR Name; - [id(0x2)] CURRENCY Size; - [id(0x3)] VARIANT_BOOL Bold; - [id(0x4)] VARIANT_BOOL Italic; - [id(0x5)] VARIANT_BOOL Underline; - [id(0x6)] VARIANT_BOOL Strikethrough; - [id(0x7)] short Weight; - [id(0x8)] short Charset; + [id(DISPID_FONT_NAME)] BSTR Name; + [id(DISPID_FONT_SIZE)] CURRENCY Size; + [id(DISPID_FONT_BOLD)] VARIANT_BOOL Bold; + [id(DISPID_FONT_ITALIC)] VARIANT_BOOL Italic; + [id(DISPID_FONT_UNDER)] VARIANT_BOOL Underline; + [id(DISPID_FONT_STRIKE)] VARIANT_BOOL Strikethrough; + [id(DISPID_FONT_WEIGHT)] short Weight; + [id(DISPID_FONT_CHARSET)] short Charset; methods: } @@ -351,13 +353,14 @@ library stdole ] dispinterface Picture { properties: - [id(0x0), readonly] OLE_HANDLE Handle; - [id(0x2)] OLE_HANDLE hPal; - [id(0x3), readonly] short Type; - [id(0x4), readonly] OLE_XSIZE_HIMETRIC Width; - [id(0x5), readonly] OLE_YSIZE_HIMETRIC Height; + [id(DISPID_PICT_HANDLE), readonly] OLE_HANDLE Handle; + [id(DISPID_PICT_HPAL)] OLE_HANDLE hPal; + [id(DISPID_PICT_TYPE), readonly] short Type; + [id(DISPID_PICT_WIDTH), readonly] OLE_XSIZE_HIMETRIC Width; + [id(DISPID_PICT_HEIGHT), readonly] OLE_YSIZE_HIMETRIC Height; methods: - [id(0x6)] void Render(int hdc, + [id(DISPID_PICT_RENDER)] + void Render(int hdc, long x, long y, long cx, @@ -424,7 +427,7 @@ library stdole dispinterface FontEvents { properties: methods: - [id(0x9)] void FontChanged([in] BSTR PropertyName); + [id(DISPID_FONT_CHANGED)] void FontChanged([in] BSTR PropertyName); }; typedef [public] FontEvents IFontEventsDisp;
1
0
0
0
Nikolay Sivov : scrrun: Added a IEnumVARIANT stub for IDriveCollection.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 6824cae6e7807fdbb2441ff133d78b9cadce7258 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6824cae6e7807fdbb2441ff13…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:16:41 2014 +0400 scrrun: Added a IEnumVARIANT stub for IDriveCollection. --- dlls/scrrun/filesystem.c | 94 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 3 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index d4f5887..abbf375 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -68,6 +68,10 @@ struct enumdata { struct filecollection *coll; HANDLE find; } filecoll; + struct + { + struct drivecollection *coll; + } drivecoll; } u; }; @@ -799,6 +803,85 @@ static HRESULT create_filecoll_enum(struct filecollection *collection, IUnknown return S_OK; } +static ULONG WINAPI drivecoll_enumvariant_Release(IEnumVARIANT *iface) +{ + struct enumvariant *This = impl_from_IEnumVARIANT(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(%d)\n", This, ref); + + if (!ref) + { + IDriveCollection_Release(&This->data.u.drivecoll.coll->IDriveCollection_iface); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI drivecoll_enumvariant_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *var, ULONG *fetched) +{ + struct enumvariant *This = impl_from_IEnumVARIANT(iface); + + FIXME("(%p)->(%d %p %p): stub\n", This, celt, var, fetched); + + return E_NOTIMPL; +} + +static HRESULT WINAPI drivecoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt) +{ + struct enumvariant *This = impl_from_IEnumVARIANT(iface); + + FIXME("(%p)->(%d): stub\n", This, celt); + + return E_NOTIMPL; +} + +static HRESULT WINAPI drivecoll_enumvariant_Reset(IEnumVARIANT *iface) +{ + struct enumvariant *This = impl_from_IEnumVARIANT(iface); + + FIXME("(%p): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI drivecoll_enumvariant_Clone(IEnumVARIANT *iface, IEnumVARIANT **pclone) +{ + struct enumvariant *This = impl_from_IEnumVARIANT(iface); + FIXME("(%p)->(%p): stub\n", This, pclone); + return E_NOTIMPL; +} + +static const IEnumVARIANTVtbl drivecollenumvariantvtbl = { + enumvariant_QueryInterface, + enumvariant_AddRef, + drivecoll_enumvariant_Release, + drivecoll_enumvariant_Next, + drivecoll_enumvariant_Skip, + drivecoll_enumvariant_Reset, + drivecoll_enumvariant_Clone +}; + +static HRESULT create_drivecoll_enum(struct drivecollection *collection, IUnknown **newenum) +{ + struct enumvariant *This; + + *newenum = NULL; + + This = heap_alloc(sizeof(*This)); + if (!This) return E_OUTOFMEMORY; + + This->IEnumVARIANT_iface.lpVtbl = &drivecollenumvariantvtbl; + This->ref = 1; + This->data.u.drivecoll.coll = collection; + IDriveCollection_AddRef(&collection->IDriveCollection_iface); + + *newenum = (IUnknown*)&This->IEnumVARIANT_iface; + + return S_OK; +} + static HRESULT WINAPI foldercoll_QueryInterface(IFolderCollection *iface, REFIID riid, void **obj) { struct foldercollection *This = impl_from_IFolderCollection(iface); @@ -1267,11 +1350,16 @@ static HRESULT WINAPI drivecoll_get_Item(IDriveCollection *iface, VARIANT key, I return E_NOTIMPL; } -static HRESULT WINAPI drivecoll_get__NewEnum(IDriveCollection *iface, IUnknown **penum) +static HRESULT WINAPI drivecoll_get__NewEnum(IDriveCollection *iface, IUnknown **ppenum) { struct drivecollection *This = impl_from_IDriveCollection(iface); - FIXME("(%p)->(%p): stub\n", This, penum); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, ppenum); + + if(!ppenum) + return E_POINTER; + + return create_drivecoll_enum(This, ppenum); } static HRESULT WINAPI drivecoll_get_Count(IDriveCollection *iface, LONG *count)
1
0
0
0
Nikolay Sivov : scrrun: Added a IDriveCollection stub.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 8a7795407cc2eb2d3341d379dacdc5737e64d5b5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a7795407cc2eb2d3341d379d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:16:16 2014 +0400 scrrun: Added a IDriveCollection stub. --- dlls/scrrun/filesystem.c | 165 +++++++++++++++++++++++++++++++++++++++++- dlls/scrrun/scrrun.c | 7 +- dlls/scrrun/scrrun.idl | 2 +- dlls/scrrun/scrrun_private.h | 5 +- 4 files changed, 170 insertions(+), 9 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index 21aaf70..d4f5887 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -50,6 +50,11 @@ struct filecollection { BSTR path; }; +struct drivecollection { + IDriveCollection IDriveCollection_iface; + LONG ref; +}; + struct enumdata { union { @@ -123,6 +128,11 @@ static inline struct filecollection *impl_from_IFileCollection(IFileCollection * return CONTAINING_RECORD(iface, struct filecollection, IFileCollection_iface); } +static inline struct drivecollection *impl_from_IDriveCollection(IDriveCollection *iface) +{ + return CONTAINING_RECORD(iface, struct drivecollection, IDriveCollection_iface); +} + static inline struct enumvariant *impl_from_IEnumVARIANT(IEnumVARIANT *iface) { return CONTAINING_RECORD(iface, struct enumvariant, IEnumVARIANT_iface); @@ -1150,6 +1160,156 @@ static HRESULT create_filecoll(BSTR path, IFileCollection **files) return S_OK; } +static HRESULT WINAPI drivecoll_QueryInterface(IDriveCollection *iface, REFIID riid, void **obj) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); + + *obj = NULL; + + if (IsEqualIID( riid, &IID_IDriveCollection ) || + IsEqualIID( riid, &IID_IDispatch ) || + IsEqualIID( riid, &IID_IUnknown )) + { + *obj = iface; + IDriveCollection_AddRef(iface); + } + else + return E_NOINTERFACE; + + return S_OK; +} + +static ULONG WINAPI drivecoll_AddRef(IDriveCollection *iface) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p)->(%d)\n", This, ref); + return ref; +} + +static ULONG WINAPI drivecoll_Release(IDriveCollection *iface) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p)->(%d)\n", This, ref); + + if (!ref) + heap_free(This); + + return ref; +} + +static HRESULT WINAPI drivecoll_GetTypeInfoCount(IDriveCollection *iface, UINT *pctinfo) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + TRACE("(%p)->(%p)\n", This, pctinfo); + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI drivecoll_GetTypeInfo(IDriveCollection *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return get_typeinfo(IDriveCollection_tid, ppTInfo); +} + +static HRESULT WINAPI drivecoll_GetIDsOfNames(IDriveCollection *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + + hr = get_typeinfo(IDriveCollection_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); + ITypeInfo_Release(typeinfo); + } + + return hr; +} + +static HRESULT WINAPI drivecoll_Invoke(IDriveCollection *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, + DISPPARAMS *pDispParams, VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + hr = get_typeinfo(IDriveCollection_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, + pDispParams, pVarResult, pExcepInfo, puArgErr); + ITypeInfo_Release(typeinfo); + } + + return hr; +} + +static HRESULT WINAPI drivecoll_get_Item(IDriveCollection *iface, VARIANT key, IDrive **drive) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + FIXME("(%p)->(%p): stub\n", This, drive); + return E_NOTIMPL; +} + +static HRESULT WINAPI drivecoll_get__NewEnum(IDriveCollection *iface, IUnknown **penum) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + FIXME("(%p)->(%p): stub\n", This, penum); + return E_NOTIMPL; +} + +static HRESULT WINAPI drivecoll_get_Count(IDriveCollection *iface, LONG *count) +{ + struct drivecollection *This = impl_from_IDriveCollection(iface); + FIXME("(%p)->(%p): stub\n", This, count); + return E_NOTIMPL; +} + +static const IDriveCollectionVtbl drivecollectionvtbl = { + drivecoll_QueryInterface, + drivecoll_AddRef, + drivecoll_Release, + drivecoll_GetTypeInfoCount, + drivecoll_GetTypeInfo, + drivecoll_GetIDsOfNames, + drivecoll_Invoke, + drivecoll_get_Item, + drivecoll_get__NewEnum, + drivecoll_get_Count +}; + +static HRESULT create_drivecoll(IDriveCollection **drives) +{ + struct drivecollection *This; + + *drives = NULL; + + This = heap_alloc(sizeof(*This)); + if (!This) return E_OUTOFMEMORY; + + This->IDriveCollection_iface.lpVtbl = &drivecollectionvtbl; + This->ref = 1; + + *drives = &This->IDriveCollection_iface; + return S_OK; +} + static HRESULT WINAPI folder_QueryInterface(IFolder *iface, REFIID riid, void **obj) { struct folder *This = impl_from_IFolder(iface); @@ -1944,9 +2104,8 @@ static HRESULT WINAPI filesys_Invoke(IFileSystem3 *iface, DISPID dispIdMember, static HRESULT WINAPI filesys_get_Drives(IFileSystem3 *iface, IDriveCollection **ppdrives) { - FIXME("%p %p\n", iface, ppdrives); - - return E_NOTIMPL; + TRACE("%p %p\n", iface, ppdrives); + return create_drivecoll(ppdrives); } static HRESULT WINAPI filesys_BuildPath(IFileSystem3 *iface, BSTR Path, diff --git a/dlls/scrrun/scrrun.c b/dlls/scrrun/scrrun.c index 9c7c6dc..b88dda1 100644 --- a/dlls/scrrun/scrrun.c +++ b/dlls/scrrun/scrrun.c @@ -103,12 +103,13 @@ static ITypeInfo *typeinfos[LAST_tid]; static REFIID tid_ids[] = { &IID_NULL, &IID_IDictionary, + &IID_IDriveCollection, + &IID_IFile, + &IID_IFileCollection, &IID_IFileSystem3, &IID_IFolder, &IID_IFolderCollection, - &IID_ITextStream, - &IID_IFile, - &IID_IFileCollection + &IID_ITextStream }; static HRESULT load_typelib(void) diff --git a/dlls/scrrun/scrrun.idl b/dlls/scrrun/scrrun.idl index 73948b5..016eeb6 100644 --- a/dlls/scrrun/scrrun.idl +++ b/dlls/scrrun/scrrun.idl @@ -263,7 +263,7 @@ library Scripting oleautomation ] interface IDriveCollection : IDispatch { - [id(DISPID_VALUE)] + [id(DISPID_VALUE), propget] HRESULT Item([in] VARIANT Key, [out, retval] IDrive** ppdrive); [id(DISPID_NEWENUM), propget, restricted, hidden] diff --git a/dlls/scrrun/scrrun_private.h b/dlls/scrrun/scrrun_private.h index 3ffde50..4d3e7be 100644 --- a/dlls/scrrun/scrrun_private.h +++ b/dlls/scrrun/scrrun_private.h @@ -25,12 +25,13 @@ typedef enum tid_t { NULL_tid, IDictionary_tid, + IDriveCollection_tid, + IFile_tid, + IFileCollection_tid, IFileSystem3_tid, IFolder_tid, IFolderCollection_tid, ITextStream_tid, - IFile_tid, - IFileCollection_tid, LAST_tid } tid_t;
1
0
0
0
Nikolay Sivov : oleaut32: Fix buffer increment step for VT_RECORD case doing SafeArrayCopyData().
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 4da741daf16f041f0222f4fb71ef648d759251df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4da741daf16f041f0222f4fb7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:15:59 2014 +0400 oleaut32: Fix buffer increment step for VT_RECORD case doing SafeArrayCopyData(). --- dlls/oleaut32/safearray.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index f66cc80..4801f3b 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -401,7 +401,6 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest) } else if (psa->fFeatures & FADF_RECORD) { - const SAFEARRAYBOUND* psab = psa->rgsabound; BYTE *dest_data = dest->pvData; BYTE *src_data = psa->pvData; IRecordInfo *record; @@ -412,11 +411,14 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest) /* RecordCopy() clears destination record */ hr = IRecordInfo_RecordCopy(record, src_data, dest_data); if (FAILED(hr)) break; - src_data += psab->cElements; - dest_data += psab->cElements; + src_data += psa->cbElements; + dest_data += psa->cbElements; } SafeArraySetRecordInfo(dest, record); + /* This value is set to 32 bytes by default on descriptor creation, + update with actual structure size. */ + dest->cbElements = psa->cbElements; IRecordInfo_Release(record); } else if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH))
1
0
0
0
Nikolay Sivov : oleaut32/tests: Test for internal safearray data layout.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 598f3f0623e132de256515466474875d5967b984 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=598f3f0623e132de256515466…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:15:41 2014 +0400 oleaut32/tests: Test for internal safearray data layout. --- dlls/oleaut32/tests/safearray.c | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 1d8943a..c28931c 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -2003,6 +2003,63 @@ static void test_SafeArrayDestroyData (void) ok(hres == S_OK, "SAD failed, error code %x.\n", hres); } +static void test_safearray_layout(void) +{ + IRecordInfoImpl *irec; + IRecordInfo *record; + GUID guid, *guidptr; + SAFEARRAYBOUND sab; + SAFEARRAY *sa; + DWORD *dwptr; + HRESULT hr; + + sab.lLbound = 0; + sab.cElements = 10; + + /* GUID field */ + sa = SafeArrayCreate(VT_UNKNOWN, 1, &sab); + ok(sa != NULL, "got %p\n", sa); + + guidptr = (GUID*)sa - 1; + ok(IsEqualIID(guidptr, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(guidptr)); + + hr = SafeArraySetIID(sa, &IID_IDispatch); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(IsEqualIID(guidptr, &IID_IDispatch), "got %s\n", wine_dbgstr_guid(guidptr)); + + memcpy(guidptr, &IID_IUnknown, sizeof(GUID)); + hr = SafeArrayGetIID(sa, &guid); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(IsEqualIID(&guid, &IID_IUnknown), "got %s\n", wine_dbgstr_guid(&guid)); + + hr = SafeArrayDestroy(sa); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* VARTYPE field */ + sa = SafeArrayCreate(VT_UI1, 1, &sab); + ok(sa != NULL, "got %p\n", sa); + + dwptr = (DWORD*)sa - 1; + ok(*dwptr == VT_UI1, "got %d\n", *dwptr); + + hr = SafeArrayDestroy(sa); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* IRecordInfo pointer */ + irec = IRecordInfoImpl_Construct(); + irec->ref = 1; + + sa = pSafeArrayCreateEx(VT_RECORD, 1, &sab, &irec->IRecordInfo_iface); + ok(sa != NULL, "failed to create array\n"); + + record = *((IRecordInfo**)sa - 1); + ok(record == &irec->IRecordInfo_iface, "got %p\n", record); + + hr = SafeArrayDestroy(sa); + ok(hr == S_OK, "got 0x%08x\n", hr); + IRecordInfo_Release(&irec->IRecordInfo_iface); +} + START_TEST(safearray) { hOleaut32 = GetModuleHandleA("oleaut32.dll"); @@ -2035,4 +2092,5 @@ START_TEST(safearray) test_SafeArrayGetPutElement_IUnknown(); test_SafeArrayRedim_IUnknown(); test_SafeArrayGetPutElement_VARIANT(); + test_safearray_layout(); }
1
0
0
0
Nikolay Sivov : oleaut32: Fix SafeArrayPutElement() for FADF_RECORD arrays.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: a4e0fc95a914344781975b8971fbba511bbe1a5f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4e0fc95a914344781975b897…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 24 08:15:21 2014 +0400 oleaut32: Fix SafeArrayPutElement() for FADF_RECORD arrays. --- dlls/oleaut32/safearray.c | 34 +++++++++++++++++++--------------- dlls/oleaut32/tests/safearray.c | 25 ++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index b7d8b37..f66cc80 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -898,23 +898,27 @@ HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData if (!*lpDest) hRet = E_OUTOFMEMORY; } - else + else if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH)) { - if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH)) - { - LPUNKNOWN lpUnknown = pvData; - LPUNKNOWN *lpDest = lpvDest; - - if (lpUnknown) - IUnknown_AddRef(lpUnknown); - if (*lpDest) - IUnknown_Release(*lpDest); - *lpDest = lpUnknown; - } else { - /* Copy the data over */ - memcpy(lpvDest, pvData, psa->cbElements); - } + IUnknown *lpUnknown = pvData; + IUnknown **lpDest = lpvDest; + + if (lpUnknown) + IUnknown_AddRef(lpUnknown); + if (*lpDest) + IUnknown_Release(*lpDest); + *lpDest = lpUnknown; } + else if (psa->fFeatures & FADF_RECORD) + { + IRecordInfo *record; + + SafeArrayGetRecordInfo(psa, &record); + hRet = IRecordInfo_RecordCopy(record, pvData, lpvDest); + IRecordInfo_Release(record); + } else + /* Copy the data over */ + memcpy(lpvDest, pvData, psa->cbElements); } SafeArrayUnlock(psa); } diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 1af2cab..1d8943a 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -1062,10 +1062,11 @@ test_LockUnlock_Vector: static void test_SafeArrayGetPutElement(void) { SAFEARRAYBOUND sab[4]; - LONG indices[NUM_DIMENSIONS]; + LONG indices[NUM_DIMENSIONS], index; SAFEARRAY *sa; HRESULT hres; int value = 0, gotvalue, dimension; + IRecordInfoImpl *irec; unsigned int x,y,z,a; for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) @@ -1184,6 +1185,28 @@ static void test_SafeArrayGetPutElement(void) } hres = SafeArrayDestroy(sa); ok(hres == S_OK, "got 0x%08x\n", hres); + + /* VT_RECORD array */ + irec = IRecordInfoImpl_Construct(); + irec->ref = 1; + + sab[0].lLbound = 0; + sab[0].cElements = 8; + + sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, &irec->IRecordInfo_iface); + ok(sa != NULL, "failed to create array\n"); + ok(irec->ref == 2, "got %d\n", irec->ref); + + index = 0; + irec->recordcopy = 0; + hres = SafeArrayPutElement(sa, &index, (void*)0xdeadbeef); + ok(hres == S_OK, "got 0x%08x\n", hres); + ok(irec->recordcopy == 1, "got %d\n", irec->recordcopy); + + hres = SafeArrayDestroy(sa); + ok(hres == S_OK, "got 0x%08x\n", hres); + ok(irec->ref == 1, "got %d\n", irec->ref); + IRecordInfo_Release(&irec->IRecordInfo_iface); } static void test_SafeArrayGetPutElement_BSTR(void)
1
0
0
0
Frédéric Delanoy : setupx.dll16: Use BOOL type where appropriate.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: 2ba5cdd3f6582b2ac7ae51474f955edaf804e5df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ba5cdd3f6582b2ac7ae51474…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sun Feb 23 19:23:21 2014 +0100 setupx.dll16: Use BOOL type where appropriate. --- dlls/setupx.dll16/infparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/setupx.dll16/infparse.c b/dlls/setupx.dll16/infparse.c index 0fbc25d..3d3a25f 100644 --- a/dlls/setupx.dll16/infparse.c +++ b/dlls/setupx.dll16/infparse.c @@ -136,7 +136,7 @@ static unsigned int string_subst( HINF hinf, const char *text, char *buffer ) { const char *start, *subst, *p; unsigned int len, total = 0; - int inside = 0; + BOOL inside = FALSE; unsigned int size = MAX_INF_STRING_LENGTH; char tmp[MAX_INF_STRING_LENGTH];
1
0
0
0
Frédéric Delanoy : d3dcompiler_43/tests: Use BOOL type where appropriate.
by Alexandre Julliard
24 Feb '14
24 Feb '14
Module: wine Branch: master Commit: b09833a847f2fb7b340b210da9605bb3269f8602 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b09833a847f2fb7b340b210da…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sun Feb 23 19:23:20 2014 +0100 d3dcompiler_43/tests: Use BOOL type where appropriate. --- dlls/d3dcompiler_43/tests/hlsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dcompiler_43/tests/hlsl.c b/dlls/d3dcompiler_43/tests/hlsl.c index c3778ca..7a04762 100644 --- a/dlls/d3dcompiler_43/tests/hlsl.c +++ b/dlls/d3dcompiler_43/tests/hlsl.c @@ -235,7 +235,7 @@ static void setup_device9(IDirect3DDevice9 *device, IDirect3DSurface9 **render_t ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned: %08x\n", hr); } -static int colors_match(D3DXCOLOR a, D3DXCOLOR b, float epsilon) +static BOOL colors_match(D3DXCOLOR a, D3DXCOLOR b, float epsilon) { return (fabs(a.r - b.r) < epsilon && fabs(a.g - b.g) < epsilon && fabs(a.b - b.b) < epsilon && fabs(a.a - b.a) < epsilon);
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
51
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
Results per page:
10
25
50
100
200