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
September 2018
----- 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
670 discussions
Start a n
N
ew thread
Nikolay Sivov : opcservices: Partially implement file-based stream.
by Alexandre Julliard
04 Sep '18
04 Sep '18
Module: wine Branch: master Commit: 07da138e6de4661e7dc7c1f7a8341c1a69b88265 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=07da138e6de4661e7dc7c1f7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 4 08:04:57 2018 +0300 opcservices: Partially implement file-based stream. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opcservices/factory.c | 252 ++++++++++++++++++++++++++++++++++- dlls/opcservices/tests/opcservices.c | 98 ++++++++++++++ 2 files changed, 348 insertions(+), 2 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=07da138e6de4661e7dc7…
1
0
0
0
Nikolay Sivov : opcservices: Implement IOpcPart::GetRelationshipSet().
by Alexandre Julliard
04 Sep '18
04 Sep '18
Module: wine Branch: master Commit: e062281259ca162281afdce7805b76ce03d9aa6a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e062281259ca162281afdce7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 4 08:04:56 2018 +0300 opcservices: Implement IOpcPart::GetRelationshipSet(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opcservices/package.c | 18 ++++++++++++++++-- dlls/opcservices/tests/opcservices.c | 9 +++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index a9b4d14..cd4741d 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -46,6 +46,7 @@ struct opc_part IOpcPartUri *name; WCHAR *content_type; DWORD compression_options; + IOpcRelationshipSet *relationship_set; }; struct opc_part_set @@ -91,6 +92,8 @@ static inline struct opc_relationship *impl_from_IOpcRelationship(IOpcRelationsh return CONTAINING_RECORD(iface, struct opc_relationship, IOpcRelationship_iface); } +static HRESULT opc_relationship_set_create(IOpcRelationshipSet **relationship_set); + static WCHAR *opc_strdupW(const WCHAR *str) { WCHAR *ret = NULL; @@ -143,6 +146,8 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface) if (!refcount) { + if (part->relationship_set) + IOpcRelationshipSet_Release(part->relationship_set); IOpcPartUri_Release(part->name); CoTaskMemFree(part->content_type); heap_free(part); @@ -153,9 +158,18 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface) static HRESULT WINAPI opc_part_GetRelationshipSet(IOpcPart *iface, IOpcRelationshipSet **relationship_set) { - FIXME("iface %p, relationship_set %p stub!\n", iface, relationship_set); + struct opc_part *part = impl_from_IOpcPart(iface); + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, relationship_set %p.\n", iface, relationship_set); + + if (!part->relationship_set && FAILED(hr = opc_relationship_set_create(&part->relationship_set))) + return hr; + + *relationship_set = part->relationship_set; + IOpcRelationshipSet_AddRef(*relationship_set); + + return S_OK; } static HRESULT WINAPI opc_part_GetContentStream(IOpcPart *iface, IStream **stream) diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 118ef8f..8ab7f39 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -74,6 +74,15 @@ static void test_package(void) hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, OPC_COMPRESSION_NONE, &part); ok(SUCCEEDED(hr), "Failed to create a part, hr %#x.\n", hr); + hr = IOpcPart_GetRelationshipSet(part, &relset); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + + hr = IOpcPart_GetRelationshipSet(part, &relset2); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(relset == relset2, "Expected same part set instance.\n"); + IOpcRelationshipSet_Release(relset); + IOpcRelationshipSet_Release(relset2); + ret = FALSE; hr = IOpcPartSet_PartExists(partset, part_uri, &ret); todo_wine {
1
0
0
0
Nikolay Sivov : opcservices: Add IOpcRelationship stub.
by Alexandre Julliard
04 Sep '18
04 Sep '18
Module: wine Branch: master Commit: 42792e2fadca01cefa65a68af79f2ceba31da17a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42792e2fadca01cefa65a68a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 4 08:04:55 2018 +0300 opcservices: Add IOpcRelationship stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opcservices/package.c | 114 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index 09014ff..a9b4d14 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -54,6 +54,12 @@ struct opc_part_set LONG refcount; }; +struct opc_relationship +{ + IOpcRelationship IOpcRelationship_iface; + LONG refcount; +}; + struct opc_relationship_set { IOpcRelationshipSet IOpcRelationshipSet_iface; @@ -80,6 +86,11 @@ static inline struct opc_relationship_set *impl_from_IOpcRelationshipSet(IOpcRel return CONTAINING_RECORD(iface, struct opc_relationship_set, IOpcRelationshipSet_iface); } +static inline struct opc_relationship *impl_from_IOpcRelationship(IOpcRelationship *iface) +{ + return CONTAINING_RECORD(iface, struct opc_relationship, IOpcRelationship_iface); +} + static WCHAR *opc_strdupW(const WCHAR *str) { WCHAR *ret = NULL; @@ -310,6 +321,107 @@ static const IOpcPartSetVtbl opc_part_set_vtbl = opc_part_set_GtEnumerator, }; +static HRESULT WINAPI opc_relationship_QueryInterface(IOpcRelationship *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualIID(iid, &IID_IOpcRelationship) || + IsEqualIID(iid, &IID_IUnknown)) + { + *out = iface; + IOpcRelationship_AddRef(iface); + return S_OK; + } + + WARN("Unsupported interface %s.\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI opc_relationship_AddRef(IOpcRelationship *iface) +{ + struct opc_relationship *relationship = impl_from_IOpcRelationship(iface); + ULONG refcount = InterlockedIncrement(&relationship->refcount); + + TRACE("%p increasing refcount to %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI opc_relationship_Release(IOpcRelationship *iface) +{ + struct opc_relationship *relationship = impl_from_IOpcRelationship(iface); + ULONG refcount = InterlockedDecrement(&relationship->refcount); + + TRACE("%p decreasing refcount to %u.\n", iface, refcount); + + if (!refcount) + heap_free(relationship); + + return refcount; +} + +static HRESULT WINAPI opc_relationship_GetId(IOpcRelationship *iface, WCHAR **id) +{ + FIXME("iface %p, id %p stub!\n", iface, id); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_GetRelationshipType(IOpcRelationship *iface, WCHAR **type) +{ + FIXME("iface %p, type %p stub!\n", iface, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_GetSourceUri(IOpcRelationship *iface, IOpcUri **uri) +{ + FIXME("iface %p, uri %p stub!\n", iface, uri); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_GetTargetUri(IOpcRelationship *iface, IUri **target) +{ + FIXME("iface %p, target %p stub!\n", iface, target); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_GetTargetMode(IOpcRelationship *iface, OPC_URI_TARGET_MODE *target_mode) +{ + FIXME("iface %p, target_mode %p stub!\n", iface, target_mode); + + return E_NOTIMPL; +} + +static const IOpcRelationshipVtbl opc_relationship_vtbl = +{ + opc_relationship_QueryInterface, + opc_relationship_AddRef, + opc_relationship_Release, + opc_relationship_GetId, + opc_relationship_GetRelationshipType, + opc_relationship_GetSourceUri, + opc_relationship_GetTargetUri, + opc_relationship_GetTargetMode, +}; + +static HRESULT opc_relationship_create(IOpcRelationship **out) +{ + struct opc_relationship *relationship; + + if (!(relationship = heap_alloc_zero(sizeof(*relationship)))) + return E_OUTOFMEMORY; + + relationship->IOpcRelationship_iface.lpVtbl = &opc_relationship_vtbl; + relationship->refcount = 1; + + *out = &relationship->IOpcRelationship_iface; + TRACE("Created relationship %p.\n", *out); + return S_OK; +} + static HRESULT WINAPI opc_relationship_set_QueryInterface(IOpcRelationshipSet *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -363,7 +475,7 @@ static HRESULT WINAPI opc_relationship_set_CreateRelationship(IOpcRelationshipSe FIXME("iface %p, id %s, type %s, target_uri %p, target_mode %d, relationship %p stub!\n", iface, debugstr_w(id), debugstr_w(type), target_uri, target_mode, relationship); - return E_NOTIMPL; + return opc_relationship_create(relationship); } static HRESULT WINAPI opc_relationship_set_DeleteRelationship(IOpcRelationshipSet *iface, const WCHAR *id)
1
0
0
0
Nikolay Sivov : opcservices: Add IOpcRelationshipSet stub.
by Alexandre Julliard
04 Sep '18
04 Sep '18
Module: wine Branch: master Commit: bde0de68fc7b95cb7ebfd266a3c6d7268fb52868 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bde0de68fc7b95cb7ebfd266…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 4 08:04:54 2018 +0300 opcservices: Add IOpcRelationshipSet stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opcservices/package.c | 150 ++++++++++++++++++++++++++++++++++- dlls/opcservices/tests/opcservices.c | 11 +++ 2 files changed, 158 insertions(+), 3 deletions(-) diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index e673f0c..09014ff 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -35,6 +35,7 @@ struct opc_package LONG refcount; IOpcPartSet *part_set; + IOpcRelationshipSet *relationship_set; }; struct opc_part @@ -53,6 +54,12 @@ struct opc_part_set LONG refcount; }; +struct opc_relationship_set +{ + IOpcRelationshipSet IOpcRelationshipSet_iface; + LONG refcount; +}; + static inline struct opc_package *impl_from_IOpcPackage(IOpcPackage *iface) { return CONTAINING_RECORD(iface, struct opc_package, IOpcPackage_iface); @@ -68,6 +75,11 @@ static inline struct opc_part *impl_from_IOpcPart(IOpcPart *iface) return CONTAINING_RECORD(iface, struct opc_part, IOpcPart_iface); } +static inline struct opc_relationship_set *impl_from_IOpcRelationshipSet(IOpcRelationshipSet *iface) +{ + return CONTAINING_RECORD(iface, struct opc_relationship_set, IOpcRelationshipSet_iface); +} + static WCHAR *opc_strdupW(const WCHAR *str) { WCHAR *ret = NULL; @@ -85,7 +97,6 @@ static WCHAR *opc_strdupW(const WCHAR *str) return ret; } - static HRESULT WINAPI opc_part_QueryInterface(IOpcPart *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -299,6 +310,128 @@ static const IOpcPartSetVtbl opc_part_set_vtbl = opc_part_set_GtEnumerator, }; +static HRESULT WINAPI opc_relationship_set_QueryInterface(IOpcRelationshipSet *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualIID(iid, &IID_IOpcRelationshipSet) || + IsEqualIID(iid, &IID_IUnknown)) + { + *out = iface; + IOpcRelationshipSet_AddRef(iface); + return S_OK; + } + + WARN("Unsupported interface %s.\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI opc_relationship_set_AddRef(IOpcRelationshipSet *iface) +{ + struct opc_relationship_set *relationship_set = impl_from_IOpcRelationshipSet(iface); + ULONG refcount = InterlockedIncrement(&relationship_set->refcount); + + TRACE("%p increasing refcount to %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI opc_relationship_set_Release(IOpcRelationshipSet *iface) +{ + struct opc_relationship_set *relationship_set = impl_from_IOpcRelationshipSet(iface); + ULONG refcount = InterlockedDecrement(&relationship_set->refcount); + + TRACE("%p decreasing refcount to %u.\n", iface, refcount); + + if (!refcount) + heap_free(relationship_set); + + return refcount; +} + +static HRESULT WINAPI opc_relationship_set_GetRelationship(IOpcRelationshipSet *iface, const WCHAR *id, + IOpcRelationship **relationship) +{ + FIXME("iface %p, id %s, relationship %p stub!\n", iface, debugstr_w(id), relationship); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_CreateRelationship(IOpcRelationshipSet *iface, const WCHAR *id, + const WCHAR *type, IUri *target_uri, OPC_URI_TARGET_MODE target_mode, IOpcRelationship **relationship) +{ + FIXME("iface %p, id %s, type %s, target_uri %p, target_mode %d, relationship %p stub!\n", iface, debugstr_w(id), + debugstr_w(type), target_uri, target_mode, relationship); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_DeleteRelationship(IOpcRelationshipSet *iface, const WCHAR *id) +{ + FIXME("iface %p, id %s stub!\n", iface, debugstr_w(id)); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_RelationshipExists(IOpcRelationshipSet *iface, const WCHAR *id, BOOL *exists) +{ + FIXME("iface %p, id %s, exists %p stub!\n", iface, debugstr_w(id), exists); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_GetEnumerator(IOpcRelationshipSet *iface, + IOpcRelationshipEnumerator **enumerator) +{ + FIXME("iface %p, enumerator %p stub!\n", iface, enumerator); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_GetEnumeratorForType(IOpcRelationshipSet *iface, const WCHAR *type, + IOpcRelationshipEnumerator **enumerator) +{ + FIXME("iface %p, type %s, enumerator %p stub!\n", iface, debugstr_w(type), enumerator); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_relationship_set_GetRelationshipsContentStream(IOpcRelationshipSet *iface, IStream **stream) +{ + FIXME("iface %p, stream %p stub!\n", iface, stream); + + return E_NOTIMPL; +} + +static const IOpcRelationshipSetVtbl opc_relationship_set_vtbl = +{ + opc_relationship_set_QueryInterface, + opc_relationship_set_AddRef, + opc_relationship_set_Release, + opc_relationship_set_GetRelationship, + opc_relationship_set_CreateRelationship, + opc_relationship_set_DeleteRelationship, + opc_relationship_set_RelationshipExists, + opc_relationship_set_GetEnumerator, + opc_relationship_set_GetEnumeratorForType, + opc_relationship_set_GetRelationshipsContentStream, +}; + +static HRESULT opc_relationship_set_create(IOpcRelationshipSet **out) +{ + struct opc_relationship_set *relationship_set; + + if (!(relationship_set = heap_alloc_zero(sizeof(*relationship_set)))) + return E_OUTOFMEMORY; + + relationship_set->IOpcRelationshipSet_iface.lpVtbl = &opc_relationship_set_vtbl; + relationship_set->refcount = 1; + + *out = &relationship_set->IOpcRelationshipSet_iface; + TRACE("Created relationship set %p.\n", *out); + return S_OK; +} + static HRESULT WINAPI opc_package_QueryInterface(IOpcPackage *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -336,6 +469,8 @@ static ULONG WINAPI opc_package_Release(IOpcPackage *iface) { if (package->part_set) IOpcPartSet_Release(package->part_set); + if (package->relationship_set) + IOpcRelationshipSet_Release(package->relationship_set); heap_free(package); } @@ -368,9 +503,18 @@ static HRESULT WINAPI opc_package_GetPartSet(IOpcPackage *iface, IOpcPartSet **p static HRESULT WINAPI opc_package_GetRelationshipSet(IOpcPackage *iface, IOpcRelationshipSet **relationship_set) { - FIXME("iface %p, relationship_set %p stub!\n", iface, relationship_set); + struct opc_package *package = impl_from_IOpcPackage(iface); + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, relationship_set %p.\n", iface, relationship_set); + + if (!package->relationship_set && FAILED(hr = opc_relationship_set_create(&package->relationship_set))) + return hr; + + *relationship_set = package->relationship_set; + IOpcRelationshipSet_AddRef(*relationship_set); + + return S_OK; } static const IOpcPackageVtbl opc_package_vtbl = diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 9ef44e6..118ef8f 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -38,6 +38,7 @@ static void test_package(void) { static const WCHAR typeW[] = {'t','y','p','e','/','s','u','b','t','y','p','e',0}; static const WCHAR uriW[] = {'/','u','r','i',0}; + IOpcRelationshipSet *relset, *relset2; IOpcPartSet *partset, *partset2; IOpcPartUri *part_uri; IOpcFactory *factory; @@ -82,6 +83,16 @@ todo_wine { IOpcPartUri_Release(part_uri); IOpcPart_Release(part); + /* Relationships */ + hr = IOpcPackage_GetRelationshipSet(package, &relset); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + + hr = IOpcPackage_GetRelationshipSet(package, &relset2); + ok(SUCCEEDED(hr), "Failed to get relationship set, hr %#x.\n", hr); + ok(relset == relset2, "Expected same part set instance.\n"); + IOpcRelationshipSet_Release(relset); + IOpcRelationshipSet_Release(relset2); + IOpcPackage_Release(package); IOpcFactory_Release(factory);
1
0
0
0
Nikolay Sivov : opcservices: Store part properties on creation.
by Alexandre Julliard
04 Sep '18
04 Sep '18
Module: wine Branch: master Commit: 3f459d9c93c1c5c29d8a3edf198baab99c4ad786 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f459d9c93c1c5c29d8a3edf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 4 08:04:53 2018 +0300 opcservices: Store part properties on creation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opcservices/Makefile.in | 2 +- dlls/opcservices/package.c | 61 +++++++++++++++++++++++++++++++----- dlls/opcservices/tests/opcservices.c | 24 ++++++++++++++ 3 files changed, 79 insertions(+), 8 deletions(-) diff --git a/dlls/opcservices/Makefile.in b/dlls/opcservices/Makefile.in index 651cb41..47fbbe4 100644 --- a/dlls/opcservices/Makefile.in +++ b/dlls/opcservices/Makefile.in @@ -1,5 +1,5 @@ MODULE = opcservices.dll -IMPORTS = uuid +IMPORTS = uuid ole32 C_SRCS = \ factory.c \ diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index a3a2fab..e673f0c 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -23,6 +23,7 @@ #include "winbase.h" #include "wine/debug.h" +#include "wine/unicode.h" #include "opc_private.h" @@ -40,6 +41,10 @@ struct opc_part { IOpcPart IOpcPart_iface; LONG refcount; + + IOpcPartUri *name; + WCHAR *content_type; + DWORD compression_options; }; struct opc_part_set @@ -63,6 +68,24 @@ static inline struct opc_part *impl_from_IOpcPart(IOpcPart *iface) return CONTAINING_RECORD(iface, struct opc_part, IOpcPart_iface); } +static WCHAR *opc_strdupW(const WCHAR *str) +{ + WCHAR *ret = NULL; + + if (str) + { + size_t size; + + size = (strlenW(str) + 1) * sizeof(WCHAR); + ret = CoTaskMemAlloc(size); + if (ret) + memcpy(ret, str, size); + } + + return ret; +} + + static HRESULT WINAPI opc_part_QueryInterface(IOpcPart *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -97,7 +120,11 @@ static ULONG WINAPI opc_part_Release(IOpcPart *iface) TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) + { + IOpcPartUri_Release(part->name); + CoTaskMemFree(part->content_type); heap_free(part); + } return refcount; } @@ -118,16 +145,24 @@ static HRESULT WINAPI opc_part_GetContentStream(IOpcPart *iface, IStream **strea static HRESULT WINAPI opc_part_GetName(IOpcPart *iface, IOpcPartUri **name) { - FIXME("iface %p, name %p stub!\n", iface, name); + struct opc_part *part = impl_from_IOpcPart(iface); - return E_NOTIMPL; + TRACE("iface %p, name %p.\n", iface, name); + + *name = part->name; + IOpcPartUri_AddRef(*name); + + return S_OK; } static HRESULT WINAPI opc_part_GetContentType(IOpcPart *iface, LPWSTR *type) { - FIXME("iface %p, type %p stub!\n", iface, type); + struct opc_part *part = impl_from_IOpcPart(iface); - return E_NOTIMPL; + TRACE("iface %p, type %p.\n", iface, type); + + *type = opc_strdupW(part->content_type); + return *type ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI opc_part_GetCompressionOptions(IOpcPart *iface, OPC_COMPRESSION_OPTIONS *options) @@ -149,15 +184,27 @@ static const IOpcPartVtbl opc_part_vtbl = opc_part_GetCompressionOptions, }; -static HRESULT opc_part_create(IOpcPart **out) +static HRESULT opc_part_create(IOpcPartUri *name, const WCHAR *content_type, + DWORD compression_options, IOpcPart **out) { struct opc_part *part; + if (!name) + return E_POINTER; + if (!(part = heap_alloc_zero(sizeof(*part)))) return E_OUTOFMEMORY; part->IOpcPart_iface.lpVtbl = &opc_part_vtbl; part->refcount = 1; + part->name = name; + IOpcPartUri_AddRef(name); + part->compression_options = compression_options; + if (!(part->content_type = opc_strdupW(content_type))) + { + IOpcPart_Release(&part->IOpcPart_iface); + return E_OUTOFMEMORY; + } *out = &part->IOpcPart_iface; TRACE("Created part %p.\n", *out); @@ -213,10 +260,10 @@ static HRESULT WINAPI opc_part_set_GetPart(IOpcPartSet *iface, IOpcPartUri *name static HRESULT WINAPI opc_part_set_CreatePart(IOpcPartSet *iface, IOpcPartUri *name, LPCWSTR content_type, OPC_COMPRESSION_OPTIONS compression_options, IOpcPart **part) { - FIXME("iface %p, name %p, content_type %s, compression_options %#x, part %p stub!\n", iface, name, + TRACE("iface %p, name %p, content_type %s, compression_options %#x, part %p.\n", iface, name, debugstr_w(content_type), compression_options, part); - return opc_part_create(part); + return opc_part_create(name, content_type, compression_options, part); } static HRESULT WINAPI opc_part_set_DeletePart(IOpcPartSet *iface, IOpcPartUri *name) diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index e257c6e..9ef44e6 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -36,10 +36,15 @@ static IOpcFactory *create_factory(void) static void test_package(void) { + static const WCHAR typeW[] = {'t','y','p','e','/','s','u','b','t','y','p','e',0}; + static const WCHAR uriW[] = {'/','u','r','i',0}; IOpcPartSet *partset, *partset2; + IOpcPartUri *part_uri; IOpcFactory *factory; IOpcPackage *package; + IOpcPart *part; HRESULT hr; + BOOL ret; factory = create_factory(); @@ -58,6 +63,25 @@ static void test_package(void) ok(SUCCEEDED(hr), "Failed to create a part set, hr %#x.\n", hr); ok(partset == partset2, "Expected same part set instance.\n"); + /* CreatePart */ + hr = IOpcFactory_CreatePartUri(factory, uriW, &part_uri); + ok(SUCCEEDED(hr), "Failed to create part uri, hr %#x.\n", hr); + + hr = IOpcPartSet_CreatePart(partset, NULL, typeW, OPC_COMPRESSION_NONE, &part); + ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + + hr = IOpcPartSet_CreatePart(partset, part_uri, typeW, OPC_COMPRESSION_NONE, &part); + ok(SUCCEEDED(hr), "Failed to create a part, hr %#x.\n", hr); + + ret = FALSE; + hr = IOpcPartSet_PartExists(partset, part_uri, &ret); +todo_wine { + ok(SUCCEEDED(hr), "Unexpected hr %#x.\n", hr); + ok(ret, "Expected part to exist.\n"); +} + IOpcPartUri_Release(part_uri); + IOpcPart_Release(part); + IOpcPackage_Release(package); IOpcFactory_Release(factory);
1
0
0
0
Qian Hong : kernel32: Fallback to default comspec when %COMSPEC% is not set.
by Alexandre Julliard
03 Sep '18
03 Sep '18
Module: wine Branch: master Commit: 279ac253e5aa7132ec4960af175115befcdfefd0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=279ac253e5aa7132ec4960af…
Author: Qian Hong <qhong(a)codeweavers.com> Date: Fri Aug 31 01:09:32 2018 +0000 kernel32: Fallback to default comspec when %COMSPEC% is not set. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=19801
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 6 +++++- programs/cmd/wcmdmain.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 7ac7477..85e0042 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -2206,6 +2206,7 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L { static const WCHAR comspecW[] = {'C','O','M','S','P','E','C',0}; + static const WCHAR cmdW[] = {'\\','c','m','d','.','e','x','e',0}; static const WCHAR slashscW[] = {' ','/','s','/','c',' ',0}; static const WCHAR quotW[] = {'"',0}; WCHAR comspec[MAX_PATH]; @@ -2213,7 +2214,10 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L BOOL ret; if (!GetEnvironmentVariableW( comspecW, comspec, ARRAY_SIZE( comspec ))) - return FALSE; + { + GetSystemDirectoryW( comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR) ); + strcatW( comspec, cmdW ); + } if (!(newcmdline = HeapAlloc( GetProcessHeap(), 0, (strlenW(comspec) + 7 + strlenW(cmd_line) + 2) * sizeof(WCHAR)))) return FALSE; diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index cceb588..c8a41d3 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -2403,10 +2403,20 @@ int wmain (int argc, WCHAR *argvW[]) static const WCHAR offW[] = {'O','F','F','\0'}; static const WCHAR promptW[] = {'P','R','O','M','P','T','\0'}; static const WCHAR defaultpromptW[] = {'$','P','$','G','\0'}; + static const WCHAR comspecW[] = {'C','O','M','S','P','E','C',0}; + static const WCHAR cmdW[] = {'\\','c','m','d','.','e','x','e',0}; + WCHAR comspec[MAX_PATH]; CMD_LIST *toExecute = NULL; /* Commands left to be executed */ OSVERSIONINFOW osv; char osver[50]; + if (!GetEnvironmentVariableW(comspecW, comspec, sizeof(comspec)/sizeof(WCHAR))) + { + GetSystemDirectoryW(comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR)); + strcatW(comspec, cmdW); + SetEnvironmentVariableW(comspecW, comspec); + } + srand(time(NULL)); /* Get the windows version being emulated */
1
0
0
0
Thomas Faller : cmd: Don't print an empty line if no command was executed.
by Alexandre Julliard
03 Sep '18
03 Sep '18
Module: wine Branch: master Commit: 731d7b30dd6c1224a79afc530cd07342d9b26365 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=731d7b30dd6c1224a79afc53…
Author: Thomas Faller <tfaller1(a)gmx.de> Date: Sun Sep 2 00:11:23 2018 +0200 cmd: Don't print an empty line if no command was executed. Signed-off-by: Thomas Faller <tfaller1(a)gmx.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/cmd/wcmdmain.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 7a7ee16..cceb588 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -335,7 +335,7 @@ void WCMD_print_error (void) { * */ -static void WCMD_show_prompt (void) { +static void WCMD_show_prompt (BOOL newLine) { int status; WCHAR out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH]; @@ -350,8 +350,10 @@ static void WCMD_show_prompt (void) { } p = prompt_string; q = out_string; - *q++ = '\r'; - *q++ = '\n'; + if (newLine) { + *q++ = '\r'; + *q++ = '\n'; + } *q = '\0'; while (*p != '\0') { if (*p != '$') { @@ -1886,7 +1888,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE const DWORD len = ARRAY_SIZE(echoDot); DWORD curr_size = strlenW(curPos); DWORD min_len = (curr_size < len ? curr_size : len); - WCMD_show_prompt(); + WCMD_show_prompt(TRUE); WCMD_output_asis(curPos); /* I don't know why Windows puts a space here but it does */ /* Except for lines starting with 'echo.', 'echo:' or 'echo/'. Ask MS why */ @@ -2395,6 +2397,7 @@ int wmain (int argc, WCHAR *argvW[]) WCHAR *argPos = NULL; WCHAR string[1024]; WCHAR envvar[4]; + BOOL promptNewLine = TRUE; BOOL opt_q; int opt_t = 0; static const WCHAR offW[] = {'O','F','F','\0'}; @@ -2749,11 +2752,12 @@ int wmain (int argc, WCHAR *argvW[]) /* Read until EOF (which for std input is never, but if redirect in place, may occur */ - if (echo_mode) WCMD_show_prompt(); + if (echo_mode) WCMD_show_prompt(promptNewLine); if (!WCMD_ReadAndParseLine(NULL, &toExecute, GetStdHandle(STD_INPUT_HANDLE))) break; WCMD_process_commands(toExecute, FALSE, FALSE); WCMD_free_commands(toExecute); + promptNewLine = !!toExecute; toExecute = NULL; } return 0;
1
0
0
0
Nikolay Sivov : dxgi: Implement Map()/Unmap().
by Alexandre Julliard
03 Sep '18
03 Sep '18
Module: wine Branch: master Commit: 58f3dc4becbb4afcb9b4ccc95ae635b59c9956e9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58f3dc4becbb4afcb9b4ccc9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 3 19:45:37 2018 +0300 dxgi: Implement Map()/Unmap(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dxgi/surface.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/dlls/dxgi/surface.c b/dlls/dxgi/surface.c index 1f53b25..4b1b83b 100644 --- a/dlls/dxgi/surface.c +++ b/dlls/dxgi/surface.c @@ -182,16 +182,43 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDesc(IDXGISurface1 *iface, DXGI static HRESULT STDMETHODCALLTYPE dxgi_surface_Map(IDXGISurface1 *iface, DXGI_MAPPED_RECT *mapped_rect, UINT flags) { - FIXME("iface %p, mapped_rect %p, flags %#x stub!\n", iface, mapped_rect, flags); + struct dxgi_surface *surface = impl_from_IDXGISurface1(iface); + struct wined3d_map_desc wined3d_map_desc; + DWORD wined3d_map_flags = 0; + HRESULT hr; + + TRACE("iface %p, mapped_rect %p, flags %#x.\n", iface, mapped_rect, flags); + + if (flags & DXGI_MAP_READ) + wined3d_map_flags |= WINED3D_MAP_READ; + if (flags & DXGI_MAP_WRITE) + wined3d_map_flags |= WINED3D_MAP_WRITE; + if (flags & DXGI_MAP_DISCARD) + wined3d_map_flags |= WINED3D_MAP_DISCARD; + + wined3d_mutex_lock(); + if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), 0, + &wined3d_map_desc, NULL, wined3d_map_flags))) + { + mapped_rect->Pitch = wined3d_map_desc.row_pitch; + mapped_rect->pBits = wined3d_map_desc.data; + } + wined3d_mutex_unlock(); - return E_NOTIMPL; + return hr; } static HRESULT STDMETHODCALLTYPE dxgi_surface_Unmap(IDXGISurface1 *iface) { - FIXME("iface %p stub!\n", iface); + struct dxgi_surface *surface = impl_from_IDXGISurface1(iface); + + TRACE("iface %p.\n", iface); - return E_NOTIMPL; + wined3d_mutex_lock(); + wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), 0); + wined3d_mutex_unlock(); + + return S_OK; } /* IDXGISurface1 methods */
1
0
0
0
Andrew Wesie : wined3d: Use raw blit for supported depth-stencil blits.
by Alexandre Julliard
03 Sep '18
03 Sep '18
Module: wine Branch: master Commit: c3af72019ef1141610d2116d66e3fb7591832557 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3af72019ef1141610d2116d…
Author: Andrew Wesie <awesie(a)gmail.com> Date: Sat Sep 1 18:31:37 2018 -0500 wined3d: Use raw blit for supported depth-stencil blits. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45747
Signed-off-by: Andrew Wesie <awesie(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a297d55..d1847be 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3406,9 +3406,13 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_ else dst_location = dst_texture->resource.map_binding; + if ((flags & WINED3D_BLT_RAW) || (!scale && !convert && !resolve)) + blit_op = WINED3D_BLIT_OP_RAW_BLIT; + else + blit_op = WINED3D_BLIT_OP_DEPTH_BLIT; + context = context_acquire(device, dst_texture, dst_sub_resource_idx); - valid_locations = device->blitter->ops->blitter_blit(device->blitter, - WINED3D_BLIT_OP_DEPTH_BLIT, context, + valid_locations = device->blitter->ops->blitter_blit(device->blitter, blit_op, context, src_texture, src_sub_resource_idx, src_texture->resource.draw_binding, &src_rect, dst_texture, dst_sub_resource_idx, dst_location, &dst_rect, NULL, filter); context_release(context);
1
0
0
0
Brock York : kernel32/tests: Improve ReplaceFileW error checking.
by Alexandre Julliard
03 Sep '18
03 Sep '18
Module: wine Branch: master Commit: 324e0d2e9f88d06d671051b438984cf77b508b2d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=324e0d2e9f88d06d671051b4…
Author: Brock York <twunknown(a)gmail.com> Date: Mon Sep 3 20:15:19 2018 +1000 kernel32/tests: Improve ReplaceFileW error checking. Signed-off-by: Brock York <twunknown(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 2e2c55b..33cae4b 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -3666,7 +3666,7 @@ static void test_ReplaceFileA(void) */ SetLastError(0xdeadbeef); ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret != ERROR_UNABLE_TO_REMOVE_REPLACED, "ReplaceFileA: unexpected error %d\n", GetLastError()); + todo_wine ok(ret == 0 && GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %d\n", GetLastError()); /* make sure that the replacement file still exists */ hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hReplacementFile != INVALID_HANDLE_VALUE ||
1
0
0
0
← Newer
1
...
63
64
65
66
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200