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
Frédéric Delanoy : winhlp32: Use BOOL type where appropriate.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 33cb4f80b7772bebf29793c6d2dac3029b66440a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33cb4f80b7772bebf29793c6d…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Feb 18 10:58:40 2014 +0100 winhlp32: Use BOOL type where appropriate. --- programs/winhlp32/macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 615b687..3b89e03 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -804,7 +804,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR else MACRO_Loaded = HeapReAlloc(GetProcessHeap(), 0, MACRO_Loaded, size); MACRO_Loaded[MACRO_NumLoaded - 1].name = StrDup(proc); /* FIXME: never freed */ MACRO_Loaded[MACRO_NumLoaded - 1].alias = NULL; - MACRO_Loaded[MACRO_NumLoaded - 1].isBool = 0; + MACRO_Loaded[MACRO_NumLoaded - 1].isBool = FALSE; MACRO_Loaded[MACRO_NumLoaded - 1].arguments = StrDup(args); /* FIXME: never freed */ MACRO_Loaded[MACRO_NumLoaded - 1].fn = fn; WINE_TRACE("Added %s(%s) at %p\n", proc, args, fn);
1
0
0
0
Henri Verbeet : d2d1: Add a stub D2D1CreateFactory() implementation.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 67981d6db70daa8bd1bb76de8e49cdacf3afade9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67981d6db70daa8bd1bb76de8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Feb 18 10:39:22 2014 +0100 d2d1: Add a stub D2D1CreateFactory() implementation. --- configure | 2 ++ configure.ac | 1 + dlls/d2d1/Makefile.in | 7 +++++++ dlls/d2d1/d2d1.spec | 11 +++++++++++ dlls/d2d1/d2d1_main.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/d2d1/version.rc | 26 ++++++++++++++++++++++++++ include/d2d1.idl | 24 ++++++++++++++++++++++++ 7 files changed, 119 insertions(+) diff --git a/configure b/configure index 4dcd8e2..00c4420 100755 --- a/configure +++ b/configure @@ -934,6 +934,7 @@ enable_cryptnet enable_cryptui enable_ctapi32 enable_ctl3d32 +enable_d2d1 enable_d3d10 enable_d3d10_1 enable_d3d10core @@ -16715,6 +16716,7 @@ wine_fn_config_dll ctapi32 enable_ctapi32 wine_fn_config_dll ctl3d.dll16 enable_win16 wine_fn_config_dll ctl3d32 enable_ctl3d32 implib wine_fn_config_dll ctl3dv2.dll16 enable_win16 +wine_fn_config_dll d2d1 enable_d2d1 implib wine_fn_config_dll d3d10 enable_d3d10 implib wine_fn_config_test dlls/d3d10/tests d3d10_test wine_fn_config_dll d3d10_1 enable_d3d10_1 implib diff --git a/configure.ac b/configure.ac index de51691..9811873 100644 --- a/configure.ac +++ b/configure.ac @@ -2725,6 +2725,7 @@ WINE_CONFIG_DLL(ctapi32) WINE_CONFIG_DLL(ctl3d.dll16,enable_win16) WINE_CONFIG_DLL(ctl3d32,,[implib]) WINE_CONFIG_DLL(ctl3dv2.dll16,enable_win16) +WINE_CONFIG_DLL(d2d1,,[implib]) WINE_CONFIG_DLL(d3d10,,[implib]) WINE_CONFIG_TEST(dlls/d3d10/tests) WINE_CONFIG_DLL(d3d10_1,,[implib]) diff --git a/dlls/d2d1/Makefile.in b/dlls/d2d1/Makefile.in new file mode 100644 index 0000000..0db375a --- /dev/null +++ b/dlls/d2d1/Makefile.in @@ -0,0 +1,7 @@ +MODULE = d2d1.dll +IMPORTLIB = d2d1 + +C_SRCS = \ + d2d1_main.c + +RC_SRCS = version.rc diff --git a/dlls/d2d1/d2d1.spec b/dlls/d2d1/d2d1.spec new file mode 100644 index 0000000..b1bfe9b --- /dev/null +++ b/dlls/d2d1/d2d1.spec @@ -0,0 +1,11 @@ +@ stdcall D2D1CreateFactory(long ptr ptr ptr) +@ stub D2D1MakeRotateMatrix +@ stub D2D1MakeSkewMatrix +@ stub D2D1IsMatrixInvertible +@ stub D2D1InvertMatrix +@ stub D2D1ConvertColorSpace +@ stub D2D1CreateDevice +@ stub D2D1CreateDeviceContext +@ stub D2D1SinCos +@ stub D2D1Tan +@ stub D2D1Vec3Length diff --git a/dlls/d2d1/d2d1_main.c b/dlls/d2d1/d2d1_main.c new file mode 100644 index 0000000..9a389a2 --- /dev/null +++ b/dlls/d2d1/d2d1_main.c @@ -0,0 +1,48 @@ +/* + * Copyright 2014 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#define COBJMACROS +#include "d2d1.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d2d); + +BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) +{ + switch (reason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(inst); + break; + } + + return TRUE; +} + +HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid, + const D2D1_FACTORY_OPTIONS *factory_options, void **factory) +{ + FIXME("factory_type %#x, iid %s, factory_options %p, factory %p stub!\n", + factory_type, debugstr_guid(iid), factory_options, factory); + + return E_NOTIMPL; +} diff --git a/dlls/d2d1/version.rc b/dlls/d2d1/version.rc new file mode 100644 index 0000000..ab7a911 --- /dev/null +++ b/dlls/d2d1/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2014 Henri Verbeet for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine Direct2D" +#define WINE_FILENAME_STR "d2d1.dll" +#define WINE_FILEVERSION 6,2,9200,16765 +#define WINE_FILEVERSION_STR "6.2.9200.16765" +#define WINE_PRODUCTVERSION 6,2,9200,16765 +#define WINE_PRODUCTVERSION_STR "6.2.9200.16765" + +#include "wine/wine_common_ver.rc" diff --git a/include/d2d1.idl b/include/d2d1.idl index 8c9cdb3..c63ed24 100644 --- a/include/d2d1.idl +++ b/include/d2d1.idl @@ -21,6 +21,22 @@ import "d2dbasetypes.h"; typedef D2D_POINT_2F D2D1_POINT_2F; +typedef enum D2D1_DEBUG_LEVEL +{ + D2D1_DEBUG_LEVEL_NONE = 0, + D2D1_DEBUG_LEVEL_ERROR = 1, + D2D1_DEBUG_LEVEL_WARNING = 2, + D2D1_DEBUG_LEVEL_INFORMATION = 3, + D2D1_DEBUG_LEVEL_FORCE_DWORD = 0xffffffff, +} D2D1_DEBUG_LEVEL; + +typedef enum D2D1_FACTORY_TYPE +{ + D2D1_FACTORY_TYPE_SINGLE_THREADED = 0, + D2D1_FACTORY_TYPE_MULTI_THREADED = 1, + D2D1_FACTORY_TYPE_FORCE_DWORD = 0xfffffff, +} D2D1_FACTORY_TYPE; + typedef enum D2D1_FILL_MODE { D2D1_FILL_MODE_ALTERNATE = 0, @@ -57,6 +73,11 @@ typedef enum D2D1_FIGURE_END D2D1_FIGURE_END_FORCE_DWORD = 0xffffffff } D2D1_FIGURE_END; +typedef struct D2D1_FACTORY_OPTIONS +{ + D2D1_DEBUG_LEVEL debugLevel; +} D2D1_FACTORY_OPTIONS; + [ local, object, @@ -72,3 +93,6 @@ interface ID2D1SimplifiedGeometrySink : IUnknown void EndFigure(D2D1_FIGURE_END figureEnd); HRESULT Close(); } + +[local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid, + const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
1
0
0
0
Dmitry Timoshkov : taskschd: Implement reading Settings of the task definition XML chunk.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 160c687710f231e1f3ede72ba81c265a881ae618 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=160c687710f231e1f3ede72ba…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:10:23 2014 +0900 taskschd: Implement reading Settings of the task definition XML chunk. --- dlls/taskschd/task.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 220 insertions(+), 2 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index e4274eb..c0b8141 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -788,6 +788,82 @@ static const WCHAR Settings[] = {'S','e','t','t','i','n','g','s',0}; static const WCHAR Triggers[] = {'T','r','i','g','g','e','r','s',0}; static const WCHAR Principals[] = {'P','r','i','n','c','i','p','a','l','s',0}; static const WCHAR Actions[] = {'A','c','t','i','o','n','s',0}; +static const WCHAR MultipleInstancesPolicy[] = {'M','u','l','t','i','p','l','e','I','n','s','t','a','n','c','e','s','P','o','l','i','c','y',0}; +static const WCHAR IgnoreNew[] = {'I','g','n','o','r','e','N','e','w',0}; +static const WCHAR DisallowStartIfOnBatteries[] = {'D','i','s','a','l','l','o','w','S','t','a','r','t','I','f','O','n','B','a','t','t','e','r','i','e','s',0}; +static const WCHAR AllowStartOnDemand[] = {'A','l','l','o','w','S','t','a','r','t','O','n','D','e','m','a','n','d',0}; +static const WCHAR StopIfGoingOnBatteries[] = {'S','t','o','p','I','f','G','o','i','n','g','O','n','B','a','t','t','e','r','i','e','s',0}; +static const WCHAR Enabled[] = {'E','n','a','b','l','e','d',0}; +static const WCHAR Hidden[] = {'H','i','d','d','e','n',0}; +static const WCHAR RunOnlyIfIdle[] = {'R','u','n','O','n','l','y','I','f','I','d','l','e',0}; +static const WCHAR WakeToRun[] = {'W','a','k','e','T','o','R','u','n',0}; +static const WCHAR ExecutionTimeLimit[] = {'E','x','e','c','u','t','i','o','n','T','i','m','e','L','i','m','i','t',0}; +static const WCHAR Priority[] = {'P','r','i','o','r','i','t','y',0}; +static const WCHAR IdleSettings[] = {'I','d','l','e','S','e','t','t','i','n','g','s',0}; + +static HRESULT read_text_value(IXmlReader *reader, WCHAR **value) +{ + HRESULT hr; + XmlNodeType type; + + while (IXmlReader_Read(reader, &type) == S_OK) + { + switch (type) + { + case XmlNodeType_Text: + hr = IXmlReader_GetValue(reader, (const WCHAR **)value, NULL); + if (hr != S_OK) return hr; + TRACE("%s\n", debugstr_w(*value)); + return S_OK; + + case XmlNodeType_Whitespace: + case XmlNodeType_Comment: + break; + + default: + FIXME("unexpected node type %d\n", type); + return E_FAIL; + } + } + + return E_FAIL; +} + +static HRESULT read_variantbool_value(IXmlReader *reader, VARIANT_BOOL *vbool) +{ + static const WCHAR trueW[] = {'t','r','u','e',0}; + static const WCHAR falseW[] = {'f','a','l','s','e',0}; + HRESULT hr; + WCHAR *value; + + hr = read_text_value(reader, &value); + if (hr != S_OK) return hr; + + if (!lstrcmpW(value, trueW)) + *vbool = VARIANT_TRUE; + else if (!lstrcmpW(value, falseW)) + *vbool = VARIANT_FALSE; + else + { + FIXME("unexpected bool value %s\n", debugstr_w(value)); + return E_FAIL; + } + + return S_OK; +} + +static HRESULT read_int_value(IXmlReader *reader, int *int_val) +{ + HRESULT hr; + WCHAR *value; + + hr = read_text_value(reader, &value); + if (hr != S_OK) return hr; + + *int_val = strtolW(value, NULL, 10); + + return S_OK; +} static HRESULT read_triggers(IXmlReader *reader, ITaskDefinition *taskdef) { @@ -807,12 +883,141 @@ static HRESULT read_actions(IXmlReader *reader, ITaskDefinition *taskdef) return S_OK; } -static HRESULT read_settings(IXmlReader *reader, ITaskDefinition *taskdef) +static HRESULT read_idle_settings(IXmlReader *reader, ITaskSettings *taskset) { FIXME("stub\n"); return S_OK; } +static HRESULT read_settings(IXmlReader *reader, ITaskSettings *taskset) +{ + HRESULT hr; + XmlNodeType type; + const WCHAR *name; + WCHAR *value; + VARIANT_BOOL bool_val; + int int_val; + + if (IXmlReader_IsEmptyElement(reader)) + { + TRACE("Settings is empty\n"); + return S_OK; + } + + while (IXmlReader_Read(reader, &type) == S_OK) + { + switch (type) + { + case XmlNodeType_EndElement: + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) return hr; + + TRACE("/%s\n", debugstr_w(name)); + + if (!lstrcmpW(name, Settings)) + return S_OK; + + break; + + case XmlNodeType_Element: + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) return hr; + + TRACE("Element: %s\n", debugstr_w(name)); + + if (!lstrcmpW(name, MultipleInstancesPolicy)) + { + hr = read_text_value(reader, &value); + if (hr == S_OK) + { + int_val = TASK_INSTANCES_IGNORE_NEW; + + if (!lstrcmpW(value, IgnoreNew)) + int_val = TASK_INSTANCES_IGNORE_NEW; + else + FIXME("unhandled MultipleInstancesPolicy %s\n", debugstr_w(value)); + + ITaskSettings_put_MultipleInstances(taskset, int_val); + } + } + else if (!lstrcmpW(name, DisallowStartIfOnBatteries)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_DisallowStartIfOnBatteries(taskset, bool_val); + } + else if (!lstrcmpW(name, AllowStartOnDemand)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_AllowDemandStart(taskset, bool_val); + } + else if (!lstrcmpW(name, StopIfGoingOnBatteries)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_StopIfGoingOnBatteries(taskset, bool_val); + } + else if (!lstrcmpW(name, Enabled)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_Enabled(taskset, bool_val); + } + else if (!lstrcmpW(name, Hidden)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_Hidden(taskset, bool_val); + } + else if (!lstrcmpW(name, RunOnlyIfIdle)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_RunOnlyIfIdle(taskset, bool_val); + } + else if (!lstrcmpW(name, WakeToRun)) + { + hr = read_variantbool_value(reader, &bool_val); + if (hr == S_OK) + ITaskSettings_put_WakeToRun(taskset, bool_val); + } + else if (!lstrcmpW(name, ExecutionTimeLimit)) + { + hr = read_text_value(reader, &value); + if (hr == S_OK) + ITaskSettings_put_ExecutionTimeLimit(taskset, value); + } + else if (!lstrcmpW(name, Priority)) + { + hr = read_int_value(reader, &int_val); + if (hr == S_OK) + ITaskSettings_put_Priority(taskset, int_val); + } + else if (!lstrcmpW(name, IdleSettings)) + { + hr = read_idle_settings(reader, taskset); + if (hr != S_OK) return hr; + } + else + FIXME("unhandled Settings element %s\n", debugstr_w(name)); + + break; + + case XmlNodeType_Whitespace: + case XmlNodeType_Comment: + break; + + default: + FIXME("unhandled Settings node type %d\n", type); + break; + } + } + + WARN("Settings was not terminated\n"); + return E_FAIL; +} + static HRESULT read_registration_info(IXmlReader *reader, ITaskDefinition *taskdef) { FIXME("stub\n"); @@ -881,6 +1086,12 @@ static HRESULT read_task(IXmlReader *reader, ITaskDefinition *taskdef) XmlNodeType type; const WCHAR *name; + if (IXmlReader_IsEmptyElement(reader)) + { + TRACE("Task is empty\n"); + return S_OK; + } + while (IXmlReader_Read(reader, &type) == S_OK) { switch (type) @@ -905,7 +1116,14 @@ static HRESULT read_task(IXmlReader *reader, ITaskDefinition *taskdef) if (!lstrcmpW(name, RegistrationInfo)) hr = read_registration_info(reader, taskdef); else if (!lstrcmpW(name, Settings)) - hr = read_settings(reader, taskdef); + { + ITaskSettings *taskset; + + hr = ITaskDefinition_get_Settings(taskdef, &taskset); + if (hr != S_OK) return hr; + hr = read_settings(reader, taskset); + ITaskSettings_Release(taskset); + } else if (!lstrcmpW(name, Triggers)) hr = read_triggers(reader, taskdef); else if (!lstrcmpW(name, Principals))
1
0
0
0
Dmitry Timoshkov : taskschd: Implement ITaskDefinition::put_Settings.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 71f690a55d2cb68468964457ad018f395ddf6c25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=71f690a55d2cb68468964457a…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:10:19 2014 +0900 taskschd: Implement ITaskDefinition::put_Settings. --- dlls/taskschd/task.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 7386694..e4274eb 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -719,8 +719,18 @@ static HRESULT WINAPI TaskDefinition_get_Settings(ITaskDefinition *iface, ITaskS static HRESULT WINAPI TaskDefinition_put_Settings(ITaskDefinition *iface, ITaskSettings *settings) { - FIXME("%p,%p: stub\n", iface, settings); - return E_NOTIMPL; + TaskDefinition *taskdef = impl_from_ITaskDefinition(iface); + + TRACE("%p,%p\n", iface, settings); + + if (!settings) return E_POINTER; + + ITaskSettings_Release(taskdef->taskset); + + ITaskSettings_AddRef(settings); + taskdef->taskset = settings; + + return S_OK; } static HRESULT WINAPI TaskDefinition_get_Data(ITaskDefinition *iface, BSTR *data)
1
0
0
0
Dmitry Timoshkov : taskschd: Make ITaskSettings a part of ITaskDefinition implementation.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 3aa2376fd98bd9ae616232756638ef6a2df358b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3aa2376fd98bd9ae616232756…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:10:14 2014 +0900 taskschd: Make ITaskSettings a part of ITaskDefinition implementation. --- dlls/taskschd/task.c | 20 ++++++++++++++++++-- dlls/taskschd/taskschd_private.h | 6 ++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 4c8a23e..7386694 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -601,6 +601,7 @@ static HRESULT TaskSettings_create(ITaskSettings **obj) typedef struct { ITaskDefinition ITaskDefinition_iface; + ITaskSettings *taskset; LONG ref; } TaskDefinition; @@ -623,6 +624,8 @@ static ULONG WINAPI TaskDefinition_Release(ITaskDefinition *iface) if (!ref) { TRACE("destroying %p\n", iface); + if (taskdef->taskset) + ITaskSettings_Release(taskdef->taskset); heap_free(taskdef); } @@ -702,11 +705,16 @@ static HRESULT WINAPI TaskDefinition_put_Triggers(ITaskDefinition *iface, ITrigg static HRESULT WINAPI TaskDefinition_get_Settings(ITaskDefinition *iface, ITaskSettings **settings) { + TaskDefinition *taskdef = impl_from_ITaskDefinition(iface); + TRACE("%p,%p\n", iface, settings); if (!settings) return E_POINTER; - return TaskSettings_create(settings); + ITaskSettings_AddRef(taskdef->taskset); + *settings = taskdef->taskset; + + return S_OK; } static HRESULT WINAPI TaskDefinition_put_Settings(ITaskDefinition *iface, ITaskSettings *settings) @@ -1028,13 +1036,21 @@ static const ITaskDefinitionVtbl TaskDefinition_vtbl = HRESULT TaskDefinition_create(ITaskDefinition **obj) { + HRESULT hr; TaskDefinition *taskdef; - taskdef = heap_alloc(sizeof(*taskdef)); + taskdef = heap_alloc_zero(sizeof(*taskdef)); if (!taskdef) return E_OUTOFMEMORY; taskdef->ITaskDefinition_iface.lpVtbl = &TaskDefinition_vtbl; taskdef->ref = 1; + hr = TaskSettings_create(&taskdef->taskset); + if (hr != S_OK) + { + ITaskDefinition_Release(&taskdef->ITaskDefinition_iface); + return hr; + } + *obj = &taskdef->ITaskDefinition_iface; TRACE("created %p\n", *obj); diff --git a/dlls/taskschd/taskschd_private.h b/dlls/taskschd/taskschd_private.h index f9cf909..1046e2f 100644 --- a/dlls/taskschd/taskschd_private.h +++ b/dlls/taskschd/taskschd_private.h @@ -31,6 +31,12 @@ HRESULT RegisteredTaskCollection_create(const WCHAR *path, IRegisteredTaskCollec const char *debugstr_variant(const VARIANT *v) DECLSPEC_HIDDEN; +static void *heap_alloc_zero(SIZE_T size) __WINE_ALLOC_SIZE(1); +static inline void *heap_alloc_zero(SIZE_T size) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); +} + static void *heap_alloc(SIZE_T size) __WINE_ALLOC_SIZE(1); static inline void *heap_alloc(SIZE_T size) {
1
0
0
0
Dmitry Timoshkov : taskschd: Add initial implementation of ITaskDefinition ::put_XmlText.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: e29f64533fc2b5d62836195640a8a0f7be20b65e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e29f64533fc2b5d6283619564…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:10:09 2014 +0900 taskschd: Add initial implementation of ITaskDefinition::put_XmlText. --- dlls/taskschd/Makefile.in | 2 +- dlls/taskschd/task.c | 243 ++++++++++++++++++++++++++++++++++++++- dlls/taskschd/tests/scheduler.c | 4 - 3 files changed, 242 insertions(+), 7 deletions(-) diff --git a/dlls/taskschd/Makefile.in b/dlls/taskschd/Makefile.in index a1835fc..afbb2ad 100644 --- a/dlls/taskschd/Makefile.in +++ b/dlls/taskschd/Makefile.in @@ -1,5 +1,5 @@ MODULE = taskschd.dll -IMPORTS = advapi32 oleaut32 +IMPORTS = oleaut32 ole32 advapi32 xmllite C_SRCS = \ folder.c \ diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 95b5ba1..4c8a23e 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -24,6 +24,7 @@ #include "winbase.h" #include "initguid.h" #include "objbase.h" +#include "xmllite.h" #include "taskschd.h" #include "taskschd_private.h" @@ -756,10 +757,248 @@ static HRESULT WINAPI TaskDefinition_get_XmlText(ITaskDefinition *iface, BSTR *x return E_NOTIMPL; } +static const WCHAR Task[] = {'T','a','s','k',0}; +static const WCHAR version[] = {'v','e','r','s','i','o','n',0}; +static const WCHAR v1_0[] = {'1','.','0',0}; +static const WCHAR v1_1[] = {'1','.','1',0}; +static const WCHAR v1_2[] = {'1','.','2',0}; +static const WCHAR v1_3[] = {'1','.','3',0}; +static const WCHAR xmlns[] = {'x','m','l','n','s',0}; +static const WCHAR task_ns[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','w','i','n','d','o','w','s','/','2','0','0','4','/','0','2','/','m','i','t','/','t','a','s','k',0}; +static const WCHAR RegistrationInfo[] = {'R','e','g','i','s','t','r','a','t','i','o','n','I','n','f','o',0}; +static const WCHAR Settings[] = {'S','e','t','t','i','n','g','s',0}; +static const WCHAR Triggers[] = {'T','r','i','g','g','e','r','s',0}; +static const WCHAR Principals[] = {'P','r','i','n','c','i','p','a','l','s',0}; +static const WCHAR Actions[] = {'A','c','t','i','o','n','s',0}; + +static HRESULT read_triggers(IXmlReader *reader, ITaskDefinition *taskdef) +{ + FIXME("stub\n"); + return S_OK; +} + +static HRESULT read_principals(IXmlReader *reader, ITaskDefinition *taskdef) +{ + FIXME("stub\n"); + return S_OK; +} + +static HRESULT read_actions(IXmlReader *reader, ITaskDefinition *taskdef) +{ + FIXME("stub\n"); + return S_OK; +} + +static HRESULT read_settings(IXmlReader *reader, ITaskDefinition *taskdef) +{ + FIXME("stub\n"); + return S_OK; +} + +static HRESULT read_registration_info(IXmlReader *reader, ITaskDefinition *taskdef) +{ + FIXME("stub\n"); + return S_OK; +} + +static HRESULT read_task_attributes(IXmlReader *reader, ITaskDefinition *taskdef) +{ + HRESULT hr; + ITaskSettings *taskset; + const WCHAR *name; + const WCHAR *value; + + TRACE("\n"); + + hr = ITaskDefinition_get_Settings(taskdef, &taskset); + if (hr != S_OK) return hr; + + hr = IXmlReader_MoveToFirstAttribute(reader); + + while (hr == S_OK) + { + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) break; + + hr = IXmlReader_GetValue(reader, &value, NULL); + if (hr != S_OK) break; + + TRACE("%s=%s\n", debugstr_w(name), debugstr_w(value)); + + if (!lstrcmpW(name, version)) + { + TASK_COMPATIBILITY compatibility = TASK_COMPATIBILITY_V2; + + if (!lstrcmpW(value, v1_0)) + compatibility = TASK_COMPATIBILITY_AT; + else if (!lstrcmpW(value, v1_1)) + compatibility = TASK_COMPATIBILITY_V1; + else if (!lstrcmpW(value, v1_2)) + compatibility = TASK_COMPATIBILITY_V2; + else if (!lstrcmpW(value, v1_3)) + compatibility = TASK_COMPATIBILITY_V2_1; + else + FIXME("unknown version %s\n", debugstr_w(value)); + + ITaskSettings_put_Compatibility(taskset, compatibility); + } + else if (!lstrcmpW(name, xmlns)) + { + if (lstrcmpW(value, task_ns)) + FIXME("unknown namespace %s\n", debugstr_w(value)); + } + else + FIXME("unhandled Task attribute %s\n", debugstr_w(name)); + + hr = IXmlReader_MoveToNextAttribute(reader); + } + + ITaskSettings_Release(taskset); + return S_OK; +} + +static HRESULT read_task(IXmlReader *reader, ITaskDefinition *taskdef) +{ + HRESULT hr; + XmlNodeType type; + const WCHAR *name; + + while (IXmlReader_Read(reader, &type) == S_OK) + { + switch (type) + { + case XmlNodeType_EndElement: + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) return hr; + + TRACE("/%s\n", debugstr_w(name)); + + if (!lstrcmpW(name, Task)) + return S_OK; + + break; + + case XmlNodeType_Element: + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) return hr; + + TRACE("Element: %s\n", debugstr_w(name)); + + if (!lstrcmpW(name, RegistrationInfo)) + hr = read_registration_info(reader, taskdef); + else if (!lstrcmpW(name, Settings)) + hr = read_settings(reader, taskdef); + else if (!lstrcmpW(name, Triggers)) + hr = read_triggers(reader, taskdef); + else if (!lstrcmpW(name, Principals)) + hr = read_principals(reader, taskdef); + else if (!lstrcmpW(name, Actions)) + hr = read_actions(reader, taskdef); + else + FIXME("unhandled Task element %s\n", debugstr_w(name)); + + if (hr != S_OK) return hr; + break; + + case XmlNodeType_Comment: + case XmlNodeType_Whitespace: + break; + + default: + FIXME("unhandled Task node type %d\n", type); + break; + } + } + + WARN("Task was not terminated\n"); + return E_FAIL; +} + +static HRESULT read_xml(IXmlReader *reader, ITaskDefinition *taskdef) +{ + HRESULT hr; + XmlNodeType type; + const WCHAR *name; + + while (IXmlReader_Read(reader, &type) == S_OK) + { + switch (type) + { + case XmlNodeType_XmlDeclaration: + TRACE("XmlDeclaration\n"); + break; + + case XmlNodeType_Element: + hr = IXmlReader_GetLocalName(reader, &name, NULL); + if (hr != S_OK) return hr; + + TRACE("Element: %s\n", debugstr_w(name)); + + if (!lstrcmpW(name, Task)) + { + hr = read_task_attributes(reader, taskdef); + if (hr != S_OK) return hr; + + return read_task(reader, taskdef); + } + else + FIXME("unhandled XML element %s\n", debugstr_w(name)); + + break; + + case XmlNodeType_Comment: + case XmlNodeType_Whitespace: + break; + + default: + FIXME("unhandled XML node type %d\n", type); + break; + } + } + + WARN("Task definition was not found\n"); + return E_FAIL; +} + static HRESULT WINAPI TaskDefinition_put_XmlText(ITaskDefinition *iface, BSTR xml) { - FIXME("%p,%p: stub\n", iface, xml); - return E_NOTIMPL; + HRESULT hr; + IStream *stream; + IXmlReader *reader; + HGLOBAL hmem; + void *buf; + + TRACE("%p,%s\n", iface, debugstr_w(xml)); + + hmem = GlobalAlloc(0, lstrlenW(xml) * sizeof(WCHAR)); + if (!hmem) return E_OUTOFMEMORY; + + buf = GlobalLock(hmem); + memcpy(buf, xml, lstrlenW(xml) * sizeof(WCHAR)); + GlobalUnlock(hmem); + + hr = CreateStreamOnHGlobal(hmem, TRUE, &stream); + if (hr != S_OK) + { + GlobalFree(hmem); + return hr; + } + + hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL); + if (hr != S_OK) + { + IStream_Release(stream); + return hr; + } + + hr = IXmlReader_SetInput(reader, (IUnknown *)stream); + if (hr == S_OK) + hr = read_xml(reader, iface); + + IXmlReader_Release(reader); + IStream_Release(stream); + + return hr; } static const ITaskDefinitionVtbl TaskDefinition_vtbl = diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index dccc228..83f5367 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -734,7 +734,6 @@ static void test_GetTask(void) MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); -todo_wine ok(hr == S_OK, "RegisterTask error %#x\n", hr); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); @@ -742,10 +741,7 @@ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE_OR_UPDATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); -todo_wine ok(hr == S_OK, "RegisterTask error %#x\n", hr); - /* FIXME: Remove once implemented */ - if (hr != S_OK) goto failed; hr = IRegisteredTask_get_Name(task1, NULL); todo_wine
1
0
0
0
Dmitry Timoshkov : taskschd: Implement ITaskFolder:: RegisterTask as a wrapper around ITaskFolder::RegisterTaskDefinition.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: 433598c10b4f32ace1c3a46be1fd68210b81261a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=433598c10b4f32ace1c3a46be…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:10:04 2014 +0900 taskschd: Implement ITaskFolder::RegisterTask as a wrapper around ITaskFolder::RegisterTaskDefinition. --- dlls/taskschd/folder.c | 34 +++++++++++++++++++++++----------- dlls/taskschd/regtask.c | 2 +- dlls/taskschd/task.c | 2 +- dlls/taskschd/taskschd_private.h | 3 ++- dlls/taskschd/tests/scheduler.c | 4 ++++ 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/dlls/taskschd/folder.c b/dlls/taskschd/folder.c index 9e57e07..ab3f8f1 100644 --- a/dlls/taskschd/folder.c +++ b/dlls/taskschd/folder.c @@ -319,11 +319,32 @@ static HRESULT WINAPI TaskFolder_RegisterTask(ITaskFolder *iface, BSTR name, BST VARIANT user, VARIANT password, TASK_LOGON_TYPE logon, VARIANT sddl, IRegisteredTask **task) { + ITaskDefinition *taskdef; + HRESULT hr; + + TRACE("%p,%s,%s,%x,%s,%s,%d,%s,%p\n", iface, debugstr_w(name), debugstr_w(xml), flags, + debugstr_variant(&user), debugstr_variant(&password), logon, debugstr_variant(&sddl), task); + + hr = TaskDefinition_create(&taskdef); + if (hr != S_OK) return hr; + + hr = ITaskDefinition_put_XmlText(taskdef, xml); + if (hr == S_OK) + hr = ITaskFolder_RegisterTaskDefinition(iface, name, taskdef, flags, user, password, logon, sddl, task); + + ITaskDefinition_Release(taskdef); + return hr; +} + +static HRESULT WINAPI TaskFolder_RegisterTaskDefinition(ITaskFolder *iface, BSTR name, ITaskDefinition *definition, LONG flags, + VARIANT user, VARIANT password, TASK_LOGON_TYPE logon, + VARIANT sddl, IRegisteredTask **task) +{ TaskFolder *folder = impl_from_ITaskFolder(iface); IRegisteredTask *regtask = NULL; HRESULT hr; - FIXME("%p,%s,%s,%x,%s,%s,%d,%s,%p: stub\n", iface, debugstr_w(name), debugstr_w(xml), flags, + FIXME("%p,%s,%p,%x,%s,%s,%d,%s,%p: stub\n", iface, debugstr_w(name), definition, flags, debugstr_variant(&user), debugstr_variant(&password), logon, debugstr_variant(&sddl), task); if (!is_variant_null(&sddl)) @@ -334,7 +355,7 @@ static HRESULT WINAPI TaskFolder_RegisterTask(ITaskFolder *iface, BSTR name, BST if (!task) task = ®task; - hr = RegisteredTask_create(folder->path, name, xml, logon, task, TRUE); + hr = RegisteredTask_create(folder->path, name, definition, logon, task, TRUE); if (regtask) IRegisteredTask_Release(regtask); @@ -342,15 +363,6 @@ static HRESULT WINAPI TaskFolder_RegisterTask(ITaskFolder *iface, BSTR name, BST return hr; } -static HRESULT WINAPI TaskFolder_RegisterTaskDefinition(ITaskFolder *iface, BSTR path, ITaskDefinition *definition, LONG flags, - VARIANT user, VARIANT password, TASK_LOGON_TYPE logon, - VARIANT sddl, IRegisteredTask **task) -{ - FIXME("%p,%s,%p,%x,%s,%s,%d,%s,%p: stub\n", iface, debugstr_w(path), definition, flags, - debugstr_variant(&user), debugstr_variant(&password), logon, debugstr_variant(&sddl), task); - return E_NOTIMPL; -} - static HRESULT WINAPI TaskFolder_GetSecurityDescriptor(ITaskFolder *iface, LONG info, BSTR *sddl) { FIXME("%p,%x,%p: stub\n", iface, info, sddl); diff --git a/dlls/taskschd/regtask.c b/dlls/taskschd/regtask.c index bab50e3..7ed3c2a 100644 --- a/dlls/taskschd/regtask.c +++ b/dlls/taskschd/regtask.c @@ -251,7 +251,7 @@ static const IRegisteredTaskVtbl RegisteredTask_vtbl = regtask_GetRunTimes }; -HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, const WCHAR *xml, +HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinition *definition, TASK_LOGON_TYPE logon, IRegisteredTask **obj, BOOL create) { RegisteredTask *regtask; diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 700c79c..95b5ba1 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -787,7 +787,7 @@ static const ITaskDefinitionVtbl TaskDefinition_vtbl = TaskDefinition_put_XmlText }; -static HRESULT TaskDefinition_create(ITaskDefinition **obj) +HRESULT TaskDefinition_create(ITaskDefinition **obj) { TaskDefinition *taskdef; diff --git a/dlls/taskschd/taskschd_private.h b/dlls/taskschd/taskschd_private.h index b5e0cf1..f9cf909 100644 --- a/dlls/taskschd/taskschd_private.h +++ b/dlls/taskschd/taskschd_private.h @@ -22,9 +22,10 @@ #include "wine/unicode.h" HRESULT TaskService_create(void **obj) DECLSPEC_HIDDEN; +HRESULT TaskDefinition_create(ITaskDefinition **obj) DECLSPEC_HIDDEN; HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **obj, BOOL create) DECLSPEC_HIDDEN; HRESULT TaskFolderCollection_create(const WCHAR *path, ITaskFolderCollection **obj) DECLSPEC_HIDDEN; -HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, const WCHAR *xml, TASK_LOGON_TYPE logon, +HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinition *definition, TASK_LOGON_TYPE logon, IRegisteredTask **obj, BOOL create) DECLSPEC_HIDDEN; HRESULT RegisteredTaskCollection_create(const WCHAR *path, IRegisteredTaskCollection **obj) DECLSPEC_HIDDEN; diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 83f5367..dccc228 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -734,6 +734,7 @@ static void test_GetTask(void) MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, NULL); +todo_wine ok(hr == S_OK, "RegisterTask error %#x\n", hr); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); @@ -741,7 +742,10 @@ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); hr = ITaskFolder_RegisterTask(root, Wine_Task1, xmlW, TASK_CREATE_OR_UPDATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); +todo_wine ok(hr == S_OK, "RegisterTask error %#x\n", hr); + /* FIXME: Remove once implemented */ + if (hr != S_OK) goto failed; hr = IRegisteredTask_get_Name(task1, NULL); todo_wine
1
0
0
0
Dmitry Timoshkov : xmllite: Add an import library.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: d73750f0869f9aa28d117d96c0683e51918addbb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d73750f0869f9aa28d117d96c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Feb 17 14:09:59 2014 +0900 xmllite: Add an import library. --- configure | 2 +- configure.ac | 2 +- dlls/xmllite/Makefile.in | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index bb68c51..4dcd8e2 100755 --- a/configure +++ b/configure @@ -17259,7 +17259,7 @@ wine_fn_config_dll xinput1_3 enable_xinput1_3 implib xinput wine_fn_config_test dlls/xinput1_3/tests xinput1_3_test wine_fn_config_dll xinput1_4 enable_xinput1_4 wine_fn_config_dll xinput9_1_0 enable_xinput9_1_0 -wine_fn_config_dll xmllite enable_xmllite +wine_fn_config_dll xmllite enable_xmllite implib wine_fn_config_test dlls/xmllite/tests xmllite_test wine_fn_config_dll xolehlp enable_xolehlp wine_fn_config_dll xpsprint enable_xpsprint diff --git a/configure.ac b/configure.ac index 32730f3..de51691 100644 --- a/configure.ac +++ b/configure.ac @@ -3269,7 +3269,7 @@ WINE_CONFIG_DLL(xinput1_3,,[implib],[xinput]) WINE_CONFIG_TEST(dlls/xinput1_3/tests) WINE_CONFIG_DLL(xinput1_4) WINE_CONFIG_DLL(xinput9_1_0) -WINE_CONFIG_DLL(xmllite) +WINE_CONFIG_DLL(xmllite,,[implib]) WINE_CONFIG_TEST(dlls/xmllite/tests) WINE_CONFIG_DLL(xolehlp) WINE_CONFIG_DLL(xpsprint) diff --git a/dlls/xmllite/Makefile.in b/dlls/xmllite/Makefile.in index e3431a1..a51c3dd 100644 --- a/dlls/xmllite/Makefile.in +++ b/dlls/xmllite/Makefile.in @@ -1,4 +1,5 @@ MODULE = xmllite.dll +IMPORTLIB = xmllite C_SRCS = \ reader.c \
1
0
0
0
Nikolay Sivov : oleaut32: Fix destination data release when copying FADF_RECORD arrays.
by Alexandre Julliard
18 Feb '14
18 Feb '14
Module: wine Branch: master Commit: f85644c6f9d8f350ce19954fcbe5bed9d88856a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f85644c6f9d8f350ce19954fc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Feb 18 10:59:31 2014 +0400 oleaut32: Fix destination data release when copying FADF_RECORD arrays. --- dlls/oleaut32/safearray.c | 102 ++++++++++++++++++++++----------------- dlls/oleaut32/tests/safearray.c | 3 +- 2 files changed, 59 insertions(+), 46 deletions(-) diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index 71f8c69..436a2ca 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -306,7 +306,7 @@ static HRESULT SAFEARRAY_DestroyData(SAFEARRAY *psa, ULONG ulStartCell) lpUnknown++; } } - else if (psa->fFeatures & (FADF_RECORD)) + else if (psa->fFeatures & FADF_RECORD) { IRecordInfo *lpRecInfo; @@ -347,12 +347,15 @@ static HRESULT SAFEARRAY_DestroyData(SAFEARRAY *psa, ULONG ulStartCell) return S_OK; } -/* Copy data items from one array to another */ +/* Copy data items from one array to another. Destination data is freed before copy. */ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest) { + HRESULT hr = S_OK; + if (!psa->pvData) return S_OK; - else if (!dest->pvData || psa->fFeatures & FADF_DATADELETED) + + if (!dest->pvData || psa->fFeatures & FADF_DATADELETED) return E_INVALIDARG; else { @@ -362,70 +365,84 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest) if (psa->fFeatures & FADF_VARIANT) { - VARIANT* lpVariant = psa->pvData; - VARIANT* lpDest = dest->pvData; + VARIANT *src_var = psa->pvData; + VARIANT *dest_var = dest->pvData; while(ulCellCount--) { HRESULT hRet; - hRet = VariantCopy(lpDest, lpVariant); - if (FAILED(hRet)) FIXME("VariantCopy failed with 0x%x\n", hRet); - lpVariant++; - lpDest++; + /* destination is cleared automatically */ + hRet = VariantCopy(dest_var, src_var); + if (FAILED(hRet)) FIXME("VariantCopy failed with 0x%08x, element %u\n", hRet, ulCellCount); + src_var++; + dest_var++; } } else if (psa->fFeatures & FADF_BSTR) { - BSTR* lpBstr = psa->pvData; - BSTR* lpDest = dest->pvData; + BSTR *src_bstr = psa->pvData; + BSTR *dest_bstr = dest->pvData; while(ulCellCount--) { - if (*lpBstr) + SysFreeString(*dest_bstr); + if (*src_bstr) { - *lpDest = SysAllocStringByteLen((char*)*lpBstr, SysStringByteLen(*lpBstr)); - if (!*lpDest) + *dest_bstr = SysAllocStringByteLen((char*)*src_bstr, SysStringByteLen(*src_bstr)); + if (!*dest_bstr) return E_OUTOFMEMORY; } else - *lpDest = NULL; - lpBstr++; - lpDest++; + *dest_bstr = NULL; + src_bstr++; + dest_bstr++; } } - else + else if (psa->fFeatures & FADF_RECORD) { - /* Copy the data over */ - memcpy(dest->pvData, psa->pvData, ulCellCount * psa->cbElements); + const SAFEARRAYBOUND* psab = psa->rgsabound; + BYTE *dest_data = dest->pvData; + BYTE *src_data = psa->pvData; + IRecordInfo *record; - if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH)) + SafeArrayGetRecordInfo(psa, &record); + while (ulCellCount--) { - LPUNKNOWN *lpUnknown = dest->pvData; - - while(ulCellCount--) - { - if (*lpUnknown) - IUnknown_AddRef(*lpUnknown); - lpUnknown++; - } + /* RecordCopy() clears destination record */ + hr = IRecordInfo_RecordCopy(record, src_data, dest_data); + if (FAILED(hr)) break; + src_data += psab->cElements; + dest_data += psab->cElements; } - } - if (psa->fFeatures & FADF_RECORD) + SafeArraySetRecordInfo(dest, record); + IRecordInfo_Release(record); + } + else if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH)) { - IRecordInfo* pRecInfo = NULL; - - SafeArrayGetRecordInfo(psa, &pRecInfo); - SafeArraySetRecordInfo(dest, pRecInfo); + IUnknown **dest_unk = dest->pvData; + IUnknown **src_unk = psa->pvData; - if (pRecInfo) + /* release old iface, addref new one */ + while (ulCellCount--) { - /* Release because Get() adds a reference */ - IRecordInfo_Release(pRecInfo); + if (*dest_unk) + IUnknown_Release(*dest_unk); + *dest_unk = *src_unk; + if (*dest_unk) + IUnknown_AddRef(*dest_unk); + src_unk++; + dest_unk++; } } - else if (psa->fFeatures & FADF_HAVEIID) + else + { + /* Copy the data over */ + memcpy(dest->pvData, psa->pvData, ulCellCount * psa->cbElements); + } + + if (psa->fFeatures & FADF_HAVEIID) { GUID guid; SafeArrayGetIID(psa, &guid); @@ -436,7 +453,8 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest) SAFEARRAY_SetHiddenDWORD(dest, SAFEARRAY_GetHiddenDWORD(psa)); } } - return S_OK; + + return hr; } /************************************************************************* @@ -1281,7 +1299,6 @@ HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY *psa) */ HRESULT WINAPI SafeArrayCopyData(SAFEARRAY *psaSource, SAFEARRAY *psaTarget) { - HRESULT hr; int dim; TRACE("(%p,%p)\n", psaSource, psaTarget); @@ -1297,9 +1314,6 @@ HRESULT WINAPI SafeArrayCopyData(SAFEARRAY *psaSource, SAFEARRAY *psaTarget) psaTarget->rgsabound[dim].cElements) return E_INVALIDARG; - hr = SAFEARRAY_DestroyData(psaTarget, 0); - if (FAILED(hr)) return hr; - return SAFEARRAY_CopyData(psaSource, psaTarget); } diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 2ab9ad3..915d0ca 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -1636,10 +1636,9 @@ static void test_SafeArrayCreateEx(void) /* array copy code doesn't explicitely clear a record */ hres = SafeArrayCopyData(sa, sacopy); ok(hres == S_OK, "got 0x%08x\n", hres); -todo_wine { ok(iRec->recordcopy == sab[0].cElements, "got %d\n", iRec->recordcopy); ok(iRec->clearCalled == 0, "got %d\n", iRec->clearCalled); -} + hres = SafeArrayDestroy(sacopy); ok(hres == S_OK, "got 0x%08x\n", hres);
1
0
0
0
Francois Gouget : ddraw/tests: Better clean up when skipping the primary palette tests.
by Alexandre Julliard
17 Feb '14
17 Feb '14
Module: wine Branch: master Commit: 4afe73ff39184e648468f8bdbc4a4964be0dfbbf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4afe73ff39184e648468f8bdb…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Feb 17 17:44:56 2014 +0100 ddraw/tests: Better clean up when skipping the primary palette tests. --- dlls/ddraw/tests/ddraw1.c | 3 ++- dlls/ddraw/tests/ddraw2.c | 3 ++- dlls/ddraw/tests/ddraw4.c | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 7d97ec6..ba7589b 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -4080,7 +4080,8 @@ static void test_primary_palette(void) hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8); if (hr == E_NOTIMPL) { - win_skip("8bpp display mode is not supported\n"); + win_skip("changing display mode is not supported (8bpp)\n"); + IDirectDraw_Release(ddraw); DestroyWindow(window); return; } diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index ea9fc5c..f46c515 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -5177,7 +5177,8 @@ static void test_primary_palette(void) hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0); if (hr == E_NOTIMPL) { - win_skip("8bpp display mode is not supported\n"); + win_skip("changing display mode is not supported (8bpp)\n"); + IDirectDraw2_Release(ddraw); DestroyWindow(window); return; } diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index c768a95..d5f9e7e 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -5771,13 +5771,14 @@ static void test_primary_palette(void) window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0); - ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); if (hr == E_NOTIMPL) { - win_skip("8bpp display mode is not supported\n"); + win_skip("changing display mode is not supported (8bpp)\n"); + IDirectDraw4_Release(ddraw); DestroyWindow(window); return; } + ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
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