Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2018
- 70 participants
- 1549 messages
[PATCH 2/6] opcservices: Add IOpcRelationshipSet stub.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
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 e673f0c892..09014ffc82 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 9ef44e6cc3..118ef8f0a4 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);
--
2.18.0
Sept. 4, 2018
[PATCH 1/6] opcservices: Store part properties on creation.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
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 651cb411d7..47fbbe4cca 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 a3a2fabce7..e673f0c892 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 e257c6ea2c..9ef44e6cc3 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);
--
2.18.0
Sept. 4, 2018
Re: [PATCH] ws2_32/tests: Mark the IPX-not-supported error code test as todo
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=41520
Your paranoid android.
=== w2008s64 (32 bit Windows report) ===
ws2_32:
0870:sock: unhandled exception c0000005 at 00000000
Sept. 4, 2018
[PATCH] ws2_32/tests: Mark the IPX-not-supported error code test as todo
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
Wine returns WSAEPROTONOSUPPORT in this case, but all versions of
Windows since XP at least return WSAEAFNOSUPPORT.
This fixes the test failure on my Arch laptop, and should fix the test
failures on Gentoo.
---
dlls/ws2_32/tests/sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index b32d1c053d..c058869059 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2773,6 +2773,7 @@ static void test_WSASocket(void)
if (sock == INVALID_SOCKET)
{
err = WSAGetLastError();
+todo_wine
ok(err == WSAEAFNOSUPPORT || broken(err == WSAEPROTONOSUPPORT), "Expected 10047, received %d\n", err);
skip("IPX is not supported\n");
}
--
2.18.0
Sept. 4, 2018
[PATCH] opengl/tests: Don't run Pbuffer tests if no Pbuffer can be created
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
This should fix the test failures on Debian.
---
dlls/opengl32/tests/opengl.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index b69d91caf9..8105201a79 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -194,17 +194,18 @@ static void test_pbuffers(HDC hdc)
{
HDC pbuffer_hdc;
HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL);
- if(!pbuffer)
- skip("Pbuffer creation failed!\n");
-
- /* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */
- pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
- res = GetPixelFormat(pbuffer_hdc);
-
- ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat);
- trace("iPixelFormat returned by GetPixelFormat: %d\n", res);
- trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat);
- pwglReleasePbufferDCARB(pbuffer, hdc);
+ if(pbuffer)
+ {
+ /* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */
+ pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
+ res = GetPixelFormat(pbuffer_hdc);
+
+ ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat);
+ trace("iPixelFormat returned by GetPixelFormat: %d\n", res);
+ trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat);
+ pwglReleasePbufferDCARB(pbuffer, hdc);
+ }
+ else skip("Pbuffer creation failed!\n");
}
else skip("Pbuffer test for offscreen pixelformat skipped as no offscreen-only format with pbuffer capabilities has been found\n");
}
--
2.18.0
Sept. 4, 2018
[PATCH] gdiplus/tests: Don't fail if fonts are missing
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
This should fix the test failures on Debian.
---
dlls/gdiplus/tests/font.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 961d8459cb..bbddcce345 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -430,28 +430,34 @@ static void test_getgenerics (void)
int missingfonts = 0;
stat = GdipGetGenericFontFamilySansSerif(&family);
- expect (Ok, stat);
if (stat == FontFamilyNotFound)
missingfonts = 1;
else
+ {
+ expect(Ok, stat);
check_family("Sans Serif", family, sansname);
+ }
stat = GdipGetGenericFontFamilySerif(&family);
- expect (Ok, stat);
if (stat == FontFamilyNotFound)
missingfonts = 1;
else
+ {
+ expect(Ok, stat);
check_family("Serif", family, serifname);
+ }
stat = GdipGetGenericFontFamilyMonospace(&family);
- expect (Ok, stat);
if (stat == FontFamilyNotFound)
missingfonts = 1;
else
+ {
+ expect(Ok, stat);
check_family("Monospace", family, mononame);
+ }
- if (missingfonts && strcmp(winetest_platform, "wine") == 0)
- trace("You may need to install either the Microsoft Web Fonts or the Liberation Fonts\n");
+ if (missingfonts)
+ skip("You may need to install either the Microsoft Web Fonts or the Liberation Fonts\n");
/* Check that the family names are all different */
ok(lstrcmpiW(sansname, serifname) != 0, "Sans Serif and Serif families should be different: %s\n", wine_dbgstr_w(sansname));
--
2.18.0
Sept. 4, 2018
[PATCH resend3] shell32/tests: Mark a shell dispatch test as todo on x64 and ARM
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/shell32/tests/shelldispatch.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c
index 5191d5e970..0d38cd02d7 100644
--- a/dlls/shell32/tests/shelldispatch.c
+++ b/dlls/shell32/tests/shelldispatch.c
@@ -1025,6 +1025,9 @@ static void test_ShellWindows(void)
hr = CoCreateInstance(&CLSID_ShellWindows, NULL, CLSCTX_LOCAL_SERVER,
&IID_IShellWindows, (void**)&shellwindows);
+#ifndef __i386__
+todo_wine
+#endif
ok(hr == S_OK, "got 0x%08x\n", hr);
/* TODO: remove when explorer startup with clean prefix is fixed */
if (hr != S_OK)
--
2.18.0
Sept. 4, 2018
Re: Possible to call winlib function from native program ?
by Stefan Dösinger
> Am 30.08.2018 um 23:56 schrieb Wilma Feuerstein <officedev(a)gmx.ch>:
>
> I'll have to think about whether it might be easer ripping the respective code out of wine.
You can try, but my guess is that you'll run into calls to lower-level Wine functions that will cause you the same pain as dlopen does.
> Writing a socket server for ~100 APIs with byref-arguments, with C and Windows-size datatypes on one side, and C# on Linux on the other, where the C# code runs inside a web-server, seems like a daunting task that might be more complex than writing a basic web server.
You don't necessarily have to marshall the Win32 API. Do you have any internal APIs in your software (e.g. between your host process and a plugin) that is smaller?
> Is it not somehow possible to load the wine-server process inside the libtest.dll.so-constructor ?
> #define LINUX_ATTACH_DLL __attribute__((constructor))
> whether that server process would be started inside the same process or outside wouldn't matter much.
I don't know for sure. You could read through Wine's init code in loader/main.c, libwine and ntdll and see if you can reconstruct it elsewhere. It is certainly not a simple task.
> If I had to manually dlopen the dependencies between crypt32.dll, user32.dll, advapi32.dll and bcrypt.dll - and whatever - in the right order, that's something I could live with.
The problem isn't just loading the libraries, you also have to resolve the imports. You might be able to dlopen ntdll.dll and then use LdrLoadDll to load the higher level DLLs.
But just looking at the first lines of LdrLoadDll brings up a call to NtCurrentTeb(), which will return NULL unless you also call the right ntdll init code.
Sept. 4, 2018
Re: [PATCH 2/2] msi: Skip publishing a local assembly with no corresponding file.
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=41515
Your paranoid android.
=== w7u (32 bit Windows report) ===
msi:
action: Timeout
Sept. 4, 2018
[PATCH] ddraw: Accept d3d1 and d3d2 versions of D3DFINDDEVICERESULT in IDirect3D_FindDevice.
by Alistair Leslie-Hughes
From: Michael Müller <michael(a)fds-team.de>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/ddraw/ddraw.c | 24 +++++++++++++++++++----
dlls/ddraw/tests/d3d.c | 14 ++++++++++++++
include/d3dcaps.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index e60c5f3..f62464c 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4045,8 +4045,8 @@ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fd
if (!fds || !fdr) return DDERR_INVALIDPARAMS;
- if (fds->dwSize != sizeof(D3DFINDDEVICESEARCH)
- || fdr->dwSize != sizeof(D3DFINDDEVICERESULT))
+ if (fds->dwSize != sizeof(D3DFINDDEVICESEARCH) || (fdr->dwSize != sizeof(D3DFINDDEVICERESULT1) &&
+ fdr->dwSize != sizeof(D3DFINDDEVICERESULT2) && fdr->dwSize != sizeof(D3DFINDDEVICERESULT)))
return DDERR_INVALIDPARAMS;
if ((fds->dwFlags & D3DFDS_COLORMODEL)
@@ -4075,8 +4075,24 @@ static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fd
/* Now return our own GUID */
ddraw_d3dcaps1_from_7(&desc1, &desc7);
fdr->guid = IID_D3DDEVICE_WineD3D;
- fdr->ddHwDesc = desc1;
- fdr->ddSwDesc = desc1;
+
+ if (fdr->dwSize == sizeof(D3DFINDDEVICERESULT1))
+ {
+ D3DFINDDEVICERESULT1 *fdr1 = (D3DFINDDEVICERESULT1 *)fdr;
+ memcpy(&fdr1->ddHwDesc, &desc1, sizeof(fdr1->ddHwDesc));
+ memcpy(&fdr1->ddSwDesc, &desc1, sizeof(fdr1->ddSwDesc));
+ }
+ else if (fdr->dwSize == sizeof(D3DFINDDEVICERESULT2))
+ {
+ D3DFINDDEVICERESULT2 *fdr2 = (D3DFINDDEVICERESULT2 *)fdr;
+ memcpy(&fdr2->ddHwDesc, &desc1, sizeof(fdr2->ddHwDesc));
+ memcpy(&fdr2->ddSwDesc, &desc1, sizeof(fdr2->ddSwDesc));
+ }
+ else
+ {
+ fdr->ddHwDesc = desc1;
+ fdr->ddSwDesc = desc1;
+ }
TRACE("Returning Wine's wined3d device with (undumped) capabilities.\n");
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index ec0f8d7..8ecb2f8 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -1631,6 +1631,8 @@ static void FindDevice(void)
D3DFINDDEVICESEARCH search = {0};
D3DFINDDEVICERESULT result = {0};
+ D3DFINDDEVICERESULT1 result1 = {0};
+ D3DFINDDEVICERESULT2 result2 = {0};
IDirect3DDevice *d3dhal;
HRESULT hr;
int i;
@@ -1671,6 +1673,18 @@ static void FindDevice(void)
ok(hr == D3D_OK,
"Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x\n", hr);
+ result1.dwSize = sizeof(result1);
+
+ hr = IDirect3D_FindDevice(Direct3D1, &search, (D3DFINDDEVICERESULT *)&result1);
+ ok(hr == D3D_OK,
+ "Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x\n", hr);
+
+ result2.dwSize = sizeof(result2);
+
+ hr = IDirect3D_FindDevice(Direct3D1, &search, (D3DFINDDEVICERESULT *)&result2);
+ ok(hr == D3D_OK,
+ "Expected IDirect3D1::FindDevice to return D3D_OK, got 0x%08x\n", hr);
+
/* Try an arbitrary non-device GUID. */
search.dwSize = sizeof(search);
search.dwFlags = D3DFDS_GUID;
diff --git a/include/d3dcaps.h b/include/d3dcaps.h
index 4fc76ba..51e3efa 100644
--- a/include/d3dcaps.h
+++ b/include/d3dcaps.h
@@ -193,6 +193,44 @@ typedef struct _D3dPrimCaps {
#define D3DPTADDRESSCAPS_BORDER 0x00000008
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
+typedef struct _D3DDeviceDesc1 {
+ DWORD dwSize;
+ DWORD dwFlags;
+ D3DCOLORMODEL dcmColorModel;
+ DWORD dwDevCaps;
+ D3DTRANSFORMCAPS dtcTransformCaps;
+ BOOL bClipping;
+ D3DLIGHTINGCAPS dlcLightingCaps;
+ D3DPRIMCAPS dpcLineCaps;
+ D3DPRIMCAPS dpcTriCaps;
+ DWORD dwDeviceRenderBitDepth;
+ DWORD dwDeviceZBufferBitDepth;
+ DWORD dwMaxBufferSize;
+ DWORD dwMaxVertexCount;
+} D3DDEVICEDESC1,*LPD3DDEVICEDESC1;
+#define D3DDEVICEDESCSIZE1 (sizeof(D3DDEVICEDESC1))
+
+typedef struct _D3DDeviceDesc2 {
+ DWORD dwSize;
+ DWORD dwFlags;
+ D3DCOLORMODEL dcmColorModel;
+ DWORD dwDevCaps;
+ D3DTRANSFORMCAPS dtcTransformCaps;
+ BOOL bClipping;
+ D3DLIGHTINGCAPS dlcLightingCaps;
+ D3DPRIMCAPS dpcLineCaps;
+ D3DPRIMCAPS dpcTriCaps;
+ DWORD dwDeviceRenderBitDepth;
+ DWORD dwDeviceZBufferBitDepth;
+ DWORD dwMaxBufferSize;
+ DWORD dwMaxVertexCount;
+
+ DWORD dwMinTextureWidth,dwMinTextureHeight;
+ DWORD dwMaxTextureWidth,dwMaxTextureHeight;
+ DWORD dwMinStippleWidth,dwMaxStippleWidth;
+ DWORD dwMinStippleHeight,dwMaxStippleHeight;
+} D3DDEVICEDESC2,*LPD3DDEVICEDESC2;
+#define D3DDEVICEDESCSIZE2 (sizeof(D3DDEVICEDESC2))
typedef struct _D3DDeviceDesc {
DWORD dwSize;
@@ -382,6 +420,20 @@ typedef struct _D3DFINDDEVICESEARCH {
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH;
+typedef struct _D3DFINDDEVICERESULT1 {
+ DWORD dwSize;
+ GUID guid;
+ D3DDEVICEDESC1 ddHwDesc;
+ D3DDEVICEDESC1 ddSwDesc;
+} D3DFINDDEVICERESULT1,*LPD3DFINDDEVICERESULT1;
+
+typedef struct _D3DFINDDEVICERESULT2 {
+ DWORD dwSize;
+ GUID guid;
+ D3DDEVICEDESC2 ddHwDesc;
+ D3DDEVICEDESC2 ddSwDesc;
+} D3DFINDDEVICERESULT2,*LPD3DFINDDEVICERESULT2;
+
typedef struct _D3DFINDDEVICERESULT {
DWORD dwSize;
GUID guid;
--
1.9.1
Sept. 4, 2018