You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7cfceb78b2 | ||
|
1ee9d7c6e8 | ||
|
5d3992d777 | ||
|
d4710fd098 | ||
|
6587db3575 | ||
|
8f0e72776f | ||
|
6e0d8f18d9 | ||
|
28e66e552f | ||
|
3cc8f97398 | ||
|
1cbabaac9d | ||
|
b9ae1089c7 | ||
|
5a71716118 | ||
|
214a0fd7bd | ||
|
94f314ccaa | ||
|
90c47aa854 | ||
|
51cfdc619e | ||
|
d7154d5d3f | ||
|
412e20cd9a | ||
|
a043977b12 | ||
|
b64814b44a | ||
|
f3b9983a5e | ||
|
d205b5f8e9 | ||
|
ab69e65646 | ||
|
965002dc53 | ||
|
a6eddc4c25 | ||
|
7a9913e0a9 | ||
|
e8ba49a434 | ||
|
3dcb983637 | ||
|
74e9c4f8ce | ||
|
8ff32873d6 | ||
|
9190e30a15 | ||
|
8cf0e5c285 | ||
|
110a6f6016 | ||
|
720db34b6e |
@@ -1,7 +1,6 @@
|
||||
Fixes: [40613] Basic implementation for token integrity levels and UAC handling
|
||||
Fixes: [39262] Run explorer.exe as unevaluated process
|
||||
Depends: advapi32-CreateRestrictedToken
|
||||
Depends: kernel32-COMSPEC
|
||||
Depends: server-CreateProcess_ACLs
|
||||
Depends: server-Misc_ACL
|
||||
Depends: Staging
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: [42704] Implement BCryptDeriveKeyPBKDF2
|
||||
Depends: crypt32-ECDSA_Cert_Chains
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: [45312] Fix issue for Assassin's Creed : Syndicate
|
||||
Depends: crypt32-ECDSA_Cert_Chains
|
||||
|
@@ -1,43 +0,0 @@
|
||||
From bba53bba66f4ca7b8726424e8215854a657c024a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 15 Nov 2016 23:50:23 +0100
|
||||
Subject: crypt32: Properly check root certificate in
|
||||
CERT_CHAIN_REVOCATION_CHECK_CHAIN.
|
||||
|
||||
CA certificates do not have a parent which defines a CRL, but Windows seems to require
|
||||
that CA certificates are self signed. We therefore should set pIssuerCert to the
|
||||
CA certificate itself before calling CertVerifyRevocation. On windows the function
|
||||
does not seem to fail if no CRL could be found, so ignore this error for now.
|
||||
---
|
||||
dlls/crypt32/chain.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
|
||||
index aab2e91..80b6513 100644
|
||||
--- a/dlls/crypt32/chain.c
|
||||
+++ b/dlls/crypt32/chain.c
|
||||
@@ -2704,10 +2704,20 @@ static void CRYPT_VerifyChainRevocation(PCERT_CHAIN_CONTEXT chain,
|
||||
revocationPara.pIssuerCert =
|
||||
chain->rgpChain[i]->rgpElement[j + 1]->pCertContext;
|
||||
else
|
||||
- revocationPara.pIssuerCert = NULL;
|
||||
+ revocationPara.pIssuerCert = certToCheck;
|
||||
+
|
||||
ret = CertVerifyRevocation(X509_ASN_ENCODING,
|
||||
CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)&certToCheck,
|
||||
revocationFlags, &revocationPara, &revocationStatus);
|
||||
+
|
||||
+ if (!ret && revocationStatus.dwError == CRYPT_E_NO_REVOCATION_CHECK &&
|
||||
+ revocationPara.pIssuerCert == certToCheck)
|
||||
+ {
|
||||
+ FIXME("Unable to find CRL for CA certificate\n");
|
||||
+ ret = TRUE;
|
||||
+ revocationStatus.dwError = 0;
|
||||
+ }
|
||||
+
|
||||
if (!ret)
|
||||
{
|
||||
PCERT_CHAIN_ELEMENT element = CRYPT_FindIthElementInChain(
|
||||
--
|
||||
2.9.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [41652] Fix root certificate check in CERT_CHAIN_REVOCATION_CHECK_CHAIN
|
@@ -1,25 +0,0 @@
|
||||
From 29ac40e7943195bda7acbc0ffa5cc966d8c1a40a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Mon, 31 Aug 2015 22:54:59 -0300
|
||||
Subject: crypt32: Print CryptUnprotectMemory FIXME only once.
|
||||
|
||||
---
|
||||
dlls/crypt32/main.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c
|
||||
index 241a1d9..696195a 100644
|
||||
--- a/dlls/crypt32/main.c
|
||||
+++ b/dlls/crypt32/main.c
|
||||
@@ -259,6 +259,7 @@ BOOL WINAPI CryptProtectMemory(void *data, DWORD len, DWORD flags)
|
||||
|
||||
BOOL WINAPI CryptUnprotectMemory(void *data, DWORD len, DWORD flags)
|
||||
{
|
||||
- FIXME("(%p %u %08x): stub\n", data, len, flags);
|
||||
+ static int fixme_once;
|
||||
+ if (!fixme_once++) FIXME("(%p %u %08x): stub\n", data, len, flags);
|
||||
return TRUE;
|
||||
}
|
||||
--
|
||||
2.5.0
|
||||
|
@@ -1,196 +0,0 @@
|
||||
From 484fbc0054dadaf4a410ae3497ccf3338ef7d81c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 27 Sep 2017 18:31:07 +0200
|
||||
Subject: crypt32/tests: Basic tests for decoding ECDSA signed certificate.
|
||||
|
||||
---
|
||||
dlls/crypt32/tests/encode.c | 168 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 168 insertions(+)
|
||||
|
||||
diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c
|
||||
index a4daec0..729f3e4 100644
|
||||
--- a/dlls/crypt32/tests/encode.c
|
||||
+++ b/dlls/crypt32/tests/encode.c
|
||||
@@ -8509,6 +8509,173 @@ static void testPortPublicKeyInfo(void)
|
||||
ok(ret,"CryptAcquireContextA failed\n");
|
||||
}
|
||||
|
||||
+static const BYTE eccCert[] = {
|
||||
+0x30,0x82,0x01,0x46,0x30,0x81,0xec,0x02,0x09,0x00,0xe7,0x6b,
|
||||
+0x26,0x86,0x0a,0x82,0xff,0xe9,0x30,0x0a,0x06,0x08,0x2a,0x86,
|
||||
+0x48,0xce,0x3d,0x04,0x03,0x02,0x30,0x2b,0x31,0x0b,0x30,0x09,
|
||||
+0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x44,0x45,0x31,0x0d,0x30,
|
||||
+0x0b,0x06,0x03,0x55,0x04,0x0a,0x0c,0x04,0x57,0x69,0x6e,0x65,
|
||||
+0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x03,0x0c,0x04,0x57,
|
||||
+0x69,0x6e,0x65,0x30,0x1e,0x17,0x0d,0x31,0x37,0x30,0x39,0x32,
|
||||
+0x37,0x31,0x33,0x34,0x31,0x30,0x34,0x5a,0x17,0x0d,0x32,0x37,
|
||||
+0x30,0x39,0x32,0x35,0x31,0x33,0x34,0x31,0x30,0x34,0x5a,0x30,
|
||||
+0x2b,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
|
||||
+0x44,0x45,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x0a,0x0c,
|
||||
+0x04,0x54,0x65,0x73,0x74,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,
|
||||
+0x04,0x03,0x0c,0x04,0x54,0x65,0x73,0x74,0x30,0x59,0x30,0x13,
|
||||
+0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,
|
||||
+0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0xed,
|
||||
+0xfc,0x77,0xd8,0xb9,0xe7,0xf3,0xf8,0xce,0x13,0xb8,0x7f,0x0f,
|
||||
+0x78,0xea,0x73,0x87,0x29,0x10,0xe1,0x6d,0x10,0xce,0x57,0x60,
|
||||
+0x3b,0x3e,0xb4,0x5f,0x0d,0x20,0xc1,0xeb,0x6d,0x74,0xe9,0x7b,
|
||||
+0x11,0x51,0x9a,0x00,0xe8,0xe9,0x12,0x84,0xb9,0x07,0x7e,0x7b,
|
||||
+0x62,0x67,0x12,0x67,0x08,0xe5,0x2e,0x27,0xce,0xa2,0x57,0x15,
|
||||
+0xad,0xc5,0x1f,0x30,0x0a,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,
|
||||
+0x04,0x03,0x02,0x03,0x49,0x00,0x30,0x46,0x02,0x21,0x00,0xd7,
|
||||
+0x29,0xce,0x5a,0xef,0x74,0x85,0xd1,0x18,0x5f,0x6e,0xf1,0xba,
|
||||
+0x53,0xd4,0xcd,0xdd,0xe0,0x5d,0xf1,0x5e,0x48,0x51,0xea,0x63,
|
||||
+0xc0,0xe8,0xe2,0xf6,0xfa,0x4c,0xaf,0x02,0x21,0x00,0xe3,0x94,
|
||||
+0x15,0x3b,0x6c,0x71,0x6e,0x44,0x22,0xcb,0xa0,0x88,0xcd,0x0a,
|
||||
+0x5a,0x50,0x29,0x7c,0x5c,0xd6,0x6c,0xd2,0xe0,0x7f,0xcd,0x02,
|
||||
+0x92,0x21,0x4c,0x2c,0x92,0xee };
|
||||
+static const BYTE ecdsaSig[] = {
|
||||
+0x30,0x46,0x02,0x21,0x00,0xd7,0x29,0xce,0x5a,0xef,0x74,0x85,
|
||||
+0xd1,0x18,0x5f,0x6e,0xf1,0xba,0x53,0xd4,0xcd,0xdd,0xe0,0x5d,
|
||||
+0xf1,0x5e,0x48,0x51,0xea,0x63,0xc0,0xe8,0xe2,0xf6,0xfa,0x4c,
|
||||
+0xaf,0x02,0x21,0x00,0xe3,0x94,0x15,0x3b,0x6c,0x71,0x6e,0x44,
|
||||
+0x22,0xcb,0xa0,0x88,0xcd,0x0a,0x5a,0x50,0x29,0x7c,0x5c,0xd6,
|
||||
+0x6c,0xd2,0xe0,0x7f,0xcd,0x02,0x92,0x21,0x4c,0x2c,0x92,0xee };
|
||||
+static const BYTE eccPubKey[] = {
|
||||
+0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,
|
||||
+0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,
|
||||
+0x42,0x00,0x04,0xed,0xfc,0x77,0xd8,0xb9,0xe7,0xf3,0xf8,0xce,
|
||||
+0x13,0xb8,0x7f,0x0f,0x78,0xea,0x73,0x87,0x29,0x10,0xe1,0x6d,
|
||||
+0x10,0xce,0x57,0x60,0x3b,0x3e,0xb4,0x5f,0x0d,0x20,0xc1,0xeb,
|
||||
+0x6d,0x74,0xe9,0x7b,0x11,0x51,0x9a,0x00,0xe8,0xe9,0x12,0x84,
|
||||
+0xb9,0x07,0x7e,0x7b,0x62,0x67,0x12,0x67,0x08,0xe5,0x2e,0x27,
|
||||
+0xce,0xa2,0x57,0x15,0xad,0xc5,0x1f };
|
||||
+
|
||||
+static void testECDSACert(void)
|
||||
+{
|
||||
+ DWORD decode_flags = CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG;
|
||||
+ CERT_SIGNED_CONTENT_INFO *info;
|
||||
+ CERT_PUBLIC_KEY_INFO *pubkey;
|
||||
+ CERT_ECC_SIGNATURE *ecc_sig;
|
||||
+ LPSTR *ecc_curve;
|
||||
+ DWORD size;
|
||||
+ BOOL ret;
|
||||
+ int i;
|
||||
+
|
||||
+ info = NULL;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT, eccCert, sizeof(eccCert), decode_flags,
|
||||
+ NULL, &info, &size);
|
||||
+ ok(ret, "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+
|
||||
+ ok(!strcmp(info->SignatureAlgorithm.pszObjId, szOID_ECDSA_SHA256),
|
||||
+ "Expected 1.2.840.10045.4.3.2, got %s\n", info->SignatureAlgorithm.pszObjId);
|
||||
+ ok(!info->SignatureAlgorithm.Parameters.cbData,
|
||||
+ "Expected no parameter data, got %d bytes\n", info->SignatureAlgorithm.Parameters.cbData);
|
||||
+ ok(!info->SignatureAlgorithm.Parameters.pbData,
|
||||
+ "Expected no parameter data, got %p pointer\n", info->SignatureAlgorithm.Parameters.pbData);
|
||||
+
|
||||
+ ok(info->Signature.cbData == sizeof(ecdsaSig),
|
||||
+ "Expected %d bytes, got %d\n", (int)sizeof(ecdsaSig), info->Signature.cbData);
|
||||
+ ok(info->Signature.pbData != NULL, "Got NULL pointer\n");
|
||||
+ ok(!info->Signature.cUnusedBits, "Expected no unused bytes, got %d\n", info->Signature.cUnusedBits);
|
||||
+ for (i = 0; i < info->Signature.cbData; i++)
|
||||
+ {
|
||||
+ ok(ecdsaSig[i] == info->Signature.pbData[i], "Expected %02x, got %02x at offset %d\n",
|
||||
+ ecdsaSig[i], info->Signature.pbData[i], i);
|
||||
+ }
|
||||
+
|
||||
+ ecc_sig = NULL;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_ECC_SIGNATURE, info->Signature.pbData,
|
||||
+ info->Signature.cbData, decode_flags, NULL, &ecc_sig, &size);
|
||||
+ todo_wine ok(ret, "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ ok(ecc_sig->r.cbData == 32, "Expected 32 bytes, got %d\n", ecc_sig->r.cbData);
|
||||
+ ok(ecc_sig->r.pbData != NULL, "Got NULL pointer\n");
|
||||
+ ok(ecc_sig->s.cbData == 32, "Expected 32 bytes, got %d\n", ecc_sig->s.cbData);
|
||||
+ ok(ecc_sig->s.pbData != NULL, "Got NULL pointer\n");
|
||||
+ for (i = 0; i < ecc_sig->r.cbData; i++)
|
||||
+ {
|
||||
+ ok(ecdsaSig[4+32-i] == ecc_sig->r.pbData[i], "Expected %02x, got %02x at offset %d\n",
|
||||
+ ecdsaSig[4+32-i], ecc_sig->r.pbData[i], i);
|
||||
+ }
|
||||
+ for (i = 0; i < ecc_sig->s.cbData; i++)
|
||||
+ {
|
||||
+ ok(ecdsaSig[4+35+32-i] == ecc_sig->s.pbData[i], "Expected %02x, got %02x at offset %d\n",
|
||||
+ ecdsaSig[4+35+32-i], ecc_sig->s.pbData[i], i);
|
||||
+ }
|
||||
+ LocalFree(ecc_sig);
|
||||
+ }
|
||||
+
|
||||
+ LocalFree(info);
|
||||
+
|
||||
+ info = NULL;
|
||||
+ decode_flags &= ~CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT, eccCert, sizeof(eccCert), decode_flags,
|
||||
+ NULL, &info, &size);
|
||||
+ ok(ret, "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+
|
||||
+ ok(info->Signature.cbData == sizeof(ecdsaSig),
|
||||
+ "Expected %d bytes, got %d\n", (int)sizeof(ecdsaSig), info->Signature.cbData);
|
||||
+ ok(info->Signature.pbData != NULL, "Got NULL pointer\n");
|
||||
+ ok(!info->Signature.cUnusedBits, "Expected no unused bytes, got %d\n", info->Signature.cUnusedBits);
|
||||
+ for (i = 0; i < info->Signature.cbData; i++)
|
||||
+ {
|
||||
+ ok(ecdsaSig[sizeof(ecdsaSig)-i-1] == info->Signature.pbData[i], "Expected %02x, got %02x at offset %d\n",
|
||||
+ ecdsaSig[sizeof(ecdsaSig)-i-1], info->Signature.pbData[i], i);
|
||||
+ }
|
||||
+
|
||||
+ LocalFree(info);
|
||||
+
|
||||
+ pubkey = NULL;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_PUBLIC_KEY_INFO, eccPubKey, sizeof(eccPubKey),
|
||||
+ decode_flags, NULL, &pubkey, &size);
|
||||
+ ok(ret, "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+
|
||||
+ ok(!strcmp(pubkey->Algorithm.pszObjId, szOID_ECC_PUBLIC_KEY),
|
||||
+ "Expected 1.2.840.10045.2.1, got %s\n", pubkey->Algorithm.pszObjId);
|
||||
+ ok(pubkey->Algorithm.Parameters.cbData == 10,
|
||||
+ "Expected 10 bytes parameters, got %d bytes\n", pubkey->Algorithm.Parameters.cbData);
|
||||
+ ok(pubkey->Algorithm.Parameters.pbData != NULL,
|
||||
+ "Expected pointer to parameters, got NULL\n");
|
||||
+
|
||||
+ ecc_curve = NULL;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_OBJECT_IDENTIFIER, pubkey->Algorithm.Parameters.pbData,
|
||||
+ pubkey->Algorithm.Parameters.cbData, decode_flags, NULL, &ecc_curve, &size);
|
||||
+ todo_wine ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND /* < Vista */),
|
||||
+ "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ ok(!strcmp(*ecc_curve, szOID_ECC_CURVE_P256), "Expected 1.2.840.10045.3.1.7, got %s\n", *ecc_curve);
|
||||
+ LocalFree(ecc_curve);
|
||||
+ }
|
||||
+
|
||||
+ ecc_curve = NULL;
|
||||
+ ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, szOID_ECC_PUBLIC_KEY, pubkey->Algorithm.Parameters.pbData,
|
||||
+ pubkey->Algorithm.Parameters.cbData, decode_flags, NULL, &ecc_curve, &size);
|
||||
+ todo_wine ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND /* < Vista */),
|
||||
+ "CryptDecodeObjectEx failed with %d\n", GetLastError());
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ ok(!strcmp(*ecc_curve, szOID_ECC_CURVE_P256), "Expected 1.2.840.10045.3.1.7, got %s\n", *ecc_curve);
|
||||
+ LocalFree(ecc_curve);
|
||||
+ }
|
||||
+
|
||||
+ ok(pubkey->PublicKey.cbData == 65, "Expected 32 bytes parameters, got %d bytes\n", pubkey->PublicKey.cbData);
|
||||
+ ok(pubkey->PublicKey.pbData != NULL, "Expected pointer to parameters, got NULL\n");
|
||||
+ for (i = 0; i < pubkey->PublicKey.cbData; i++)
|
||||
+ {
|
||||
+ ok(eccPubKey[26+i] == pubkey->PublicKey.pbData[i], "Expected %02x, got %02x at offset %d\n",
|
||||
+ eccPubKey[26+i], pubkey->PublicKey.pbData[i], i);
|
||||
+ }
|
||||
+
|
||||
+ LocalFree(pubkey);
|
||||
+}
|
||||
+
|
||||
START_TEST(encode)
|
||||
{
|
||||
static const DWORD encodings[] = { X509_ASN_ENCODING, PKCS_7_ASN_ENCODING,
|
||||
@@ -8602,4 +8769,5 @@ START_TEST(encode)
|
||||
test_decodeRsaPrivateKey(encodings[i]);
|
||||
}
|
||||
testPortPublicKeyInfo();
|
||||
+ testECDSACert();
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -1,128 +0,0 @@
|
||||
From a1989f6e804cd11efe4da438939b481ef430cd4c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 30 Sep 2017 03:08:58 +0200
|
||||
Subject: crypt32/tets: Add test for verifying an ecdsa chain.
|
||||
|
||||
---
|
||||
dlls/crypt32/tests/chain.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 84 insertions(+)
|
||||
|
||||
diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
|
||||
index 0839fc73976..1279735e496 100644
|
||||
--- a/dlls/crypt32/tests/chain.c
|
||||
+++ b/dlls/crypt32/tests/chain.c
|
||||
@@ -2889,6 +2889,59 @@ static const BYTE chain31_1[] = {
|
||||
0x43,0x08,0xe5,0x78,0x2b,0x95,0xf3,0x75,0xb6,0x88,0xf0,0x6b,0x5c,0x5b,0x50,
|
||||
0x04,0x91,0x3b,0x89,0x5a,0x60,0x1f,0xfc,0x36,0x53,0x32,0x36,0x0a,0x4d,0x03,
|
||||
0x2c,0xd7 };
|
||||
+static const BYTE ecc_crt[] = {
|
||||
+0x30,0x82,0x01,0x46,0x30,0x81,0xec,0x02,0x09,0x00,0xe7,0x6b,0x26,0x86,0x0a,
|
||||
+0x82,0xff,0xe9,0x30,0x0a,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x04,0x03,0x02,
|
||||
+0x30,0x2b,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x44,0x45,
|
||||
+0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x0a,0x0c,0x04,0x57,0x69,0x6e,0x65,
|
||||
+0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x03,0x0c,0x04,0x57,0x69,0x6e,0x65,
|
||||
+0x30,0x1e,0x17,0x0d,0x31,0x37,0x30,0x39,0x32,0x37,0x31,0x33,0x34,0x31,0x30,
|
||||
+0x34,0x5a,0x17,0x0d,0x32,0x37,0x30,0x39,0x32,0x35,0x31,0x33,0x34,0x31,0x30,
|
||||
+0x34,0x5a,0x30,0x2b,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
|
||||
+0x44,0x45,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x0a,0x0c,0x04,0x54,0x65,
|
||||
+0x73,0x74,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x03,0x0c,0x04,0x54,0x65,
|
||||
+0x73,0x74,0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,
|
||||
+0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0xed,
|
||||
+0xfc,0x77,0xd8,0xb9,0xe7,0xf3,0xf8,0xce,0x13,0xb8,0x7f,0x0f,0x78,0xea,0x73,
|
||||
+0x87,0x29,0x10,0xe1,0x6d,0x10,0xce,0x57,0x60,0x3b,0x3e,0xb4,0x5f,0x0d,0x20,
|
||||
+0xc1,0xeb,0x6d,0x74,0xe9,0x7b,0x11,0x51,0x9a,0x00,0xe8,0xe9,0x12,0x84,0xb9,
|
||||
+0x07,0x7e,0x7b,0x62,0x67,0x12,0x67,0x08,0xe5,0x2e,0x27,0xce,0xa2,0x57,0x15,
|
||||
+0xad,0xc5,0x1f,0x30,0x0a,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x04,0x03,0x02,
|
||||
+0x03,0x49,0x00,0x30,0x46,0x02,0x21,0x00,0xd7,0x29,0xce,0x5a,0xef,0x74,0x85,
|
||||
+0xd1,0x18,0x5f,0x6e,0xf1,0xba,0x53,0xd4,0xcd,0xdd,0xe0,0x5d,0xf1,0x5e,0x48,
|
||||
+0x51,0xea,0x63,0xc0,0xe8,0xe2,0xf6,0xfa,0x4c,0xaf,0x02,0x21,0x00,0xe3,0x94,
|
||||
+0x15,0x3b,0x6c,0x71,0x6e,0x44,0x22,0xcb,0xa0,0x88,0xcd,0x0a,0x5a,0x50,0x29,
|
||||
+0x7c,0x5c,0xd6,0x6c,0xd2,0xe0,0x7f,0xcd,0x02,0x92,0x21,0x4c,0x2c,0x92,0xee };
|
||||
+static const BYTE ecc_ca[] = {
|
||||
+0x30,0x82,0x01,0x9f,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x09,
|
||||
+0x00,0xf1,0x54,0xae,0x21,0x2e,0x4d,0x31,0x9f,0x30,0x0a,0x06,0x08,0x2a,0x86,
|
||||
+0x48,0xce,0x3d,0x04,0x03,0x02,0x30,0x2b,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,
|
||||
+0x04,0x06,0x13,0x02,0x44,0x45,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x0a,
|
||||
+0x0c,0x04,0x57,0x69,0x6e,0x65,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x03,
|
||||
+0x0c,0x04,0x57,0x69,0x6e,0x65,0x30,0x1e,0x17,0x0d,0x31,0x37,0x30,0x39,0x32,
|
||||
+0x37,0x31,0x33,0x33,0x39,0x31,0x35,0x5a,0x17,0x0d,0x32,0x37,0x30,0x39,0x32,
|
||||
+0x35,0x31,0x33,0x33,0x39,0x31,0x35,0x5a,0x30,0x2b,0x31,0x0b,0x30,0x09,0x06,
|
||||
+0x03,0x55,0x04,0x06,0x13,0x02,0x44,0x45,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,
|
||||
+0x04,0x0a,0x0c,0x04,0x57,0x69,0x6e,0x65,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,
|
||||
+0x04,0x03,0x0c,0x04,0x57,0x69,0x6e,0x65,0x30,0x59,0x30,0x13,0x06,0x07,0x2a,
|
||||
+0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,
|
||||
+0x07,0x03,0x42,0x00,0x04,0x3b,0x3c,0x34,0xc8,0x3f,0x15,0xea,0x02,0x68,0x46,
|
||||
+0x69,0xdf,0x0c,0xa6,0xee,0x7a,0xd9,0x82,0x08,0x9b,0x37,0x53,0x42,0xf3,0x13,
|
||||
+0x63,0xda,0x65,0x79,0xe8,0x04,0x9e,0x8c,0x77,0xc4,0x33,0x77,0xd9,0x5a,0x7f,
|
||||
+0x60,0x7b,0x98,0xce,0xf3,0x96,0x56,0xd6,0xb5,0x8d,0x87,0x7a,0x00,0x2b,0xf3,
|
||||
+0x70,0xb3,0x90,0x73,0xa0,0x56,0x06,0x3b,0x22,0xa3,0x53,0x30,0x51,0x30,0x1d,
|
||||
+0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x26,0xef,0x6f,0xe4,0xb5,0x24,
|
||||
+0x2f,0x68,0x49,0x84,0xd9,0x89,0xa6,0xab,0x0c,0xf8,0x6d,0xf5,0xe5,0x0c,0x30,
|
||||
+0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x26,0xef,0x6f,
|
||||
+0xe4,0xb5,0x24,0x2f,0x68,0x49,0x84,0xd9,0x89,0xa6,0xab,0x0c,0xf8,0x6d,0xf5,
|
||||
+0xe5,0x0c,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,
|
||||
+0x03,0x01,0x01,0xff,0x30,0x0a,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x04,0x03,
|
||||
+0x02,0x03,0x47,0x00,0x30,0x44,0x02,0x20,0x2b,0x6b,0x23,0x42,0x32,0xf2,0xcb,
|
||||
+0x71,0xd7,0x5c,0xfa,0x5e,0x6c,0x19,0x31,0xd6,0x74,0xf7,0xc0,0xf8,0xc6,0x39,
|
||||
+0x38,0xe9,0x79,0x4d,0x84,0x44,0x40,0x13,0x8e,0x43,0x02,0x20,0x34,0xc7,0x61,
|
||||
+0xbb,0x18,0x1c,0x85,0x34,0xe3,0x4c,0x30,0x28,0x42,0x0e,0x06,0x65,0x68,0x1d,
|
||||
+0x76,0x53,0x24,0xa0,0x27,0xa5,0x84,0x3b,0x2d,0xf3,0xec,0x27,0x60,0xb2 };
|
||||
+
|
||||
|
||||
typedef struct _CONST_DATA_BLOB
|
||||
{
|
||||
@@ -3086,6 +3139,8 @@ static SYSTEMTIME jun2013 = { 2013, 6, 5, 6, 0, 0, 0, 0 };
|
||||
static SYSTEMTIME oct2016 = { 2016, 10, 6, 1, 0, 0, 0, 0 };
|
||||
/* Wednesday, Nov 17, 2016 */
|
||||
static SYSTEMTIME nov2016 = { 2016, 11, 3, 17, 0, 0, 0, 0 };
|
||||
+/* Wednesday, Nov 17, 2017 */
|
||||
+static SYSTEMTIME nov2017 = { 2017, 11, 3, 17, 0, 0, 0, 0 };
|
||||
|
||||
typedef struct _ChainCheck
|
||||
{
|
||||
@@ -3873,6 +3928,25 @@ static ChainCheck chainCheckEmbeddedNullBroken = {
|
||||
CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
|
||||
1, simpleStatus27Broken },
|
||||
0 };
|
||||
+static CONST_DATA_BLOB chainECDSA[] = {
|
||||
+ { sizeof(ecc_ca), ecc_ca },
|
||||
+ { sizeof(ecc_crt), ecc_crt },
|
||||
+};
|
||||
+static const CERT_TRUST_STATUS elementStatusECDSA[] = {
|
||||
+ { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
|
||||
+ { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_KEY_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
|
||||
+};
|
||||
+static const SimpleChainStatusCheck simpleStatusECDSA[] = {
|
||||
+ { sizeof(elementStatusECDSA) / sizeof(elementStatusECDSA[0]), elementStatusECDSA },
|
||||
+};
|
||||
+static ChainCheck chainCheckECDSA = {
|
||||
+ { sizeof(chainECDSA) / sizeof(chainECDSA[0]), chainECDSA },
|
||||
+ {
|
||||
+ { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER },
|
||||
+ { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 },
|
||||
+ 1, simpleStatusECDSA
|
||||
+ }, TODO_ERROR
|
||||
+};
|
||||
|
||||
#define test_name_blob(a,b) _test_name_blob(__LINE__,a,b)
|
||||
static void _test_name_blob(unsigned line, CERT_NAME_BLOB *blob, const char *exdata)
|
||||
@@ -4148,6 +4222,16 @@ static void testGetCertChain(void)
|
||||
|
||||
pCertFreeCertificateChain(chain);
|
||||
|
||||
+ /* Test with ECDSA certificate */
|
||||
+ chain = getChain(NULL, &chainCheckECDSA.certs, 0, TRUE, &nov2017, FALSE, 0);
|
||||
+ if (chain)
|
||||
+ {
|
||||
+ todo_wine ok(chain->TrustStatus.dwErrorStatus == CERT_TRUST_IS_UNTRUSTED_ROOT,
|
||||
+ "unexpected chain error status %08x\n", chain->TrustStatus.dwErrorStatus);
|
||||
+ checkChainStatus(chain, &chainCheckECDSA.status, chainCheckECDSA.todo, "chainCheckECDSA", 0);
|
||||
+ pCertFreeCertificateChain(chain);
|
||||
+ }
|
||||
+
|
||||
/* Test HCCE_LOCAL_MACHINE */
|
||||
ret = CertGetCertificateChain(HCCE_LOCAL_MACHINE, cert, &fileTime, store, ¶, 0, NULL, &chain);
|
||||
ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
|
||||
--
|
||||
2.14.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [35902] Implement support for validating ECDSA certificate chains
|
@@ -1,18 +1,18 @@
|
||||
From de26db5e899f92d2477c49fcfc57e673a3048205 Mon Sep 17 00:00:00 2001
|
||||
From 23044a3ed53cfe0c8a35c5cc19d51913e1523c51 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 17 May 2018 09:29:08 -0500
|
||||
Subject: d3d10core/tests: Add test for depth bias clamp.
|
||||
Subject: [PATCH] d3d10core/tests: Add test for depth bias clamp.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/d3d10core/tests/device.c | 120 +++++++++++++++++++++++++-----------------
|
||||
1 file changed, 71 insertions(+), 49 deletions(-)
|
||||
dlls/d3d10core/tests/d3d10core.c | 126 ++++++++++++++++++-------------
|
||||
1 file changed, 74 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
index 50521bd..6e92c77 100644
|
||||
--- a/dlls/d3d10core/tests/device.c
|
||||
+++ b/dlls/d3d10core/tests/device.c
|
||||
@@ -14697,10 +14697,10 @@ static void test_depth_bias(void)
|
||||
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c
|
||||
index e675c12a39e..2100a6611e5 100644
|
||||
--- a/dlls/d3d10core/tests/d3d10core.c
|
||||
+++ b/dlls/d3d10core/tests/d3d10core.c
|
||||
@@ -14957,10 +14957,10 @@ static void test_depth_bias(void)
|
||||
struct resource_readback rb;
|
||||
ID3D10DepthStencilView *dsv;
|
||||
unsigned int expected_value;
|
||||
@@ -24,7 +24,7 @@ index 50521bd..6e92c77 100644
|
||||
unsigned int shift = 0;
|
||||
ID3D10Device *device;
|
||||
float *depth_values;
|
||||
@@ -14727,6 +14727,10 @@ static void test_depth_bias(void)
|
||||
@@ -14987,6 +14987,10 @@ static void test_depth_bias(void)
|
||||
-10000, -1000, -100, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100, 200, 500, 1000, 10000,
|
||||
};
|
||||
@@ -35,7 +35,7 @@ index 50521bd..6e92c77 100644
|
||||
static const float quad_slopes[] =
|
||||
{
|
||||
0.0f, 0.5f, 1.0f
|
||||
@@ -14819,68 +14823,86 @@ static void test_depth_bias(void)
|
||||
@@ -15079,68 +15083,86 @@ static void test_depth_bias(void)
|
||||
for (j = 0; j < ARRAY_SIZE(bias_tests); ++j)
|
||||
{
|
||||
rasterizer_desc.DepthBias = bias_tests[j];
|
||||
@@ -45,12 +45,25 @@ index 50521bd..6e92c77 100644
|
||||
- ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 1.0f, 0);
|
||||
- draw_quad(&test_context);
|
||||
- switch (format)
|
||||
+
|
||||
+ for (k = 0; k < ARRAY_SIZE(bias_clamp_tests); ++k)
|
||||
{
|
||||
- {
|
||||
- case DXGI_FORMAT_D32_FLOAT:
|
||||
- bias = rasterizer_desc.DepthBias * pow(2.0f, quads[i].exponent - 23.0f);
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
-
|
||||
- check_texture_float(texture, depth, 2);
|
||||
- break;
|
||||
- case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
- r = 1.0f / 16777215.0f;
|
||||
- bias = rasterizer_desc.DepthBias * r;
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 16777215.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ for (k = 0; k < ARRAY_SIZE(bias_clamp_tests); ++k)
|
||||
+ {
|
||||
+ rasterizer_desc.DepthBiasClamp = bias_clamp_tests[k];
|
||||
+ ID3D10Device_CreateRasterizerState(device, &rasterizer_desc, &rs);
|
||||
+ ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
|
||||
@@ -66,13 +79,7 @@ index 50521bd..6e92c77 100644
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
|
||||
- check_texture_float(texture, depth, 2);
|
||||
- break;
|
||||
- case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
- r = 1.0f / 16777215.0f;
|
||||
- bias = rasterizer_desc.DepthBias * r;
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
+
|
||||
+ check_texture_float(texture, depth, 2);
|
||||
+ break;
|
||||
+ case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
@@ -83,12 +90,7 @@ index 50521bd..6e92c77 100644
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 16777215.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+
|
||||
+ get_texture_readback(texture, 0, &rb);
|
||||
+ for (y = 0; y < texture_desc.Height; ++y)
|
||||
{
|
||||
@@ -116,6 +118,12 @@ index 50521bd..6e92c77 100644
|
||||
- r = 1.0f / 65535.0f;
|
||||
- bias = rasterizer_desc.DepthBias * r;
|
||||
- depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
-
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 65535.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+ release_resource_readback(&rb);
|
||||
+ break;
|
||||
+ case DXGI_FORMAT_D16_UNORM:
|
||||
@@ -126,12 +134,7 @@ index 50521bd..6e92c77 100644
|
||||
+ if (rasterizer_desc.DepthBiasClamp < 0)
|
||||
+ bias = max(bias, rasterizer_desc.DepthBiasClamp);
|
||||
+ depth = min(max(0.0f, quads[i].z + bias), 1.0f);
|
||||
|
||||
- get_texture_readback(texture, 0, &rb);
|
||||
- for (y = 0; y < texture_desc.Height; ++y)
|
||||
- {
|
||||
- expected_value = depth * 65535.0f + 0.5f;
|
||||
- for (x = 0; x < texture_desc.Width; ++x)
|
||||
+
|
||||
+ get_texture_readback(texture, 0, &rb);
|
||||
+ for (y = 0; y < texture_desc.Height; ++y)
|
||||
{
|
||||
@@ -171,5 +174,5 @@ index 50521bd..6e92c77 100644
|
||||
{
|
||||
for (j = 0; j < ARRAY_SIZE(vertices); ++j)
|
||||
--
|
||||
2.7.4
|
||||
2.18.0
|
||||
|
||||
|
@@ -1,159 +0,0 @@
|
||||
From d7c4217174337d31778a5582b71b8c98e8a55852 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 28 Feb 2016 05:02:48 +0100
|
||||
Subject: ddraw: Accept d3d1 and d3d2 versions of D3DFINDDEVICERESULT in
|
||||
IDirect3D_FindDevice.
|
||||
|
||||
---
|
||||
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 782b6b5..0d2ec53 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -3992,8 +3992,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)
|
||||
@@ -4022,8 +4022,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 06f16f3..12db306 100644
|
||||
--- a/dlls/ddraw/tests/d3d.c
|
||||
+++ b/dlls/ddraw/tests/d3d.c
|
||||
@@ -3211,6 +3211,8 @@ static void FindDevice(void)
|
||||
|
||||
D3DFINDDEVICESEARCH search = {0};
|
||||
D3DFINDDEVICERESULT result = {0};
|
||||
+ D3DFINDDEVICERESULT1 result1 = {0};
|
||||
+ D3DFINDDEVICERESULT2 result2 = {0};
|
||||
IDirect3DDevice *d3dhal;
|
||||
HRESULT hr;
|
||||
int i;
|
||||
@@ -3251,6 +3253,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;
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: Accept d3d1 and d3d2 versions of D3DFINDDEVICERESULT in IDirect3D_FindDevice
|
@@ -1,4 +1,4 @@
|
||||
From 25c2a52b1109022a01b8f59a22b8a04566af0d3c Mon Sep 17 00:00:00 2001
|
||||
From 82d0d3038097d3410feb4e405e4b9f8cd9ced21d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@@ -12,10 +12,10 @@ Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index ed904785dd..47f079fb97 100644
|
||||
index 37e44e8..a740995 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1542,6 +1542,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -1544,6 +1544,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
@@ -25,10 +25,10 @@ index ed904785dd..47f079fb97 100644
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index d4fe1f294a..29d9d3afb7 100644
|
||||
index ee4fa5b..c7b992e 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -11538,6 +11538,31 @@ static void test_execute_data(void)
|
||||
@@ -11539,6 +11539,31 @@ static void test_execute_data(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -60,19 +60,19 @@ index d4fe1f294a..29d9d3afb7 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -11815,6 +11840,7 @@ START_TEST(ddraw1)
|
||||
@@ -11973,6 +11998,7 @@ START_TEST(ddraw1)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
+ test_caps();
|
||||
test_execute_data();
|
||||
test_viewport();
|
||||
}
|
||||
test_find_device();
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 941d46bf42..752b39568d 100644
|
||||
index 9394705..bc213db 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -12800,6 +12800,31 @@ static void test_enum_surfaces(void)
|
||||
@@ -12801,6 +12801,31 @@ static void test_enum_surfaces(void)
|
||||
IDirectDraw2_Release(ddraw);
|
||||
}
|
||||
|
||||
@@ -104,19 +104,20 @@ index 941d46bf42..752b39568d 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -13106,5 +13131,6 @@ START_TEST(ddraw2)
|
||||
@@ -13264,6 +13289,7 @@ START_TEST(ddraw2)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
+ test_caps();
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index e81472d4f2..4e083ec503 100644
|
||||
index 6a3630a..1c9acf8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -15089,6 +15089,31 @@ static void test_viewport(void)
|
||||
DestroyWindow(window);
|
||||
@@ -15247,6 +15247,31 @@ static void test_find_device(void)
|
||||
IDirectDraw4_Release(ddraw);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@@ -147,14 +148,16 @@ index e81472d4f2..4e083ec503 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -15215,4 +15240,5 @@ START_TEST(ddraw4)
|
||||
@@ -15372,6 +15397,7 @@ START_TEST(ddraw4)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
+ test_caps();
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index 70318a8492..f3dde436d3 100644
|
||||
index 70318a8..f3dde43 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -15035,6 +15035,31 @@ static void test_color_vertex(void)
|
||||
@@ -197,5 +200,5 @@ index 70318a8492..f3dde436d3 100644
|
||||
test_color_vertex();
|
||||
}
|
||||
--
|
||||
2.18.0
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,405 +0,0 @@
|
||||
From b545fa3045a535c75e0611ca6c80b43e5dde57d5 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 30 Jul 2018 09:33:29 +1000
|
||||
Subject: [PATCH] dinput8: Use shared source directory.
|
||||
|
||||
Based off a patch by Andrew Wesie.
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dinput/Makefile.in | 1 +
|
||||
dlls/dinput/dinput_main.c | 63 +++++++++++
|
||||
dlls/dinput8/Makefile.in | 17 ++-
|
||||
dlls/dinput8/dinput8_main.c | 247 --------------------------------------------
|
||||
4 files changed, 79 insertions(+), 249 deletions(-)
|
||||
delete mode 100644 dlls/dinput8/dinput8_main.c
|
||||
|
||||
diff --git a/dlls/dinput/Makefile.in b/dlls/dinput/Makefile.in
|
||||
index 5d287a3..b1107ee 100644
|
||||
--- a/dlls/dinput/Makefile.in
|
||||
+++ b/dlls/dinput/Makefile.in
|
||||
@@ -1,6 +1,7 @@
|
||||
MODULE = dinput.dll
|
||||
IMPORTLIB = dinput
|
||||
IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32
|
||||
+EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700
|
||||
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
|
||||
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c
|
||||
index e4538a0..d42a826 100644
|
||||
--- a/dlls/dinput/dinput_main.c
|
||||
+++ b/dlls/dinput/dinput_main.c
|
||||
@@ -164,6 +164,60 @@ HRESULT WINAPI DirectInputCreateEx(
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
+#if DIRECTINPUT_VERSION == 0x0800
|
||||
+/******************************************************************************
|
||||
+ * DirectInput8Create (DINPUT8.@)
|
||||
+ */
|
||||
+HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI, LPUNKNOWN punkOuter)
|
||||
+{
|
||||
+ IDirectInputImpl *This;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p)\n", hinst, dwVersion, debugstr_guid(riid), punkOuter);
|
||||
+
|
||||
+ if (!ppDI)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ if (!IsEqualGUID(&IID_IDirectInput8A, riid) &&
|
||||
+ !IsEqualGUID(&IID_IDirectInput8W, riid) &&
|
||||
+ !IsEqualGUID(&IID_IUnknown, riid))
|
||||
+ {
|
||||
+ *ppDI = NULL;
|
||||
+ return DIERR_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ hr = create_directinput_instance(riid, ppDI, &This);
|
||||
+
|
||||
+ if (FAILED(hr)) {
|
||||
+ ERR("CoCreateInstance failed with hr = 0x%08x\n", hr);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ /* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */
|
||||
+ if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8A, riid)) {
|
||||
+ hr = IDirectInput8_Initialize(&This->IDirectInput8A_iface, hinst, dwVersion);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectInput8_Release(&This->IDirectInput8A_iface);
|
||||
+ *ppDI = NULL;
|
||||
+ return hr;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8W, riid)) {
|
||||
+ hr = IDirectInput8_Initialize(&This->IDirectInput8W_iface, hinst, dwVersion);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectInput8_Release(&This->IDirectInput8W_iface);
|
||||
+ *ppDI = NULL;
|
||||
+ return hr;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/******************************************************************************
|
||||
* DirectInputCreateA (DINPUT.@)
|
||||
*/
|
||||
@@ -1513,6 +1567,7 @@ static HRESULT WINAPI DICF_CreateInstance(
|
||||
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
|
||||
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
+#if DIRECTINPUT_VERSION < 0x0800
|
||||
if ( IsEqualGUID( &IID_IUnknown, riid ) ||
|
||||
IsEqualGUID( &IID_IDirectInputA, riid ) ||
|
||||
IsEqualGUID( &IID_IDirectInputW, riid ) ||
|
||||
@@ -1522,6 +1577,13 @@ static HRESULT WINAPI DICF_CreateInstance(
|
||||
IsEqualGUID( &IID_IDirectInput7W, riid ) ) {
|
||||
return create_directinput_instance(riid, ppobj, NULL);
|
||||
}
|
||||
+#else
|
||||
+ if( IsEqualGUID( &IID_IDirectInput8A, riid ) ||
|
||||
+ IsEqualGUID( &IID_IDirectInput8W, riid ) ||
|
||||
+ IsEqualGUID( &IID_IUnknown, riid )) {
|
||||
+ return create_directinput_instance(riid, ppobj, NULL);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
FIXME("(%p,%p,%s,%p) Interface not found!\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
return E_NOINTERFACE;
|
||||
@@ -1833,3 +1895,4 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
+
|
||||
diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in
|
||||
index 26672ae..6b62969 100644
|
||||
--- a/dlls/dinput8/Makefile.in
|
||||
+++ b/dlls/dinput8/Makefile.in
|
||||
@@ -1,9 +1,22 @@
|
||||
MODULE = dinput8.dll
|
||||
IMPORTLIB = dinput8
|
||||
-IMPORTS = uuid dxguid dinput ole32 advapi32
|
||||
+IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32
|
||||
+EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800
|
||||
+EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
|
||||
+PARENTSRC = ../dinput
|
||||
|
||||
C_SRCS = \
|
||||
- dinput8_main.c
|
||||
+ config.c \
|
||||
+ data_formats.c \
|
||||
+ device.c \
|
||||
+ dinput_main.c \
|
||||
+ effect_linuxinput.c \
|
||||
+ joystick.c \
|
||||
+ joystick_linux.c \
|
||||
+ joystick_linuxinput.c \
|
||||
+ joystick_osx.c \
|
||||
+ keyboard.c \
|
||||
+ mouse.c
|
||||
|
||||
IDL_SRCS = dinput8.idl
|
||||
|
||||
diff --git a/dlls/dinput8/dinput8_main.c b/dlls/dinput8/dinput8_main.c
|
||||
deleted file mode 100644
|
||||
index 9824c76..0000000
|
||||
--- a/dlls/dinput8/dinput8_main.c
|
||||
+++ /dev/null
|
||||
@@ -1,247 +0,0 @@
|
||||
-/* DirectInput 8
|
||||
- *
|
||||
- * Copyright 2002 TransGaming Technologies Inc.
|
||||
- * Copyright 2006 Roderick Colenbrander
|
||||
- *
|
||||
- * This library is free software; you can redistribute it and/or
|
||||
- * modify it under the terms of the GNU Lesser General Public
|
||||
- * License as published by the Free Software Foundation; either
|
||||
- * version 2.1 of the License, or (at your option) any later version.
|
||||
- *
|
||||
- * This library is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- * Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public
|
||||
- * License along with this library; if not, write to the Free Software
|
||||
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
- */
|
||||
-
|
||||
-#include "config.h"
|
||||
-#include <assert.h>
|
||||
-#include <stdarg.h>
|
||||
-#include <string.h>
|
||||
-
|
||||
-#define COBJMACROS
|
||||
-
|
||||
-#include "wine/debug.h"
|
||||
-#include "windef.h"
|
||||
-#include "winbase.h"
|
||||
-#include "winerror.h"
|
||||
-#include "objbase.h"
|
||||
-#include "rpcproxy.h"
|
||||
-#include "dinput.h"
|
||||
-
|
||||
-WINE_DEFAULT_DEBUG_CHANNEL(dinput);
|
||||
-
|
||||
-static HINSTANCE instance;
|
||||
-static LONG dll_count;
|
||||
-
|
||||
-/*
|
||||
- * Dll lifetime tracking declaration
|
||||
- */
|
||||
-static void LockModule(void)
|
||||
-{
|
||||
- InterlockedIncrement(&dll_count);
|
||||
-}
|
||||
-
|
||||
-static void UnlockModule(void)
|
||||
-{
|
||||
- InterlockedDecrement(&dll_count);
|
||||
-}
|
||||
-
|
||||
-/******************************************************************************
|
||||
- * DirectInput8Create (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI, LPUNKNOWN punkOuter) {
|
||||
- IDirectInputA *pDI;
|
||||
- HRESULT hr, hrCo;
|
||||
-
|
||||
- TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p)\n", hinst, dwVersion, debugstr_guid(riid), punkOuter);
|
||||
-
|
||||
- if (!ppDI)
|
||||
- return E_POINTER;
|
||||
-
|
||||
- if (!IsEqualGUID(&IID_IDirectInput8A, riid) &&
|
||||
- !IsEqualGUID(&IID_IDirectInput8W, riid) &&
|
||||
- !IsEqualGUID(&IID_IUnknown, riid))
|
||||
- {
|
||||
- *ppDI = NULL;
|
||||
- return DIERR_NOINTERFACE;
|
||||
- }
|
||||
-
|
||||
- hrCo = CoInitialize(NULL);
|
||||
-
|
||||
- hr = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInputA, (void **)&pDI);
|
||||
-
|
||||
- /* Ensure balance of calls. */
|
||||
- if (SUCCEEDED(hrCo))
|
||||
- CoUninitialize();
|
||||
-
|
||||
- if (FAILED(hr)) {
|
||||
- ERR("CoCreateInstance failed with hr = 0x%08x\n", hr);
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- hr = IDirectInput_QueryInterface(pDI, riid, ppDI);
|
||||
- IDirectInput_Release(pDI);
|
||||
-
|
||||
- if (FAILED(hr))
|
||||
- return hr;
|
||||
-
|
||||
- /* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */
|
||||
- if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8A, riid)) {
|
||||
- IDirectInput8A *DI = *ppDI;
|
||||
-
|
||||
- hr = IDirectInput8_Initialize(DI, hinst, dwVersion);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- IDirectInput8_Release(DI);
|
||||
- *ppDI = NULL;
|
||||
- return hr;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8W, riid)) {
|
||||
- IDirectInput8W *DI = *ppDI;
|
||||
-
|
||||
- hr = IDirectInput8_Initialize(DI, hinst, dwVersion);
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- IDirectInput8_Release(DI);
|
||||
- *ppDI = NULL;
|
||||
- return hr;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
-/*******************************************************************************
|
||||
- * DirectInput8 ClassFactory
|
||||
- */
|
||||
-typedef struct
|
||||
-{
|
||||
- /* IUnknown fields */
|
||||
- IClassFactory IClassFactory_iface;
|
||||
-} IClassFactoryImpl;
|
||||
-
|
||||
-static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||
-{
|
||||
- return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
||||
- IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
- FIXME("%p %s %p\n",This,debugstr_guid(riid),ppobj);
|
||||
- return E_NOINTERFACE;
|
||||
-}
|
||||
-
|
||||
-static ULONG WINAPI DI8CF_AddRef(LPCLASSFACTORY iface) {
|
||||
- LockModule();
|
||||
- return 2;
|
||||
-}
|
||||
-
|
||||
-static ULONG WINAPI DI8CF_Release(LPCLASSFACTORY iface) {
|
||||
- UnlockModule();
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) {
|
||||
- IClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||
-
|
||||
- TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
- if( IsEqualGUID( &IID_IDirectInput8A, riid ) || IsEqualGUID( &IID_IDirectInput8W, riid ) || IsEqualGUID( &IID_IUnknown, riid )) {
|
||||
- IDirectInputA *ppDI;
|
||||
- HRESULT hr;
|
||||
-
|
||||
- hr = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInputA, (void **)&ppDI);
|
||||
- if (FAILED(hr))
|
||||
- return hr;
|
||||
-
|
||||
- hr = IDirectInput_QueryInterface(ppDI, riid, ppobj);
|
||||
- IDirectInput_Release(ppDI);
|
||||
-
|
||||
- return hr;
|
||||
- }
|
||||
-
|
||||
- ERR("(%p,%p,%s,%p) Interface not found!\n",This,pOuter,debugstr_guid(riid),ppobj);
|
||||
- return E_NOINTERFACE;
|
||||
-}
|
||||
-
|
||||
-static HRESULT WINAPI DI8CF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
||||
- TRACE("(%p)->(%d)\n", iface, dolock);
|
||||
-
|
||||
- if(dolock)
|
||||
- LockModule();
|
||||
- else
|
||||
- UnlockModule();
|
||||
-
|
||||
- return S_OK;
|
||||
-}
|
||||
-
|
||||
-static const IClassFactoryVtbl DI8CF_Vtbl = {
|
||||
- DI8CF_QueryInterface,
|
||||
- DI8CF_AddRef,
|
||||
- DI8CF_Release,
|
||||
- DI8CF_CreateInstance,
|
||||
- DI8CF_LockServer
|
||||
-};
|
||||
-static IClassFactoryImpl DINPUT8_CF = { { &DI8CF_Vtbl } };
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllCanUnloadNow (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllCanUnloadNow(void)
|
||||
-{
|
||||
- return dll_count == 0 ? S_OK : S_FALSE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllGetClassObject (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
-{
|
||||
- TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
- if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) {
|
||||
- *ppv = &DINPUT8_CF;
|
||||
- IClassFactory_AddRef((IClassFactory*)*ppv);
|
||||
- return S_OK;
|
||||
- }
|
||||
-
|
||||
- FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
- return CLASS_E_CLASSNOTAVAILABLE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllMain
|
||||
- */
|
||||
-BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv)
|
||||
-{
|
||||
- switch (reason)
|
||||
- {
|
||||
- case DLL_PROCESS_ATTACH:
|
||||
- instance = hInstDLL;
|
||||
- DisableThreadLibraryCalls( hInstDLL );
|
||||
- break;
|
||||
- }
|
||||
- return TRUE;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllRegisterServer (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllRegisterServer(void)
|
||||
-{
|
||||
- return __wine_register_resources( instance );
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
- * DllUnregisterServer (DINPUT8.@)
|
||||
- */
|
||||
-HRESULT WINAPI DllUnregisterServer(void)
|
||||
-{
|
||||
- return __wine_unregister_resources( instance );
|
||||
-}
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [45568] League of Legends 8.12+ fails to start a game (anticheat engine, validation of loaded DLLs)
|
@@ -1,16 +1,16 @@
|
||||
From ac234f708a63cbbf13d4b2894c15d072bcd27cdd Mon Sep 17 00:00:00 2001
|
||||
From c6530912db59318d93b77daa1cab061ff5afadaa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 01:37:29 +0100
|
||||
Subject: [PATCH] dxgi: Implement setting and querying the gamma value of an
|
||||
output.
|
||||
|
||||
---
|
||||
dlls/dxgi/output.c | 17 +++++++++++++++--
|
||||
dlls/dxgi/tests/device.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/dxgi/output.c | 17 ++++++++++++++--
|
||||
dlls/dxgi/tests/dxgi.c | 45 ++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 60 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
|
||||
index 2b168fb..31bdf9a 100644
|
||||
index 2b168fb627b..31bdf9a3805 100644
|
||||
--- a/dlls/dxgi/output.c
|
||||
+++ b/dlls/dxgi/output.c
|
||||
@@ -293,9 +293,22 @@ static void STDMETHODCALLTYPE dxgi_output_ReleaseOwnership(IDXGIOutput4 *iface)
|
||||
@@ -38,11 +38,11 @@ index 2b168fb..31bdf9a 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE dxgi_output_SetGammaControl(IDXGIOutput4 *iface,
|
||||
diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
|
||||
index 8ad4935..8007c49 100644
|
||||
--- a/dlls/dxgi/tests/device.c
|
||||
+++ b/dlls/dxgi/tests/device.c
|
||||
@@ -1942,11 +1942,13 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain,
|
||||
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c
|
||||
index 56065456eb0..6bd257c6190 100644
|
||||
--- a/dlls/dxgi/tests/dxgi.c
|
||||
+++ b/dlls/dxgi/tests/dxgi.c
|
||||
@@ -2110,11 +2110,13 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain,
|
||||
static void test_set_fullscreen(void)
|
||||
{
|
||||
struct swapchain_fullscreen_state initial_state;
|
||||
@@ -56,7 +56,7 @@ index 8ad4935..8007c49 100644
|
||||
ULONG refcount;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1962,6 +1964,17 @@ static void test_set_fullscreen(void)
|
||||
@@ -2130,6 +2132,17 @@ static void test_set_fullscreen(void)
|
||||
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory);
|
||||
ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr);
|
||||
|
||||
@@ -74,7 +74,7 @@ index 8ad4935..8007c49 100644
|
||||
swapchain_desc.BufferDesc.Width = 800;
|
||||
swapchain_desc.BufferDesc.Height = 600;
|
||||
swapchain_desc.BufferDesc.RefreshRate.Numerator = 60;
|
||||
@@ -1992,6 +2005,38 @@ static void test_set_fullscreen(void)
|
||||
@@ -2160,6 +2173,38 @@ static void test_set_fullscreen(void)
|
||||
skip("Could not change fullscreen state.\n");
|
||||
goto done;
|
||||
}
|
||||
@@ -114,5 +114,5 @@ index 8ad4935..8007c49 100644
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
refcount = IDXGISwapChain_Release(swapchain);
|
||||
--
|
||||
1.9.1
|
||||
2.18.0
|
||||
|
||||
|
256
patches/hnetcfg-NATUPnP/0001-include-Add-natupnp.idl.patch
Normal file
256
patches/hnetcfg-NATUPnP/0001-include-Add-natupnp.idl.patch
Normal file
@@ -0,0 +1,256 @@
|
||||
From dec395793651dfe805fcfb7e1443a2a57fcfb4b5 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 31 Aug 2018 15:22:03 +1000
|
||||
Subject: [PATCH 1/5] include: Add natupnp.idl
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
include/Makefile.in | 1 +
|
||||
include/natupnp.idl | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 224 insertions(+)
|
||||
create mode 100644 include/natupnp.idl
|
||||
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index ffecb98..741af54 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -453,6 +453,7 @@ SOURCES = \
|
||||
msxmldid.h \
|
||||
mtxdm.h \
|
||||
multimon.h \
|
||||
+ natupnp.idl \
|
||||
nb30.h \
|
||||
ncrypt.h \
|
||||
ndrtypes.h \
|
||||
diff --git a/include/natupnp.idl b/include/natupnp.idl
|
||||
new file mode 100644
|
||||
index 0000000..9dbccf2
|
||||
--- /dev/null
|
||||
+++ b/include/natupnp.idl
|
||||
@@ -0,0 +1,223 @@
|
||||
+/*
|
||||
+ * Copyright 2018 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+import "oaidl.idl";
|
||||
+import "ocidl.idl";
|
||||
+
|
||||
+#if !defined(progid) && !defined(__WIDL__)
|
||||
+#define threading(model)
|
||||
+#define progid(str)
|
||||
+#define vi_progid(str)
|
||||
+#endif
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(6F10711F-729B-41E5-93B8-F21D0F818DF1),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IStaticPortMapping : IDispatch
|
||||
+{
|
||||
+ [propget, id(1)]
|
||||
+ HRESULT ExternalIPAddress ([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(2)]
|
||||
+ HRESULT ExternalPort([out, retval] long *value);
|
||||
+
|
||||
+ [propget, id(3)]
|
||||
+ HRESULT InternalPort([out, retval] long *value);
|
||||
+
|
||||
+ [propget, id(4)]
|
||||
+ HRESULT Protocol([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(5)]
|
||||
+ HRESULT InternalClient([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(6)]
|
||||
+ HRESULT Enabled([out, retval] VARIANT_BOOL *value);
|
||||
+
|
||||
+ [propget, id(7)]
|
||||
+ HRESULT Description([out, retval] BSTR *value);
|
||||
+
|
||||
+ [id(8)]
|
||||
+ HRESULT EditInternalClient ([in] BSTR client);
|
||||
+
|
||||
+ [id(9)]
|
||||
+ HRESULT Enable ([in] VARIANT_BOOL enable);
|
||||
+
|
||||
+ [id(10)]
|
||||
+ HRESULT EditDescription ([in] BSTR description);
|
||||
+
|
||||
+ [id(11)]
|
||||
+ HRESULT EditInternalPort ([in] long port);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(cd1f3e77-66d6-4664-82c7-36dbb641d0f1),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IStaticPortMappingCollection : IDispatch
|
||||
+{
|
||||
+ [propget, id(DISPID_NEWENUM), hidden, restricted]
|
||||
+ HRESULT _NewEnum([out, retval] IUnknown **value);
|
||||
+
|
||||
+ [propget, id(DISPID_VALUE)]
|
||||
+ HRESULT Item([in] long port, [in] BSTR protocol, [out, retval] IStaticPortMapping **mapping);
|
||||
+
|
||||
+ [propget, id(1)]
|
||||
+ HRESULT Count([out, retval] long *value);
|
||||
+
|
||||
+ [id(2)]
|
||||
+ HRESULT Remove([in] long port, [in] BSTR protocol);
|
||||
+
|
||||
+ [id(3)]
|
||||
+ HRESULT Add([in] long external, [in] BSTR protocol, [in] long internal, [in] BSTR client,
|
||||
+ [in] VARIANT_BOOL enabled, [in] BSTR description, [out, retval] IStaticPortMapping **mapping);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(4FC80282-23B6-4378-9A27-CD8F17C9400C),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IDynamicPortMapping : IDispatch
|
||||
+{
|
||||
+ [propget, id(1)]
|
||||
+ HRESULT ExternalIPAddress ([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(2)]
|
||||
+ HRESULT RemoteHost ([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(3)]
|
||||
+ HRESULT ExternalPort([out, retval] long *value);
|
||||
+
|
||||
+ [propget, id(4)]
|
||||
+ HRESULT Protocol([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(5)]
|
||||
+ HRESULT InternalPort([out, retval] long *value);
|
||||
+
|
||||
+ [propget, id(6)]
|
||||
+ HRESULT InternalClient([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(7)]
|
||||
+ HRESULT Enabled([out, retval] VARIANT_BOOL *value);
|
||||
+
|
||||
+ [propget, id(8)]
|
||||
+ HRESULT Description([out, retval] BSTR *value);
|
||||
+
|
||||
+ [propget, id(9)]
|
||||
+ HRESULT LeaseDuration([out, retval] long *value);
|
||||
+
|
||||
+ [id(10)]
|
||||
+ HRESULT RenewLease([in] long desired, [out, retval] long *duration);
|
||||
+
|
||||
+ [id(11)]
|
||||
+ HRESULT EditInternalClient ([in] BSTR client);
|
||||
+
|
||||
+ [id(12)]
|
||||
+ HRESULT Enable ([in] VARIANT_BOOL enabled);
|
||||
+
|
||||
+ [id(13)]
|
||||
+ HRESULT EditDescription ([in] BSTR description);
|
||||
+
|
||||
+ [id(14)]
|
||||
+ HRESULT EditInternalPort ([in] long port);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(b60de00f-156e-4e8d-9ec1-3a2342c10899),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IDynamicPortMappingCollection : IDispatch
|
||||
+{
|
||||
+ [propget, id(DISPID_NEWENUM), hidden, restricted]
|
||||
+ HRESULT _NewEnum([out, retval] IUnknown **value);
|
||||
+
|
||||
+ [propget, id(DISPID_VALUE)]
|
||||
+ HRESULT Item([in] BSTR host, [in] long port, [in] BSTR orotocol,
|
||||
+ [out, retval] IDynamicPortMapping **mapping);
|
||||
+
|
||||
+ [propget, id(1)]
|
||||
+ HRESULT Count([out, retval] long *value);
|
||||
+
|
||||
+ [id(2)]
|
||||
+ HRESULT Remove([in] BSTR host, [in] long port, [in] BSTR protocol);
|
||||
+
|
||||
+ [id(3)]
|
||||
+ HRESULT Add([in] BSTR host, [in] long port, [in] BSTR protocol, [in] long internal,
|
||||
+ [in] BSTR client, [in] VARIANT_BOOL enabled, [in] BSTR Description,
|
||||
+ [in] long duration, [out, retval] IDynamicPortMapping **mapping);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(624bd588-9060-4109-b0b0-1adbbcac32df),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface INATEventManager : IDispatch
|
||||
+{
|
||||
+ [id(1), propput]
|
||||
+ HRESULT ExternalIPAddressCallback ([in] IUnknown *unk);
|
||||
+
|
||||
+ [id(2), propput]
|
||||
+ HRESULT NumberOfEntriesCallback ([in] IUnknown *unk);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ object,
|
||||
+ uuid(b171c812-cc76-485a-94d8-b6b3a2794e99),
|
||||
+ dual,
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IUPnPNAT : IDispatch
|
||||
+{
|
||||
+ [propget, id(1)]
|
||||
+ HRESULT StaticPortMappingCollection ([out, retval] IStaticPortMappingCollection **collection);
|
||||
+
|
||||
+ [propget, id(2)]
|
||||
+ HRESULT DynamicPortMappingCollection ([out, retval] IDynamicPortMappingCollection **collection);
|
||||
+
|
||||
+ [propget, id(3)]
|
||||
+ HRESULT NATEventManager ([out, retval] INATEventManager **manager);
|
||||
+};
|
||||
+
|
||||
+[
|
||||
+ uuid(1c565858-f302-471e-b409-f180aa4abec6),
|
||||
+ version(1.0)
|
||||
+]
|
||||
+library NATUPNPLib
|
||||
+{
|
||||
+ importlib("stdole2.tlb");
|
||||
+
|
||||
+ [
|
||||
+ vi_progid("HNetCfg.NATUPnP"),
|
||||
+ progid("HNetCfg.NATUPnP.1"),
|
||||
+ threading(both),
|
||||
+ uuid(ae1e00aa-3fd5-403c-8a27-2bbdc30cd0e1)
|
||||
+ ]
|
||||
+ coclass UPnPNAT
|
||||
+ {
|
||||
+ [default] interface IUPnPNAT;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -0,0 +1,22 @@
|
||||
From 3b4f9505365d6803c0205c6f16f19a15bf0cc24d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 31 Aug 2018 15:32:13 +1000
|
||||
Subject: [PATCH 2/5] hnetcfg: Register NATUPnP interface
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/hnetcfg/hnetcfg_tlb.idl | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/hnetcfg/hnetcfg_tlb.idl b/dlls/hnetcfg/hnetcfg_tlb.idl
|
||||
index 33e8cc8..e368fe6 100644
|
||||
--- a/dlls/hnetcfg/hnetcfg_tlb.idl
|
||||
+++ b/dlls/hnetcfg/hnetcfg_tlb.idl
|
||||
@@ -21,3 +21,4 @@
|
||||
#pragma makedep regtypelib
|
||||
|
||||
#include "netfw.idl"
|
||||
+#include "natupnp.idl"
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -0,0 +1,284 @@
|
||||
From 12fda22718f88a772f8b389f7d85b79c91795552 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 3 Sep 2018 10:59:18 +1000
|
||||
Subject: [PATCH 3/5] hnetcfg: Support IUPnPNAT interface
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=34711
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/hnetcfg/apps.c | 4 +-
|
||||
dlls/hnetcfg/hnetcfg.c | 7 ++
|
||||
dlls/hnetcfg/hnetcfg_private.h | 2 +
|
||||
dlls/hnetcfg/manager.c | 1 +
|
||||
dlls/hnetcfg/port.c | 167 +++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 180 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/hnetcfg/apps.c b/dlls/hnetcfg/apps.c
|
||||
index e671e8c..9972468 100644
|
||||
--- a/dlls/hnetcfg/apps.c
|
||||
+++ b/dlls/hnetcfg/apps.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "winuser.h"
|
||||
#include "ole2.h"
|
||||
#include "netfw.h"
|
||||
+#include "natupnp.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
@@ -115,7 +116,8 @@ static REFIID tid_id[] =
|
||||
&IID_INetFwOpenPorts,
|
||||
&IID_INetFwPolicy,
|
||||
&IID_INetFwPolicy2,
|
||||
- &IID_INetFwProfile
|
||||
+ &IID_INetFwProfile,
|
||||
+ &IID_IUPnPNAT
|
||||
};
|
||||
|
||||
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
|
||||
diff --git a/dlls/hnetcfg/hnetcfg.c b/dlls/hnetcfg/hnetcfg.c
|
||||
index e56dbab..5cc24a1 100644
|
||||
--- a/dlls/hnetcfg/hnetcfg.c
|
||||
+++ b/dlls/hnetcfg/hnetcfg.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "objbase.h"
|
||||
#include "rpcproxy.h"
|
||||
#include "netfw.h"
|
||||
+#include "natupnp.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "hnetcfg_private.h"
|
||||
@@ -114,6 +115,8 @@ static hnetcfg_cf fw_manager_cf = { { &hnetcfg_cf_vtbl }, NetFwMgr_create };
|
||||
static hnetcfg_cf fw_app_cf = { { &hnetcfg_cf_vtbl }, NetFwAuthorizedApplication_create };
|
||||
static hnetcfg_cf fw_openport_cf = { { &hnetcfg_cf_vtbl }, NetFwOpenPort_create };
|
||||
static hnetcfg_cf fw_policy2_cf = { { &hnetcfg_cf_vtbl }, NetFwPolicy2_create };
|
||||
+static hnetcfg_cf upnpnat_cf = { { &hnetcfg_cf_vtbl }, IUPnPNAT_create };
|
||||
+
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved)
|
||||
{
|
||||
@@ -156,6 +159,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
|
||||
{
|
||||
cf = &fw_policy2_cf.IClassFactory_iface;
|
||||
}
|
||||
+ else if (IsEqualGUID( rclsid, &CLSID_UPnPNAT ))
|
||||
+ {
|
||||
+ cf = &upnpnat_cf.IClassFactory_iface;
|
||||
+ }
|
||||
|
||||
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
|
||||
return IClassFactory_QueryInterface( cf, iid, ppv );
|
||||
diff --git a/dlls/hnetcfg/hnetcfg_private.h b/dlls/hnetcfg/hnetcfg_private.h
|
||||
index 5245883..be2d0f3 100644
|
||||
--- a/dlls/hnetcfg/hnetcfg_private.h
|
||||
+++ b/dlls/hnetcfg/hnetcfg_private.h
|
||||
@@ -27,6 +27,7 @@ enum type_id
|
||||
INetFwPolicy2_tid,
|
||||
INetFwProfile_tid,
|
||||
INetFwRules_tid,
|
||||
+ IUPnPNAT_tid,
|
||||
last_tid
|
||||
};
|
||||
|
||||
@@ -42,3 +43,4 @@ HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
|
||||
HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||
HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||
HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
|
||||
+HRESULT IUPnPNAT_create(IUnknown *, void **) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/hnetcfg/manager.c b/dlls/hnetcfg/manager.c
|
||||
index 1d548b4..d3f089e 100644
|
||||
--- a/dlls/hnetcfg/manager.c
|
||||
+++ b/dlls/hnetcfg/manager.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "initguid.h"
|
||||
#include "ole2.h"
|
||||
#include "netfw.h"
|
||||
+#include "natupnp.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
diff --git a/dlls/hnetcfg/port.c b/dlls/hnetcfg/port.c
|
||||
index 7d74965..f497bcb 100644
|
||||
--- a/dlls/hnetcfg/port.c
|
||||
+++ b/dlls/hnetcfg/port.c
|
||||
@@ -27,7 +27,9 @@
|
||||
#include "winuser.h"
|
||||
#include "ole2.h"
|
||||
#include "netfw.h"
|
||||
+#include "natupnp.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "hnetcfg_private.h"
|
||||
@@ -603,3 +605,168 @@ HRESULT NetFwOpenPorts_create( IUnknown *pUnkOuter, LPVOID *ppObj )
|
||||
TRACE("returning iface %p\n", *ppObj);
|
||||
return S_OK;
|
||||
}
|
||||
+
|
||||
+typedef struct _upnpnat
|
||||
+{
|
||||
+ IUPnPNAT IUPnPNAT_iface;
|
||||
+ LONG ref;
|
||||
+} upnpnat;
|
||||
+
|
||||
+static inline upnpnat *impl_from_IUPnPNAT( IUPnPNAT *iface )
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, upnpnat, IUPnPNAT_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_QueryInterface(IUPnPNAT *iface, REFIID riid, void **object)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+
|
||||
+ TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
|
||||
+
|
||||
+ if ( IsEqualGUID( riid, &IID_IUPnPNAT ) ||
|
||||
+ IsEqualGUID( riid, &IID_IDispatch ) ||
|
||||
+ IsEqualGUID( riid, &IID_IUnknown ) )
|
||||
+ {
|
||||
+ *object = iface;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+ IUPnPNAT_AddRef( iface );
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI upnpnat_AddRef(IUPnPNAT *iface)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ return InterlockedIncrement( &This->ref );
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI upnpnat_Release(IUPnPNAT *iface)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ LONG refs = InterlockedDecrement( &This->ref );
|
||||
+ if (!refs)
|
||||
+ {
|
||||
+ heap_free( This );
|
||||
+ }
|
||||
+ return refs;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_GetTypeInfoCount(IUPnPNAT *iface, UINT *pctinfo)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+
|
||||
+ TRACE("%p %p\n", This, pctinfo);
|
||||
+ *pctinfo = 1;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_GetTypeInfo(IUPnPNAT *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+
|
||||
+ TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
|
||||
+ return get_typeinfo( IUPnPNAT_tid, ppTInfo );
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_GetIDsOfNames(IUPnPNAT *iface, REFIID riid, LPOLESTR *rgszNames,
|
||||
+ UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ ITypeInfo *typeinfo;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
|
||||
+
|
||||
+ hr = get_typeinfo( IUPnPNAT_tid, &typeinfo );
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
|
||||
+ ITypeInfo_Release( typeinfo );
|
||||
+ }
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_Invoke(IUPnPNAT *iface, DISPID dispIdMember, REFIID riid, LCID lcid,
|
||||
+ WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
|
||||
+ UINT *puArgErr)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ ITypeInfo *typeinfo;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
|
||||
+ lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
+
|
||||
+ hr = get_typeinfo( IUPnPNAT_tid, &typeinfo );
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = ITypeInfo_Invoke( typeinfo, &This->IUPnPNAT_iface, dispIdMember,
|
||||
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
|
||||
+ ITypeInfo_Release( typeinfo );
|
||||
+ }
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_get_StaticPortMappingCollection(IUPnPNAT *iface, IStaticPortMappingCollection **collection)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ FIXME("%p, %p\n", This, collection);
|
||||
+ if(collection)
|
||||
+ *collection = NULL;
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_get_DynamicPortMappingCollection(IUPnPNAT *iface, IDynamicPortMappingCollection **collection)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ FIXME("%p, %p\n", This, collection);
|
||||
+ if(collection)
|
||||
+ *collection = NULL;
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI upnpnat_get_NATEventManager(IUPnPNAT *iface, INATEventManager **manager)
|
||||
+{
|
||||
+ upnpnat *This = impl_from_IUPnPNAT( iface );
|
||||
+ FIXME("%p, %p\n", This, manager);
|
||||
+ if(manager)
|
||||
+ *manager = NULL;
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+const static IUPnPNATVtbl upnpnat_vtbl =
|
||||
+{
|
||||
+ upnpnat_QueryInterface,
|
||||
+ upnpnat_AddRef,
|
||||
+ upnpnat_Release,
|
||||
+ upnpnat_GetTypeInfoCount,
|
||||
+ upnpnat_GetTypeInfo,
|
||||
+ upnpnat_GetIDsOfNames,
|
||||
+ upnpnat_Invoke,
|
||||
+ upnpnat_get_StaticPortMappingCollection,
|
||||
+ upnpnat_get_DynamicPortMappingCollection,
|
||||
+ upnpnat_get_NATEventManager
|
||||
+};
|
||||
+
|
||||
+
|
||||
+HRESULT IUPnPNAT_create(IUnknown *outer, void **object)
|
||||
+{
|
||||
+ upnpnat *nat;
|
||||
+
|
||||
+ TRACE("(%p,%p)\n", outer, object);
|
||||
+
|
||||
+ nat = heap_alloc( sizeof(*nat) );
|
||||
+ if (!nat) return E_OUTOFMEMORY;
|
||||
+
|
||||
+ nat->IUPnPNAT_iface.lpVtbl = &upnpnat_vtbl;
|
||||
+ nat->ref = 1;
|
||||
+
|
||||
+ *object = &nat->IUPnPNAT_iface;
|
||||
+
|
||||
+ TRACE("returning iface %p\n", *object);
|
||||
+ return S_OK;
|
||||
+}
|
||||
--
|
||||
1.9.1
|
||||
|
53
patches/hnetcfg-NATUPnP/0004-hnetcfg-Linked-to-uuid.patch
Normal file
53
patches/hnetcfg-NATUPnP/0004-hnetcfg-Linked-to-uuid.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 33ff7bd1532ee29512f289d8d07c53fe7583c27c Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 3 Sep 2018 11:20:03 +1000
|
||||
Subject: [PATCH 4/5] hnetcfg: Linked to uuid
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/hnetcfg/Makefile.in | 2 +-
|
||||
dlls/hnetcfg/manager.c | 2 --
|
||||
dlls/uuid/uuid.c | 1 +
|
||||
3 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/hnetcfg/Makefile.in b/dlls/hnetcfg/Makefile.in
|
||||
index 44c9cb5..e4960ab 100644
|
||||
--- a/dlls/hnetcfg/Makefile.in
|
||||
+++ b/dlls/hnetcfg/Makefile.in
|
||||
@@ -1,5 +1,5 @@
|
||||
MODULE = hnetcfg.dll
|
||||
-IMPORTS = oleaut32 ole32 advapi32 mpr
|
||||
+IMPORTS = oleaut32 ole32 advapi32 mpr uuid
|
||||
|
||||
C_SRCS = \
|
||||
apps.c \
|
||||
diff --git a/dlls/hnetcfg/manager.c b/dlls/hnetcfg/manager.c
|
||||
index d3f089e..2d89479 100644
|
||||
--- a/dlls/hnetcfg/manager.c
|
||||
+++ b/dlls/hnetcfg/manager.c
|
||||
@@ -25,10 +25,8 @@
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
-#include "initguid.h"
|
||||
#include "ole2.h"
|
||||
#include "netfw.h"
|
||||
-#include "natupnp.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c
|
||||
index 913e99c..aa3b30c 100644
|
||||
--- a/dlls/uuid/uuid.c
|
||||
+++ b/dlls/uuid/uuid.c
|
||||
@@ -79,6 +79,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
#include "perhist.h"
|
||||
#include "netcon.h"
|
||||
#include "netfw.h"
|
||||
+#include "natupnp.h"
|
||||
#include "msctf.h"
|
||||
#include "sensevts.h"
|
||||
#include "ocmm.h"
|
||||
--
|
||||
1.9.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user