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
July 2019
- 65 participants
- 633 messages
[PATCH] bcrypt: Ignore the size parameter in BCRYPT_CHAINING_MODE setters.
by Hans Leidekker
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47432
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/bcrypt_main.c | 8 ++++----
dlls/bcrypt/gnutls.c | 8 ++++----
dlls/bcrypt/macos.c | 6 +++---
dlls/bcrypt/tests/bcrypt.c | 21 ++++++++++++++++++++-
4 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 3846341644..79660c1cf1 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -518,24 +518,24 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
- if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
+ if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
alg->mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
- else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
+ else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
alg->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
- else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM, size ))
+ else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM ))
{
alg->mode = MODE_ID_GCM;
return STATUS_SUCCESS;
}
else
{
- FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
+ FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 2a7e37ef8a..583a0e47e6 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -369,24 +369,24 @@ NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULO
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
- if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
+ if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
key->u.s.mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
- else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
+ else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
key->u.s.mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
- else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM, size ))
+ else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM ))
{
key->u.s.mode = MODE_ID_GCM;
return STATUS_SUCCESS;
}
else
{
- FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
+ FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index cc99637c4b..df79f3e80d 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -48,19 +48,19 @@ NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULO
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
- if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
+ if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
key->u.s.mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
- else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
+ else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
key->u.s.mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
else
{
- FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
+ FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 11e274bc5f..b8678a520d 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -639,7 +639,7 @@ static void test_aes(void)
ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
memcpy(mode, BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM));
- ret = pBCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode), 0);
+ ret = pBCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
size = 0;
@@ -694,6 +694,25 @@ static void test_BCryptGenerateSymmetricKey(void)
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ size = 0;
+ memset(mode, 0, sizeof(mode));
+ ret = pBCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
+ ok(size == 64, "got %u\n", size);
+
+ ret = pBCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_ECB, 0, 0);
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
+ if (ret == STATUS_SUCCESS)
+ {
+ size = 0;
+ memset(mode, 0, sizeof(mode));
+ ret = pBCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_ECB), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
+ ok(size == 64, "got %u\n", size);
+ }
+
ret = pBCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC,
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
--
2.20.1
July 5, 2019
[PATCH] cryptext: Implement CryptExtOpenCER.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
configure.ac | 1 +
dlls/cryptext/Makefile.in | 3 +-
dlls/cryptext/cryptext.spec | 4 +--
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
dlls/cryptext/tests/Makefile.in | 4 +++
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
6 files changed, 134 insertions(+), 3 deletions(-)
create mode 100644 dlls/cryptext/tests/Makefile.in
create mode 100644 dlls/cryptext/tests/cryptext.c
diff --git a/configure.ac b/configure.ac
index a7c45ace73..e801c35c46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3049,6 +3049,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
WINE_CONFIG_MAKEFILE(dlls/cryptext)
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
WINE_CONFIG_MAKEFILE(dlls/cryptui)
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
index 9c9f84cee8..0e817ffda6 100644
--- a/dlls/cryptext/Makefile.in
+++ b/dlls/cryptext/Makefile.in
@@ -1,4 +1,5 @@
-MODULE = cryptext.dll
+MODULE = cryptext.dll
+IMPORTS = crypt32 cryptui user32
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
index 0dba38e393..911ab2f4ba 100644
--- a/dlls/cryptext/cryptext.spec
+++ b/dlls/cryptext/cryptext.spec
@@ -12,8 +12,8 @@
@ stub CryptExtAddSPCW
@ stub CryptExtOpenCAT
@ stub CryptExtOpenCATW
-@ stub CryptExtOpenCER
-@ stub CryptExtOpenCERW
+@ stdcall CryptExtOpenCER(long ptr str long)
+@ stdcall CryptExtOpenCERW(long ptr wstr long)
@ stub CryptExtOpenCRL
@ stub CryptExtOpenCRLW
@ stub CryptExtOpenCTL
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
index f7c7bd1f55..2a381782d6 100644
--- a/dlls/cryptext/cryptext_main.c
+++ b/dlls/cryptext/cryptext_main.c
@@ -22,10 +22,29 @@
#include "windef.h"
#include "winbase.h"
+#include "winnls.h"
+#include "wincrypt.h"
+#include "winuser.h"
+#include "cryptuiapi.h"
+
+#include "wine/heap.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(cryptext);
+static WCHAR *heap_strdupAtoW(const char *str)
+{
+ WCHAR *ret;
+ INT len;
+
+ if (!str) return NULL;
+ len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
+ ret = heap_alloc(len * sizeof(WCHAR));
+ if (ret)
+ MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
+ return ret;
+}
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
@@ -59,3 +78,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
FIXME("stub: %s\n", debugstr_w(filename));
return E_NOTIMPL;
}
+
+/***********************************************************************
+ * CryptExtOpenCERW (CRYPTEXT.@)
+ */
+HRESULT WINAPI CryptExtOpenCERW(HWND hwnd, HINSTANCE hinst, LPCWSTR filename, DWORD showcmd)
+{
+ PCCERT_CONTEXT ctx;
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW info;
+
+ TRACE("(%p, %p, %s, %u)\n", hwnd, hinst, debugstr_w(filename), showcmd);
+
+ if (!CryptQueryObject(CERT_QUERY_OBJECT_FILE, filename, CERT_QUERY_CONTENT_FLAG_CERT,
+ CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL,
+ (const void **)&ctx))
+ {
+ /* FIXME: move to the resources */
+ static const WCHAR msg[] = {'T','h','i','s',' ','i','s',' ','n','o','t',' ','a',' ','v','a','l','i','d',' ','c','e','r','t','i','f','i','c','a','t','e',0};
+ MessageBoxW(NULL, msg, filename, MB_OK | MB_ICONERROR);
+ return S_OK; /* according to the tests */
+ }
+
+ memset(&info, 0, sizeof(info));
+ info.dwSize = sizeof(info);
+ info.pCertContext = ctx;
+ CryptUIDlgViewCertificateW(&info, NULL);
+ CertFreeCertificateContext(ctx);
+
+ return S_OK;
+}
+
+/***********************************************************************
+ * CryptExtOpenCER (CRYPTEXT.@)
+ */
+HRESULT WINAPI CryptExtOpenCER(HWND hwnd, HINSTANCE hinst, LPCSTR filename, DWORD showcmd)
+{
+ HRESULT hr;
+ LPWSTR filenameW;
+
+ TRACE("(%p, %p, %s, %u)\n", hwnd, hinst, debugstr_a(filename), showcmd);
+
+ filenameW = heap_strdupAtoW(filename);
+ hr = CryptExtOpenCERW(hwnd, hinst, filenameW, showcmd);
+ heap_free(filenameW);
+ return hr;
+}
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
new file mode 100644
index 0000000000..522fc60a4a
--- /dev/null
+++ b/dlls/cryptext/tests/Makefile.in
@@ -0,0 +1,4 @@
+TESTDLL = cryptext.dll
+
+C_SRCS = \
+ cryptext.c
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
new file mode 100644
index 0000000000..cc62a772b5
--- /dev/null
+++ b/dlls/cryptext/tests/cryptext.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2019 Dmitry Timoshkov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdarg.h>
+#include <assert.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winuser.h>
+#include <winerror.h>
+
+#include "wine/test.h"
+
+static HRESULT (WINAPI *pCryptExtOpenCER)(HWND,HINSTANCE,LPCSTR,DWORD);
+
+static void test_CryptExtOpenCER(void)
+{
+ HRESULT hr;
+
+ if (!pCryptExtOpenCER)
+ {
+ win_skip("CryptExtOpenCER is not available on this platform\n");
+ return;
+ }
+
+ if (!winetest_interactive)
+ {
+ skip("CryptExtOpenCER test needs user interaction\n");
+ return;
+ }
+
+ SetLastError(0xdeadbeef);
+ hr = pCryptExtOpenCER(0, 0, "dead.beef", SW_HIDE);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ hr = pCryptExtOpenCER(0, 0, "VeriSign Class 3 Public Primary Certification Authority - G4.txt", SW_SHOW);
+ ok(hr == S_OK, "got %#x\n", hr);
+}
+
+START_TEST(cryptext)
+{
+ HMODULE hmod = LoadLibraryA("cryptext.dll");
+
+ pCryptExtOpenCER = (void *)GetProcAddress(hmod, "CryptExtOpenCER");
+
+ test_CryptExtOpenCER();
+}
--
2.20.1
July 5, 2019
Re: [PATCH v2 5/5] winex11.drv: Implement X11DRV_D3DKMTCheckVidPnExclusiveOwnership.
by Marvin
Hi,
While running your changed tests, 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=54490
Your paranoid android.
=== w2008s64 (32 bit report) ===
dxgi:
dxgi.c:4831: Test failed: Got unexpected message 0x1a, hwnd 000F0084, wparam 0x2f, lparam 0x7e528.
dxgi.c:4831: Test failed: Got unexpected message 0x1a, hwnd 000F0084, wparam 0x18, lparam 0x7e528.
=== debian9 (32 bit report) ===
d3d11:
d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (32 bit Chinese:China report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (32 bit WoW report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (64 bit WoW report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
July 4, 2019
Re: [PATCH v2 4/5] winex11.drv: Implement X11DRV_D3DKMTSetVidPnSourceOwner.
by Marvin
Hi,
While running your changed tests, 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=54489
Your paranoid android.
=== w1064v1809 (64 bit report) ===
gdi32:
driver.c:693: Test failed: Got unexpected return code 0xc01e0006.
=== debian9 (32 bit report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (32 bit Chinese:China report) ===
d3d11:
d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d11.c:17933: Test failed: Got {0x00000001, 0xffffffff, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0.
July 4, 2019
Re: [PATCH v2 3/5] gdi32: Add D3DKMTCheckVidPnExclusiveOwnership stub.
by Marvin
Hi,
While running your changed tests, 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=54488
Your paranoid android.
=== debian9 (32 bit report) ===
Report errors:
d3d11:d3d11 has no test summary line (early exit of the main process?)
d3d11:d3d11 has unaccounted for failure messages
d3d11:d3d11 has unaccounted for todo messages
d3d11:d3d11 has unaccounted for skip messages
d3d11:d3d11 returned success despite having failures
=== debian9 (build log) ===
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 34 ()
=== debian9 (32 bit WoW report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (64 bit WoW report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
July 4, 2019
Re: [PATCH v2 2/5] gdi32: Add D3DKMTSetVidPnSourceOwner stub.
by Marvin
Hi,
While running your changed tests, 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=54487
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11:
d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
d3d11.c:16849: Test failed: Got {-1.00787401e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001}, expected {-1.00000000e+000, 0.00000000e+000, 1.00000000e+000, 5.03937006e-001} at (0, 0), sub-resource 0.
=== debian9 (32 bit Chinese:China report) ===
d3d11:
d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
July 4, 2019
Re: [PATCH 1/2] user32/edit: In EM_POSFROMCHAR return correct position for empty lines
by Nikolay Sivov
On Thu, Jul 4, 2019 at 7:46 PM Fabian Maurer <dark.shadow4(a)web.de> wrote:
> Any news on this patchset?
@@ -1102,7 +1102,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE
*es, INT index, BOOL after_wrap)
x -= es->x_offset;
}
else
- x = es->x_offset;
+ x = (lw > 0 ? es->x_offset : -es->x_offset);
if (es->style & ES_RIGHT)
x = w - (lw - x);
How to trigger this alternate path which is !ssa && lw > 0? In other
words, do we have tests for both cases of that else branch.
>
>
> Regards,
> Fabian Maurer
>
>
>
>
>
July 4, 2019
[PATCH v2 5/5] winex11.drv: Implement X11DRV_D3DKMTCheckVidPnExclusiveOwnership.
by Zhiyi Zhang
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/dxgi/tests/dxgi.c | 10 +++++++---
dlls/gdi32/tests/driver.c | 2 +-
dlls/winex11.drv/init.c | 2 +-
dlls/winex11.drv/x11drv.h | 1 +
dlls/winex11.drv/x11drv_main.c | 25 +++++++++++++++++++++++++
5 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c
index d8176bb1c0..ab65725ccf 100644
--- a/dlls/dxgi/tests/dxgi.c
+++ b/dlls/dxgi/tests/dxgi.c
@@ -731,7 +731,6 @@ static IDXGIAdapter *get_adapter_(unsigned int line, IUnknown *device, BOOL is_d
hr = IDXGIFactory_QueryInterface(factory, &IID_IDXGIFactory4, (void **)&factory4);
ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr);
hr = IDXGIFactory4_EnumAdapterByLuid(factory4, luid, &IID_IDXGIAdapter, (void **)&adapter);
- ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#x.\n", hr);
IDXGIFactory4_Release(factory4);
IDXGIFactory_Release(factory);
}
@@ -5497,13 +5496,18 @@ static void test_output_ownership(IUnknown *device, BOOL is_d3d12)
if (!pD3DKMTCheckVidPnExclusiveOwnership
|| pD3DKMTCheckVidPnExclusiveOwnership(NULL) == STATUS_PROCEDURE_NOT_FOUND)
{
- skip("D3DKMTCheckVidPnExclusiveOwnership() is unavailable.\n");
+ win_skip("D3DKMTCheckVidPnExclusiveOwnership() is unavailable.\n");
return;
}
get_factory(device, is_d3d12, &factory);
adapter = get_adapter(device, is_d3d12);
- ok(!!adapter, "Failed to get adapter.\n");
+ if (!adapter)
+ {
+ skip("Failed to get adapter on Direct3D %d.\n", is_d3d12 ? 12 : 10);
+ IDXGIFactory_Release(factory);
+ return;
+ }
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output);
IDXGIAdapter_Release(adapter);
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index 2ea43e3025..ed83a72813 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -376,7 +376,7 @@ static void test_D3DKMTCheckVidPnExclusiveOwnership(void)
if (!pD3DKMTCheckVidPnExclusiveOwnership || pD3DKMTCheckVidPnExclusiveOwnership(NULL) == STATUS_PROCEDURE_NOT_FOUND)
{
- skip("D3DKMTCheckVidPnExclusiveOwnership() is unavailable.\n");
+ win_skip("D3DKMTCheckVidPnExclusiveOwnership() is unavailable.\n");
return;
}
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 66e6e7f09a..531bff0fdb 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -471,7 +471,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_StrokePath, /* pStrokePath */
X11DRV_UnrealizePalette, /* pUnrealizePalette */
NULL, /* pWidenPath */
- NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
+ X11DRV_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */
X11DRV_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */
X11DRV_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index d96a19f2e6..6ebf5db247 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -150,6 +150,7 @@ extern BOOL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
extern BOOL X11DRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern NTSTATUS X11DRV_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc ) DECLSPEC_HIDDEN;
+extern NTSTATUS X11DRV_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern INT X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index ef973f3e48..c9b202ad0e 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -877,3 +877,28 @@ done:
LeaveCriticalSection( &x11drv_section );
return status;
}
+
+/**********************************************************************
+ * X11DRV_D3DKMTCheckVidPnExclusiveOwnership
+ */
+NTSTATUS X11DRV_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc )
+{
+ struct d3dkmt_vidpn_source *source;
+
+ TRACE("(%p)\n", desc);
+
+ if (!desc || !desc->hAdapter)
+ return STATUS_INVALID_PARAMETER;
+
+ EnterCriticalSection( &x11drv_section );
+ LIST_FOR_EACH_ENTRY( source, &d3dkmt_vidpn_sources, struct d3dkmt_vidpn_source, entry )
+ {
+ if (source->id == desc->VidPnSourceId && source->type == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE)
+ {
+ LeaveCriticalSection( &x11drv_section );
+ return STATUS_GRAPHICS_PRESENT_OCCLUDED;
+ }
+ }
+ LeaveCriticalSection( &x11drv_section );
+ return STATUS_SUCCESS;
+}
--
2.20.1
July 4, 2019
[PATCH v2 4/5] winex11.drv: Implement X11DRV_D3DKMTSetVidPnSourceOwner.
by Zhiyi Zhang
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/gdi32/tests/driver.c | 2 +-
dlls/winex11.drv/init.c | 2 +-
dlls/winex11.drv/x11drv.h | 1 +
dlls/winex11.drv/x11drv_main.c | 138 +++++++++++++++++++++++++++++++++
4 files changed, 141 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index b5f6f75a83..2ea43e3025 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -600,7 +600,7 @@ static void test_D3DKMTSetVidPnSourceOwner(void)
if (!pD3DKMTSetVidPnSourceOwner || pD3DKMTSetVidPnSourceOwner(&set_owner_desc) == STATUS_PROCEDURE_NOT_FOUND)
{
- skip("D3DKMTSetVidPnSourceOwner() is unavailable.\n");
+ win_skip("D3DKMTSetVidPnSourceOwner() is unavailable.\n");
return;
}
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 49d334ef62..66e6e7f09a 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -472,7 +472,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_UnrealizePalette, /* pUnrealizePalette */
NULL, /* pWidenPath */
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
- NULL, /* pD3DKMTSetVidPnSourceOwner */
+ X11DRV_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */
X11DRV_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
GDI_PRIORITY_GRAPHICS_DRV /* priority */
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 9ab948f724..d96a19f2e6 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -149,6 +149,7 @@ extern BOOL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
+extern NTSTATUS X11DRV_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern INT X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 21807af3f1..ef973f3e48 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -42,6 +42,8 @@
#include <X11/extensions/Xrender.h>
#endif
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
@@ -52,6 +54,8 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/library.h"
+#include "wine/list.h"
+#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
WINE_DECLARE_DEBUG_CHANNEL(synchronous);
@@ -96,6 +100,25 @@ static int (*old_error_handler)( Display *, XErrorEvent * );
static BOOL use_xim = TRUE;
static char input_style[20];
+static CRITICAL_SECTION x11drv_section;
+static CRITICAL_SECTION_DEBUG critsect_debug =
+{
+ 0, 0, &x11drv_section,
+ { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": x11drv_section") }
+};
+static CRITICAL_SECTION x11drv_section = { &critsect_debug, -1, 0, 0, 0, 0 };
+
+struct d3dkmt_vidpn_source
+{
+ D3DKMT_VIDPNSOURCEOWNER_TYPE type; /* VidPN source owner type */
+ D3DDDI_VIDEO_PRESENT_SOURCE_ID id; /* VidPN present source id */
+ D3DKMT_HANDLE device; /* Kernel mode device context */
+ struct list entry; /* List entry */
+};
+
+static struct list d3dkmt_vidpn_sources = LIST_INIT( d3dkmt_vidpn_sources ); /* VidPN source information list */
+
#define IS_OPTION_TRUE(ch) \
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
#define IS_OPTION_FALSE(ch) \
@@ -739,3 +762,118 @@ BOOL CDECL X11DRV_SystemParametersInfo( UINT action, UINT int_param, void *ptr_p
}
return FALSE; /* let user32 handle it */
}
+
+/**********************************************************************
+ * X11DRV_D3DKMTSetVidPnSourceOwner
+ */
+NTSTATUS X11DRV_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc )
+{
+ struct d3dkmt_vidpn_source *source, *source2;
+ NTSTATUS status = STATUS_SUCCESS;
+ BOOL found;
+ UINT i;
+
+ TRACE("(%p)\n", desc);
+
+ EnterCriticalSection( &x11drv_section );
+
+ /* Check parameters */
+ for (i = 0; i < desc->VidPnSourceCount; ++i)
+ {
+ LIST_FOR_EACH_ENTRY( source, &d3dkmt_vidpn_sources, struct d3dkmt_vidpn_source, entry )
+ {
+ if (source->id == desc->pVidPnSourceId[i])
+ {
+ /* Same device */
+ if (source->device == desc->hDevice)
+ {
+ if ((source->type == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE
+ && (desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_SHARED
+ || desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_EMULATED))
+ || (source->type == D3DKMT_VIDPNSOURCEOWNER_EMULATED
+ && desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE))
+ {
+ status = STATUS_INVALID_PARAMETER;
+ goto done;
+ }
+ }
+ /* Different devices */
+ else
+ {
+ if ((source->type == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE
+ || source->type == D3DKMT_VIDPNSOURCEOWNER_EMULATED)
+ && (desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE
+ || desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_EMULATED))
+ {
+ status = STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE;
+ goto done;
+ }
+ }
+ }
+ }
+
+ /* On Windows, it seems that all video present sources are owned by DMM clients, so any attempt to set
+ * D3DKMT_VIDPNSOURCEOWNER_SHARED come back STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE */
+ if (desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_SHARED)
+ {
+ status = STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE;
+ goto done;
+ }
+
+ /* FIXME: D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVEGDI unsupported */
+ if (desc->pType[i] == D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVEGDI || desc->pType[i] > D3DKMT_VIDPNSOURCEOWNER_EMULATED)
+ {
+ status = STATUS_INVALID_PARAMETER;
+ goto done;
+ }
+ }
+
+ /* Remove owner */
+ if (!desc->VidPnSourceCount && !desc->pType && !desc->pVidPnSourceId)
+ {
+ LIST_FOR_EACH_ENTRY_SAFE( source, source2, &d3dkmt_vidpn_sources, struct d3dkmt_vidpn_source, entry )
+ {
+ if (source->device == desc->hDevice)
+ {
+ list_remove( &source->entry );
+ heap_free( source );
+ }
+ }
+ goto done;
+ }
+
+ /* Add owner */
+ for (i = 0; i < desc->VidPnSourceCount; ++i)
+ {
+ found = FALSE;
+ LIST_FOR_EACH_ENTRY( source, &d3dkmt_vidpn_sources, struct d3dkmt_vidpn_source, entry )
+ {
+ if (source->device == desc->hDevice && source->id == desc->pVidPnSourceId[i])
+ {
+ found = TRUE;
+ break;
+ }
+ }
+
+ if (found)
+ source->type = desc->pType[i];
+ else
+ {
+ source = heap_alloc( sizeof( *source ) );
+ if (!source)
+ {
+ status = STATUS_NO_MEMORY;
+ goto done;
+ }
+
+ source->id = desc->pVidPnSourceId[i];
+ source->type = desc->pType[i];
+ source->device = desc->hDevice;
+ list_add_tail( &d3dkmt_vidpn_sources, &source->entry );
+ }
+ }
+
+done:
+ LeaveCriticalSection( &x11drv_section );
+ return status;
+}
--
2.20.1
July 4, 2019
[PATCH v2 3/5] gdi32: Add D3DKMTCheckVidPnExclusiveOwnership stub.
by Zhiyi Zhang
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
.../api-ms-win-dx-d3dkmt-l1-1-0.spec | 2 +-
dlls/d3d11/d3d11.spec | 1 +
dlls/gdi32/dibdrv/dc.c | 2 ++
dlls/gdi32/driver.c | 22 +++++++++++++++++++
dlls/gdi32/enhmfdrv/dc.c | 1 +
dlls/gdi32/enhmfdrv/init.c | 1 +
dlls/gdi32/freetype.c | 1 +
dlls/gdi32/gdi32.spec | 1 +
dlls/gdi32/mfdrv/init.c | 1 +
dlls/gdi32/path.c | 1 +
dlls/wineandroid.drv/init.c | 1 +
dlls/winemac.drv/gdi.c | 1 +
dlls/wineps.drv/init.c | 1 +
dlls/winex11.drv/init.c | 1 +
dlls/winex11.drv/xrender.c | 1 +
include/ddk/d3dkmthk.h | 1 +
include/wine/gdi_driver.h | 3 ++-
17 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec
index c14ebc68e9..0f68d777f0 100644
--- a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec
+++ b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec
@@ -5,7 +5,7 @@
@ stub D3DKMTCheckMonitorPowerState
@ stub D3DKMTCheckOcclusion
@ stub D3DKMTCheckSharedResourceAccess
-@ stub D3DKMTCheckVidPnExclusiveOwnership
+@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr) gdi32.D3DKMTCheckVidPnExclusiveOwnership
@ stdcall D3DKMTCloseAdapter(ptr) gdi32.D3DKMTCloseAdapter
@ stub D3DKMTConfigureSharedResource
@ stub D3DKMTCreateAllocation
diff --git a/dlls/d3d11/d3d11.spec b/dlls/d3d11/d3d11.spec
index 606ddae3e3..383ed6aa9c 100644
--- a/dlls/d3d11/d3d11.spec
+++ b/dlls/d3d11/d3d11.spec
@@ -5,6 +5,7 @@
@ stdcall D3D11CreateDevice(ptr long ptr long ptr long long ptr ptr ptr)
@ stdcall D3D11CreateDeviceAndSwapChain(ptr long ptr long ptr long long ptr ptr ptr ptr ptr)
@ stdcall D3D11On12CreateDevice(ptr long ptr long ptr long long ptr ptr ptr)
+@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr) gdi32.D3DKMTCheckVidPnExclusiveOwnership
@ stdcall D3DKMTCloseAdapter(ptr) gdi32.D3DKMTCloseAdapter
@ stub D3DKMTCreateAllocation
@ stub D3DKMTCreateContext
diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c
index 10c3fc6f69..fe1ef1e0fc 100644
--- a/dlls/gdi32/dibdrv/dc.c
+++ b/dlls/gdi32/dibdrv/dc.c
@@ -520,6 +520,7 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
dibdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
@@ -1144,6 +1145,7 @@ static const struct gdi_dc_funcs window_driver =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
windrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index 71a52ed9fc..9da7ba1734 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -753,6 +753,11 @@ static BOOL nulldrv_UnrealizePalette( HPALETTE palette )
return FALSE;
}
+static NTSTATUS WINAPI nulldrv_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc )
+{
+ return STATUS_PROCEDURE_NOT_FOUND;
+}
+
static NTSTATUS WINAPI nulldrv_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc )
{
return STATUS_PROCEDURE_NOT_FOUND;
@@ -897,6 +902,7 @@ const struct gdi_dc_funcs null_driver =
nulldrv_StrokePath, /* pStrokePath */
nulldrv_UnrealizePalette, /* pUnrealizePalette */
nulldrv_WidenPath, /* pWidenPath */
+ nulldrv_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */
nulldrv_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
nulldrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
nulldrv_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
@@ -1473,3 +1479,19 @@ NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *des
* released before showing the new window */
return get_display_driver()->pD3DKMTSetVidPnSourceOwner( desc );
}
+
+/******************************************************************************
+ * D3DKMTCheckVidPnExclusiveOwnership [GDI32.@]
+ */
+NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc )
+{
+ TRACE("(%p)\n", desc);
+
+ if (!get_display_driver()->pD3DKMTCheckVidPnExclusiveOwnership)
+ return STATUS_PROCEDURE_NOT_FOUND;
+
+ if (!desc || !desc->hAdapter)
+ return STATUS_INVALID_PARAMETER;
+
+ return get_display_driver()->pD3DKMTCheckVidPnExclusiveOwnership( desc );
+}
diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c
index 80e54685c7..450f80f6ba 100644
--- a/dlls/gdi32/enhmfdrv/dc.c
+++ b/dlls/gdi32/enhmfdrv/dc.c
@@ -950,6 +950,7 @@ static const struct gdi_dc_funcs emfpath_driver =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c
index 6938e45cbd..d13f3b2b9d 100644
--- a/dlls/gdi32/enhmfdrv/init.c
+++ b/dlls/gdi32/enhmfdrv/init.c
@@ -163,6 +163,7 @@ static const struct gdi_dc_funcs emfdrv_driver =
EMFDRV_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
EMFDRV_WidenPath, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index b571611c13..dceb1fae38 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -9236,6 +9236,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec
index 597002c9a8..4d71b75d19 100644
--- a/dlls/gdi32/gdi32.spec
+++ b/dlls/gdi32/gdi32.spec
@@ -80,6 +80,7 @@
@ stdcall CreateScalableFontResourceA(long str str str)
@ stdcall CreateScalableFontResourceW(long wstr wstr wstr)
@ stdcall CreateSolidBrush(long)
+@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr)
@ stdcall D3DKMTCloseAdapter(ptr)
@ stdcall D3DKMTCreateDCFromMemory(ptr)
@ stdcall D3DKMTCreateDevice(ptr)
diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c
index fb568f1838..52181cd60f 100644
--- a/dlls/gdi32/mfdrv/init.c
+++ b/dlls/gdi32/mfdrv/init.c
@@ -226,6 +226,7 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
MFDRV_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
MFDRV_WidenPath, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c
index 23c0162f64..9a671db46c 100644
--- a/dlls/gdi32/path.c
+++ b/dlls/gdi32/path.c
@@ -2248,6 +2248,7 @@ const struct gdi_dc_funcs path_driver =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c
index ec6c689b49..a73b025d4d 100644
--- a/dlls/wineandroid.drv/init.c
+++ b/dlls/wineandroid.drv/init.c
@@ -411,6 +411,7 @@ static const struct gdi_dc_funcs android_drv_funcs =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
ANDROID_wine_get_wgl_driver, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c
index 32aeba04b4..5adf86c9de 100644
--- a/dlls/winemac.drv/gdi.c
+++ b/dlls/winemac.drv/gdi.c
@@ -390,6 +390,7 @@ static const struct gdi_dc_funcs macdrv_funcs =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
macdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
macdrv_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c
index 2183029058..e82b0c8ee3 100644
--- a/dlls/wineps.drv/init.c
+++ b/dlls/wineps.drv/init.c
@@ -908,6 +908,7 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_StrokePath, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index baed875ba5..49d334ef62 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -471,6 +471,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_StrokePath, /* pStrokePath */
X11DRV_UnrealizePalette, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */
X11DRV_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index e8dbf27c0d..addd0ea1b1 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2284,6 +2284,7 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL, /* pStrokePath */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
+ NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
NULL, /* pD3DKMTSetVidPnSourceOwner */
NULL, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
diff --git a/include/ddk/d3dkmthk.h b/include/ddk/d3dkmthk.h
index 05e2e65aea..717fdb3579 100644
--- a/include/ddk/d3dkmthk.h
+++ b/include/ddk/d3dkmthk.h
@@ -165,6 +165,7 @@ extern "C"
{
#endif /* __cplusplus */
+NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc);
NTSTATUS WINAPI D3DKMTCloseAdapter(const D3DKMT_CLOSEADAPTER *desc);
NTSTATUS WINAPI D3DKMTCreateDevice(D3DKMT_CREATEDEVICE *desc);
NTSTATUS WINAPI D3DKMTCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *desc);
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index fac25349d1..8ae641b1ee 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -194,6 +194,7 @@ struct gdi_dc_funcs
BOOL (*pStrokePath)(PHYSDEV);
BOOL (*pUnrealizePalette)(HPALETTE);
BOOL (*pWidenPath)(PHYSDEV);
+ NTSTATUS (*pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
NTSTATUS (*pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *);
struct opengl_funcs * (*wine_get_wgl_driver)(PHYSDEV,UINT);
const struct vulkan_funcs * (*wine_get_vulkan_driver)(PHYSDEV,UINT);
@@ -203,7 +204,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
-#define WINE_GDI_DRIVER_VERSION 50
+#define WINE_GDI_DRIVER_VERSION 51
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
--
2.20.1
July 4, 2019