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
April 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
500 discussions
Start a n
N
ew thread
Alexandre Julliard : makedep: Open files from the top-level directory as far as possible.
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: c16df0cd9b45acbaafc3e87faf1a4ab42dceb9db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c16df0cd9b45acbaafc3e87fa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 11 14:24:53 2014 +0200 makedep: Open files from the top-level directory as far as possible. --- tools/makedep.c | 214 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 96 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c16df0cd9b45acbaafc3e…
1
0
0
0
Dmitry Timoshkov : taskschd: Implement setters for IRegistrationInfo string properties.
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: bd1576975a1f6ccc6caf47ade7da69af70419db2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd1576975a1f6ccc6caf47ade…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 11 17:46:47 2014 +0900 taskschd: Implement setters for IRegistrationInfo string properties. --- dlls/taskschd/task.c | 120 ++++++++++++++++++++++++++++++++++----- dlls/taskschd/tests/scheduler.c | 1 - 2 files changed, 106 insertions(+), 15 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 4a77458..d1bc7eb 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -61,6 +61,13 @@ static ULONG WINAPI RegistrationInfo_Release(IRegistrationInfo *iface) if (!ref) { TRACE("destroying %p\n", iface); + heap_free(reginfo->description); + heap_free(reginfo->author); + heap_free(reginfo->version); + heap_free(reginfo->date); + heap_free(reginfo->documentation); + heap_free(reginfo->uri); + heap_free(reginfo->source); heap_free(reginfo); } @@ -128,8 +135,16 @@ static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface, static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description) { - FIXME("%p,%p: stub\n", iface, debugstr_w(description)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(description)); + + if (!description) return E_INVALIDARG; + + heap_free(reginfo->description); + reginfo->description = heap_strdupW(description); + /* FIXME: update XML on the server side */ + return reginfo->description ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author) @@ -146,8 +161,16 @@ static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR author) { - FIXME("%p,%p: stub\n", iface, debugstr_w(author)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(author)); + + if (!author) return E_INVALIDARG; + + heap_free(reginfo->author); + reginfo->author = heap_strdupW(author); + /* FIXME: update XML on the server side */ + return reginfo->author ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BSTR *version) @@ -164,8 +187,16 @@ static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BST static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BSTR version) { - FIXME("%p,%p: stub\n", iface, debugstr_w(version)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(version)); + + if (!version) return E_INVALIDARG; + + heap_free(reginfo->version); + reginfo->version = heap_strdupW(version); + /* FIXME: update XML on the server side */ + return reginfo->version ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR *date) @@ -182,8 +213,16 @@ static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR * static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR date) { - FIXME("%p,%p: stub\n", iface, debugstr_w(date)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(date)); + + if (!date) return E_INVALIDARG; + + heap_free(reginfo->date); + reginfo->date = heap_strdupW(date); + /* FIXME: update XML on the server side */ + return reginfo->date ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *iface, BSTR *doc) @@ -200,8 +239,16 @@ static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *ifac static HRESULT WINAPI RegistrationInfo_put_Documentation(IRegistrationInfo *iface, BSTR doc) { - FIXME("%p,%p: stub\n", iface, debugstr_w(doc)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(doc)); + + if (!doc) return E_INVALIDARG; + + heap_free(reginfo->documentation); + reginfo->documentation = heap_strdupW(doc); + /* FIXME: update XML on the server side */ + return reginfo->documentation ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_XmlText(IRegistrationInfo *iface, BSTR *xml) @@ -230,8 +277,16 @@ static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *u static HRESULT WINAPI RegistrationInfo_put_URI(IRegistrationInfo *iface, BSTR uri) { - FIXME("%p,%p: stub\n", iface, debugstr_w(uri)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(uri)); + + if (!uri) return E_INVALIDARG; + + heap_free(reginfo->uri); + reginfo->uri = heap_strdupW(uri); + /* FIXME: update XML on the server side */ + return reginfo->uri ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI RegistrationInfo_get_SecurityDescriptor(IRegistrationInfo *iface, VARIANT *sddl) @@ -260,8 +315,16 @@ static HRESULT WINAPI RegistrationInfo_get_Source(IRegistrationInfo *iface, BSTR static HRESULT WINAPI RegistrationInfo_put_Source(IRegistrationInfo *iface, BSTR source) { - FIXME("%p,%p: stub\n", iface, debugstr_w(source)); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, debugstr_w(source)); + + if (!source) return E_INVALIDARG; + + heap_free(reginfo->source); + reginfo->source = heap_strdupW(source); + /* FIXME: update XML on the server side */ + return reginfo->source ? S_OK : E_OUTOFMEMORY; } static const IRegistrationInfoVtbl RegistrationInfo_vtbl = @@ -2215,6 +2278,7 @@ static HRESULT read_xml(IXmlReader *reader, ITaskDefinition *taskdef) static HRESULT WINAPI TaskDefinition_put_XmlText(ITaskDefinition *iface, BSTR xml) { + TaskDefinition *taskdef = impl_from_ITaskDefinition(iface); HRESULT hr; IStream *stream; IXmlReader *reader; @@ -2248,7 +2312,35 @@ static HRESULT WINAPI TaskDefinition_put_XmlText(ITaskDefinition *iface, BSTR xm hr = IXmlReader_SetInput(reader, (IUnknown *)stream); if (hr == S_OK) + { + if (taskdef->reginfo) + { + IRegistrationInfo_Release(taskdef->reginfo); + taskdef->reginfo = NULL; + } + if (taskdef->taskset) + { + ITaskSettings_Release(taskdef->taskset); + taskdef->taskset = NULL; + } + if (taskdef->triggers) + { + ITriggerCollection_Release(taskdef->triggers); + taskdef->triggers = NULL; + } + if (taskdef->principal) + { + IPrincipal_Release(taskdef->principal); + taskdef->principal = NULL; + } + if (taskdef->actions) + { + IActionCollection_Release(taskdef->actions); + taskdef->actions = NULL; + } + hr = read_xml(reader, iface); + } IXmlReader_Release(reader); IStream_Release(stream); diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 990753d..74a5263 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1353,7 +1353,6 @@ todo_wine hr = IRegistrationInfo_get_Description(reginfo, &bstr); ok(hr == S_OK, "get_Description error %#x\n", hr); -todo_wine ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = IRegistrationInfo_get_Author(reginfo, &bstr);
1
0
0
0
Dmitry Timoshkov : taskschd: Implement getters for IRegistrationInfo string properties.
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 8fd6435a6a933306e681af7dade75d2ca0d99545 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fd6435a6a933306e681af7da…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 11 17:46:41 2014 +0900 taskschd: Implement getters for IRegistrationInfo string properties. --- dlls/taskschd/task.c | 85 +++++++++++++++++++++++++++++---------- dlls/taskschd/tests/scheduler.c | 18 +-------- 2 files changed, 65 insertions(+), 38 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index e6e61c7..4a77458 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -39,6 +39,7 @@ typedef struct { IRegistrationInfo IRegistrationInfo_iface; LONG ref; + WCHAR *description, *author, *version, *date, *documentation, *uri, *source; } registration_info; static inline registration_info *impl_from_IRegistrationInfo(IRegistrationInfo *iface) @@ -115,8 +116,14 @@ static HRESULT WINAPI RegistrationInfo_Invoke(IRegistrationInfo *iface, DISPID d static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface, BSTR *description) { - FIXME("%p,%p: stub\n", iface, description); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, description); + + if (!description) return E_POINTER; + + *description = SysAllocString(reginfo->description); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description) @@ -127,8 +134,14 @@ static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author) { - FIXME("%p,%p: stub\n", iface, author); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, author); + + if (!author) return E_POINTER; + + *author = SysAllocString(reginfo->author); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR author) @@ -139,8 +152,14 @@ static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BSTR *version) { - FIXME("%p,%p: stub\n", iface, version); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, version); + + if (!version) return E_POINTER; + + *version = SysAllocString(reginfo->version); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BSTR version) @@ -151,8 +170,14 @@ static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BST static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR *date) { - FIXME("%p,%p: stub\n", iface, date); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, date); + + if (!date) return E_POINTER; + + *date = SysAllocString(reginfo->date); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR date) @@ -163,8 +188,14 @@ static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR d static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *iface, BSTR *doc) { - FIXME("%p,%p: stub\n", iface, doc); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, doc); + + if (!doc) return E_POINTER; + + *doc = SysAllocString(reginfo->documentation); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Documentation(IRegistrationInfo *iface, BSTR doc) @@ -187,8 +218,14 @@ static HRESULT WINAPI RegistrationInfo_put_XmlText(IRegistrationInfo *iface, BST static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *uri) { - FIXME("%p,%p: stub\n", iface, uri); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, uri); + + if (!uri) return E_POINTER; + + *uri = SysAllocString(reginfo->uri); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_URI(IRegistrationInfo *iface, BSTR uri) @@ -211,8 +248,14 @@ static HRESULT WINAPI RegistrationInfo_put_SecurityDescriptor(IRegistrationInfo static HRESULT WINAPI RegistrationInfo_get_Source(IRegistrationInfo *iface, BSTR *source) { - FIXME("%p,%p: stub\n", iface, source); - return E_NOTIMPL; + registration_info *reginfo = impl_from_IRegistrationInfo(iface); + + TRACE("%p,%p\n", iface, source); + + if (!source) return E_POINTER; + + *source = SysAllocString(reginfo->source); + return S_OK; } static HRESULT WINAPI RegistrationInfo_put_Source(IRegistrationInfo *iface, BSTR source) @@ -1238,49 +1281,49 @@ static HRESULT write_registration_info(IStream *stream, IRegistrationInfo *regin push_indent(); hr = IRegistrationInfo_get_Source(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Source, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_Date(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Date, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_Author(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Author, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_Version(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Version, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_Description(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Description, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_Documentation(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, Documentation, bstr); SysFreeString(bstr); if (hr != S_OK) return hr; } hr = IRegistrationInfo_get_URI(reginfo, &bstr); - if (hr == S_OK) + if (hr == S_OK && bstr) { hr = write_text_value(stream, URI, bstr); SysFreeString(bstr); diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 9a3adbb..990753d 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1352,42 +1352,27 @@ todo_wine ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); hr = IRegistrationInfo_get_Description(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Description error %#x\n", hr); -if (hr == S_OK) -{ +todo_wine ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); -} hr = IRegistrationInfo_get_Author(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Author error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); hr = IRegistrationInfo_get_Version(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Version error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); hr = IRegistrationInfo_get_Date(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Date error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); hr = IRegistrationInfo_get_Documentation(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Documentation error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); hr = IRegistrationInfo_get_URI(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_URI error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); hr = IRegistrationInfo_get_Source(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Source error %#x\n", hr); -if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); V_VT(&var) = VT_BSTR; V_BSTR(&var) = NULL; @@ -1406,7 +1391,6 @@ if (hr == S_OK) ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); hr = IRegistrationInfo_get_Description(reginfo, &bstr); -todo_wine ok(hr == S_OK, "get_Description error %#x\n", hr); if (hr == S_OK) ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
1
0
0
0
Dmitry Timoshkov : taskschd/tests: Add some tests for task registration info.
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 84dc933cadcac7bf597e96506d9d04f907346437 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84dc933cadcac7bf597e96506…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 11 17:46:35 2014 +0900 taskschd/tests: Add some tests for task registration info. --- dlls/taskschd/tests/scheduler.c | 73 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 6751f62..9a3adbb 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1258,6 +1258,7 @@ static void test_TaskDefinition(void) " </Exec>\n" " </Actions>\n" "</Task>\n"; + static WCHAR Task1[] = { '"','T','a','s','k','1','"',0 }; static struct settings def_settings = { { 0 }, { 'P','T','7','2','H',0 }, { 0 }, 0, 7, TASK_INSTANCES_IGNORE_NEW, TASK_COMPATIBILITY_V2, VARIANT_TRUE, VARIANT_TRUE, VARIANT_TRUE, VARIANT_TRUE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_TRUE, VARIANT_FALSE, @@ -1269,7 +1270,9 @@ static void test_TaskDefinition(void) HRESULT hr; ITaskService *service; ITaskDefinition *taskdef; - BSTR xml; + IRegistrationInfo *reginfo; + BSTR xml, bstr; + VARIANT var; WCHAR xmlW[sizeof(xml1)]; hr = CoCreateInstance(&CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskService, (void **)&service); @@ -1341,6 +1344,74 @@ todo_wine hr = ITaskDefinition_put_XmlText(taskdef, xmlW); ok(hr == SCHED_E_MALFORMEDXML, "expected SCHED_E_MALFORMEDXML, got %#x\n", hr); + /* test registration info */ + MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); + hr = ITaskDefinition_put_XmlText(taskdef, xmlW); + ok(hr == S_OK, "put_XmlText error %#x\n", hr); + hr = ITaskDefinition_get_RegistrationInfo(taskdef, ®info); + ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); + + hr = IRegistrationInfo_get_Description(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Description error %#x\n", hr); +if (hr == S_OK) +{ + ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr)); + SysFreeString(bstr); +} + hr = IRegistrationInfo_get_Author(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Author error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + hr = IRegistrationInfo_get_Version(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Version error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + hr = IRegistrationInfo_get_Date(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Date error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + hr = IRegistrationInfo_get_Documentation(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Documentation error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + hr = IRegistrationInfo_get_URI(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_URI error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + hr = IRegistrationInfo_get_Source(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Source error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = NULL; + hr = IRegistrationInfo_get_SecurityDescriptor(reginfo, &var); +todo_wine + ok(hr == S_OK, "get_SecurityDescriptor error %#x\n", hr); +if (hr == S_OK) + ok(V_VT(&var) == VT_EMPTY, "expected VT_EMPTY, got %u\n", V_VT(&var)); + + IRegistrationInfo_Release(reginfo); + + MultiByteToWideChar(CP_ACP, 0, xml4, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); + hr = ITaskDefinition_put_XmlText(taskdef, xmlW); + ok(hr == S_OK, "put_XmlText error %#x\n", hr); + hr = ITaskDefinition_get_RegistrationInfo(taskdef, ®info); + ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr); + + hr = IRegistrationInfo_get_Description(reginfo, &bstr); +todo_wine + ok(hr == S_OK, "get_Description error %#x\n", hr); +if (hr == S_OK) + ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr)); + + IRegistrationInfo_Release(reginfo); ITaskDefinition_Release(taskdef); ITaskService_Release(service); }
1
0
0
0
Henri Verbeet : d3d9/tests: Make the sanity test a normal test.
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 74a2bd084f41a29fd0e144d305f257bbf87ed0fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74a2bd084f41a29fd0e144d30…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 11 07:53:22 2014 +0200 d3d9/tests: Make the sanity test a normal test. --- dlls/d3d9/tests/visual.c | 140 ++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 80 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 0a1d05f..6760f9b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -192,44 +192,6 @@ static IDirect3DDevice9 *create_device(IDirect3D9 *d3d, HWND device_window, HWND return NULL; } -static IDirect3DDevice9 *init_d3d9(void) -{ - D3DADAPTER_IDENTIFIER9 identifier; - IDirect3DDevice9 *device; - IDirect3D9 *d3d9; - HWND window; - HRESULT hr; - - if (!(d3d9 = Direct3DCreate9(D3D_SDK_VERSION))) - { - win_skip("could not create D3D9\n"); - return NULL; - } - - memset(&identifier, 0, sizeof(identifier)); - hr = IDirect3D9_GetAdapterIdentifier(d3d9, 0, 0, &identifier); - ok(hr == D3D_OK, "Failed to get adapter identifier description\n"); - trace("Driver string: \"%s\"\n", identifier.Driver); - trace("Description string: \"%s\"\n", identifier.Description); - /* Only Windows XP's default VGA driver should have an empty description */ - ok(identifier.Description[0] != '\0' || - broken(strcmp(identifier.Driver, "vga.dll") == 0), - "Empty driver description\n"); - trace("Device name string: \"%s\"\n", identifier.DeviceName); - ok(identifier.DeviceName[0] != '\0', "Empty device name\n"); - trace("Driver version %d.%d.%d.%d\n", - HIWORD(U(identifier.DriverVersion).HighPart), LOWORD(U(identifier.DriverVersion).HighPart), - HIWORD(U(identifier.DriverVersion).LowPart), LOWORD(U(identifier.DriverVersion).LowPart)); - - window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 0, 0, 640, 480, NULL, NULL, NULL, NULL); - if ((device = create_device(d3d9, window, window, TRUE))) - return device; - - DestroyWindow(window); - return NULL; -} - static void cleanup_device(IDirect3DDevice9 *device) { if (device) @@ -266,6 +228,48 @@ struct nvertex DWORD diffuse; }; +static void test_sanity(void) +{ + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; + HRESULT hr; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0); + ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + color = getPixelColor(device, 1, 1); + ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color); + + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ddee, 0.0, 0); + ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + color = getPixelColor(device, 639, 479); + ok(color == 0x0000ddee, "Got unexpected color 0x%08x.\n", color); + + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr); + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + static void lighting_test(void) { DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL; @@ -16556,53 +16560,32 @@ static void add_dirty_rect_test(void) START_TEST(visual) { - IDirect3DDevice9 *device_ptr; - D3DCAPS9 caps; + D3DADAPTER_IDENTIFIER9 identifier; + IDirect3D9 *d3d; HRESULT hr; - DWORD color; - if (!(device_ptr = init_d3d9())) + if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION))) { - skip("Creating the device failed\n"); + skip("could not create D3D9 object\n"); return; } - IDirect3DDevice9_GetDeviceCaps(device_ptr, &caps); - - /* Check for the reliability of the returned data */ - hr = IDirect3DDevice9_Clear(device_ptr, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); - if(FAILED(hr)) - { - skip("Clear failed, can't assure correctness of the test results, skipping\n"); - goto cleanup; - } - - color = getPixelColor(device_ptr, 1, 1); - if(color !=0x00ff0000) - { - skip("Sanity check returned an incorrect color(%08x), can't assure the correctness of the tests, skipping\n", color); - goto cleanup; - } - IDirect3DDevice9_Present(device_ptr, NULL, NULL, NULL, NULL); - - hr = IDirect3DDevice9_Clear(device_ptr, 0, NULL, D3DCLEAR_TARGET, 0xff00ddee, 0.0, 0); - if(FAILED(hr)) - { - skip("Clear failed, can't assure correctness of the test results, skipping\n"); - goto cleanup; - } - - color = getPixelColor(device_ptr, 639, 479); - if(color != 0x0000ddee) - { - skip("Sanity check returned an incorrect color(%08x), can't assure the correctness of the tests, skipping\n", color); - goto cleanup; - } - IDirect3DDevice9_Present(device_ptr, NULL, NULL, NULL, NULL); + memset(&identifier, 0, sizeof(identifier)); + hr = IDirect3D9_GetAdapterIdentifier(d3d, 0, 0, &identifier); + ok(SUCCEEDED(hr), "Failed to get adapter identifier, hr %#x.\n", hr); + trace("Driver string: \"%s\"\n", identifier.Driver); + trace("Description string: \"%s\"\n", identifier.Description); + /* Only Windows XP's default VGA driver should have an empty description */ + ok(identifier.Description[0] || broken(!strcmp(identifier.Driver, "vga.dll")), "Empty driver description.\n"); + trace("Device name string: \"%s\"\n", identifier.DeviceName); + ok(identifier.DeviceName[0], "Empty device name.\n"); + trace("Driver version %d.%d.%d.%d\n", + HIWORD(U(identifier.DriverVersion).HighPart), LOWORD(U(identifier.DriverVersion).HighPart), + HIWORD(U(identifier.DriverVersion).LowPart), LOWORD(U(identifier.DriverVersion).LowPart)); - cleanup_device(device_ptr); - device_ptr = NULL; + IDirect3D9_Release(d3d); + test_sanity(); depth_clamp_test(); stretchrect_test(); lighting_test(); @@ -16681,7 +16664,4 @@ START_TEST(visual) multisampled_depth_buffer_test(); resz_test(); stencil_cull_test(); - -cleanup: - cleanup_device(device_ptr); }
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for depth_clamp_test().
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 9f6765f7592635f6a96ba3995d5b3e4abee1dd49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f6765f7592635f6a96ba3995…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 11 07:53:21 2014 +0200 d3d9/tests: Use a separate device for depth_clamp_test(). --- dlls/d3d9/tests/visual.c | 63 ++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 61ef052..0a1d05f 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12358,55 +12358,72 @@ done: * clipped when D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't. * - The viewport's MinZ/MaxZ is irrelevant for this. */ -static void depth_clamp_test(IDirect3DDevice9 *device) +static void depth_clamp_test(void) { - const struct tvertex quad1[] = + IDirect3DDevice9 *device; + D3DVIEWPORT9 vp; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + + static const struct tvertex quad1[] = { { 0.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, {640.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, { 0.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, {640.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, }; - const struct tvertex quad2[] = + static const struct tvertex quad2[] = { { 0.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, {640.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, { 0.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, {640.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, }; - const struct tvertex quad3[] = + static const struct tvertex quad3[] = { {112.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, {208.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, {112.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, {208.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, }; - const struct tvertex quad4[] = + static const struct tvertex quad4[] = { { 42.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, {112.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, { 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, {112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, }; - const struct vertex quad5[] = + static const struct vertex quad5[] = { { -0.5f, 0.5f, 10.0f, 0xff14f914}, { 0.5f, 0.5f, 10.0f, 0xff14f914}, { -0.5f, -0.5f, 10.0f, 0xff14f914}, { 0.5f, -0.5f, 10.0f, 0xff14f914}, }; - const struct vertex quad6[] = + static const struct vertex quad6[] = { - { -1.0f, 0.5f, 10.0f, 0xfff91414}, - { 1.0f, 0.5f, 10.0f, 0xfff91414}, - { -1.0f, 0.25f, 10.0f, 0xfff91414}, - { 1.0f, 0.25f, 10.0f, 0xfff91414}, + { -1.0f, 0.5f, 10.0f, 0xfff91414}, + { 1.0f, 0.5f, 10.0f, 0xfff91414}, + { -1.0f, 0.25f, 10.0f, 0xfff91414}, + { 1.0f, 0.25f, 10.0f, 0xfff91414}, }; - D3DVIEWPORT9 vp; - D3DCOLOR color; - D3DCAPS9 caps; - HRESULT hr; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); vp.X = 0; vp.Y = 0; @@ -12415,9 +12432,6 @@ static void depth_clamp_test(IDirect3DDevice9 *device) vp.MinZ = 0.0; vp.MaxZ = 7.5; - hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); - ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetViewport(device, &vp); if(FAILED(hr)) { @@ -12511,10 +12525,11 @@ static void depth_clamp_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); - vp.MinZ = 0.0; - vp.MaxZ = 1.0; - hr = IDirect3DDevice9_SetViewport(device, &vp); - ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void depth_bounds_test(void) @@ -16585,12 +16600,10 @@ START_TEST(visual) } IDirect3DDevice9_Present(device_ptr, NULL, NULL, NULL, NULL); - /* Now execute the real tests */ - depth_clamp_test(device_ptr); - cleanup_device(device_ptr); device_ptr = NULL; + depth_clamp_test(); stretchrect_test(); lighting_test(); clear_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for stretchrect_test().
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 7273d52bcd6819304b935fe32d3cc503a9765ef2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7273d52bcd6819304b935fe32…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 11 07:53:20 2014 +0200 d3d9/tests: Use a separate device for stretchrect_test(). --- dlls/d3d9/tests/visual.c | 1109 +++++++++++++++++++--------------------------- 1 file changed, 466 insertions(+), 643 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7273d52bcd6819304b935…
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for lighting_test().
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: a8f3708322f7290ab29677b7a66400bcb7dc8323 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8f3708322f7290ab29677b7a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 11 07:53:19 2014 +0200 d3d9/tests: Use a separate device for lighting_test(). --- dlls/d3d9/tests/visual.c | 125 +++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 63 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index cb9a132..35cc5c9 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -266,50 +266,71 @@ struct nvertex DWORD diffuse; }; -static void lighting_test(IDirect3DDevice9 *device) +static void lighting_test(void) { - HRESULT hr; - DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE; DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL; - DWORD color; - D3DMATERIAL9 material, old_material; - DWORD cop, carg; - DWORD old_colorwrite; - - float mat[16] = { 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f }; + DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE; + IDirect3DDevice9 *device; + D3DMATERIAL9 material; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; + HRESULT hr; - struct vertex unlitquad[] = + static const float mat[16] = { - {-1.0f, -1.0f, 0.1f, 0xffff0000}, - {-1.0f, 0.0f, 0.1f, 0xffff0000}, - { 0.0f, 0.0f, 0.1f, 0xffff0000}, - { 0.0f, -1.0f, 0.1f, 0xffff0000}, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }; + static const struct vertex unlitquad[] = + { + {-1.0f, -1.0f, 0.1f, 0xffff0000}, + {-1.0f, 0.0f, 0.1f, 0xffff0000}, + { 0.0f, 0.0f, 0.1f, 0xffff0000}, + { 0.0f, -1.0f, 0.1f, 0xffff0000}, + }; + static const struct vertex litquad[] = + { + {-1.0f, 0.0f, 0.1f, 0xff00ff00}, + {-1.0f, 1.0f, 0.1f, 0xff00ff00}, + { 0.0f, 1.0f, 0.1f, 0xff00ff00}, + { 0.0f, 0.0f, 0.1f, 0xff00ff00}, }; - struct vertex litquad[] = + static const struct vertex lighting_test[] = { - {-1.0f, 0.0f, 0.1f, 0xff00ff00}, - {-1.0f, 1.0f, 0.1f, 0xff00ff00}, - { 0.0f, 1.0f, 0.1f, 0xff00ff00}, - { 0.0f, 0.0f, 0.1f, 0xff00ff00}, + {-1.0f, -1.0f, 0.1f, 0x8000ff00}, + { 1.0f, -1.0f, 0.1f, 0x80000000}, + {-1.0f, 1.0f, 0.1f, 0x8000ff00}, + { 1.0f, 1.0f, 0.1f, 0x80000000}, }; - struct nvertex unlitnquad[] = + static const struct nvertex unlitnquad[] = { - { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, + { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, + { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, + { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, + { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, }; - struct nvertex litnquad[] = + static const struct nvertex litnquad[] = { - { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, + { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, + { 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, + { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, + { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, }; - WORD Indices[] = {0, 1, 2, 2, 3, 0}; + static const WORD Indices[] = {0, 1, 2, 2, 3, 0}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); @@ -337,8 +358,6 @@ static void lighting_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); - hr = IDirect3DDevice9_GetRenderState(device, D3DRS_COLORWRITEENABLE, &old_colorwrite); - ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderState failed with %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); @@ -395,8 +414,6 @@ static void lighting_test(IDirect3DDevice9 *device) IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - hr = IDirect3DDevice9_GetMaterial(device, &old_material); - ok(hr == D3D_OK, "IDirect3DDevice9_GetMaterial returned %08x\n", hr); memset(&material, 0, sizeof(material)); material.Diffuse.r = 0.0; material.Diffuse.g = 0.0; @@ -423,10 +440,6 @@ static void lighting_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - hr = IDirect3DDevice9_GetTextureStageState(device, 0, D3DTSS_COLOROP, &cop); - ok(hr == D3D_OK, "IDirect3DDevice9_GetTextureStageState returned %08x\n", hr); - hr = IDirect3DDevice9_GetTextureStageState(device, 0, D3DTSS_COLORARG1, &carg); - ok(hr == D3D_OK, "IDirect3DDevice9_GetTextureStageState returned %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState returned %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE | D3DTA_ALPHAREPLICATE); @@ -434,13 +447,8 @@ static void lighting_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); - if(SUCCEEDED(hr)) { - struct vertex lighting_test[] = { - {-1.0, -1.0, 0.1, 0x8000ff00}, - { 1.0, -1.0, 0.1, 0x80000000}, - {-1.0, 1.0, 0.1, 0x8000ff00}, - { 1.0, 1.0, 0.1, 0x80000000} - }; + if (SUCCEEDED(hr)) + { hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr=%08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, lighting_test, sizeof(lighting_test[0])); @@ -454,20 +462,11 @@ static void lighting_test(IDirect3DDevice9 *device) ok(color == 0x00ffffff, "Lit vertex alpha test returned color %08x, expected 0x00ffffff\n", color); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, cop); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState returned %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SPECULARMATERIALSOURCE, D3DMCS_COLOR2); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORWRITEENABLE, old_colorwrite); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, carg); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState returned %08x\n", hr); - hr = IDirect3DDevice9_SetMaterial(device, &old_material); - ok(hr == D3D_OK, "IDirect3DDevice9_SetMaterial returned %08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void clear_test(void) @@ -16766,11 +16765,11 @@ START_TEST(visual) /* Now execute the real tests */ depth_clamp_test(device_ptr); stretchrect_test(device_ptr); - lighting_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + lighting_test(); clear_test(); color_fill_test(); fog_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for clear_test().
by Alexandre Julliard
11 Apr '14
11 Apr '14
Module: wine Branch: master Commit: 32919f40d00ae27b95f9e0c52430f1641fe7afdf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32919f40d00ae27b95f9e0c52…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Apr 11 07:53:18 2014 +0200 d3d9/tests: Use a separate device for clear_test(). --- dlls/d3d9/tests/visual.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 50d563a..cb9a132 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -470,7 +470,7 @@ static void lighting_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetMaterial returned %08x\n", hr); } -static void clear_test(IDirect3DDevice9 *device) +static void clear_test(void) { /* Tests the correctness of clearing parameters */ HRESULT hr; @@ -481,6 +481,20 @@ static void clear_test(IDirect3DDevice9 *device) RECT scissor; DWORD oldColorWrite; BOOL invalid_clear_failed = FALSE; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + HWND window; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); @@ -717,6 +731,12 @@ static void clear_test(IDirect3DDevice9 *device) "Clear with count = 1, rect = NULL has color %08x\n", color); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void color_fill_test(void) @@ -16747,11 +16767,11 @@ START_TEST(visual) depth_clamp_test(device_ptr); stretchrect_test(device_ptr); lighting_test(device_ptr); - clear_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + clear_test(); color_fill_test(); fog_test(); test_cube_wrap();
1
0
0
0
Jacek Caban : mshtml: Ignore &IID_IWebBrowserPriv2IE7 in wb_qi.
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: e3383d1739f0a3ff9ebf1975f2cf6418bf125c2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3383d1739f0a3ff9ebf1975f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 10 17:14:50 2014 +0200 mshtml: Ignore &IID_IWebBrowserPriv2IE7 in wb_qi. --- dlls/mshtml/tests/htmldoc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 313fb78..bad7291 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -4977,6 +4977,7 @@ static IWebBrowser2 WebBrowser2 = { &WebBrowser2Vtbl }; static HRESULT wb_qi(REFIID riid, void **ppv) { + static const IID IID_IWebBrowserPriv2IE7 = {0x1af32b6c, 0xa3ba,0x48b9,{0xb2,0x4e,0x8a,0xa9,0xc4,0x1f,0x6e,0xcd}}; static const IID IID_IWebBrowserPriv2IE8XP = {0x486f6159,0x9f3f,0x4827,{0x82,0xd4,0x28,0x3c,0xef,0x39,0x77,0x33}}; *ppv = NULL; @@ -5006,6 +5007,11 @@ static HRESULT wb_qi(REFIID riid, void **ppv) return S_OK; } + if(IsEqualGUID(riid, &IID_IWebBrowserPriv2IE7)) { + trace("QI(IID_IWebBrowserPriv2IE7)\n"); + return E_NOINTERFACE; + } + if(IsEqualGUID(riid, &IID_IWebBrowserPriv2IE8XP)) { trace("QI(IID_IWebBrowserPriv2IE8XP)\n"); return E_NOINTERFACE;
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
50
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
Results per page:
10
25
50
100
200