Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2020
- 79 participants
- 771 discussions
[PATCH 2/2] setupapi: Treat trailing \0 in field values same way as trailing spaces.
by Dmitry Timoshkov 11 Sep '20
by Dmitry Timoshkov 11 Sep '20
11 Sep '20
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/setupapi/parser.c | 4 ++--
dlls/setupapi/tests/parser.c | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c
index 560c2401b8..c81a712ad8 100644
--- a/dlls/setupapi/parser.c
+++ b/dlls/setupapi/parser.c
@@ -724,7 +724,7 @@ static const WCHAR *value_name_state( struct parser *parser, const WCHAR *pos )
set_state( parser, EOL_BACKSLASH );
return p;
default:
- if (!iswspace(*p)) token_end = p + 1;
+ if (*p && !iswspace(*p)) token_end = p + 1;
else
{
push_token( parser, p );
@@ -838,7 +838,7 @@ static const WCHAR *trailing_spaces_state( struct parser *parser, const WCHAR *p
set_state( parser, EOL_BACKSLASH );
return p;
}
- if (!iswspace(*p)) break;
+ if (*p && !iswspace(*p)) break;
}
pop_state( parser );
return p;
diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c
index 418b896302..08fb6c110d 100644
--- a/dlls/setupapi/tests/parser.c
+++ b/dlls/setupapi/tests/parser.c
@@ -824,21 +824,18 @@ static void test_SetupGetStringField(void)
ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
ok(ret, "SetupGetStringField error %u\n", GetLastError());
-todo_wine
ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{11111111-1234-5678-1234-567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name2", &context);
ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
ok(ret, "SetupGetStringField error %u\n", GetLastError());
-todo_wine
ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{22222222-1234-5678-1234 -567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name3", &context);
ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
ok(ret, "SetupGetStringField error %u\n", GetLastError());
-todo_wine
ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{33333333-1234-5678-1234-567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name4", &context);
--
2.26.2
1
0
[PATCH 1/2] setupapi/tests: Add some tests for SetupGetStringField with strings with embedded \0.
by Dmitry Timoshkov 11 Sep '20
by Dmitry Timoshkov 11 Sep '20
11 Sep '20
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/setupapi/tests/parser.c | 78 +++++++++++++++++++++++++++++++-----
1 file changed, 69 insertions(+), 9 deletions(-)
diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c
index 06c674aa16..418b896302 100644
--- a/dlls/setupapi/tests/parser.c
+++ b/dlls/setupapi/tests/parser.c
@@ -71,13 +71,14 @@ static const char tmpfilename[] = ".\\tmp.inf";
"verybig=" A1200 "\n"
/* create a new file with specified contents and open it */
-static HINF test_file_contents( const char *data, UINT *err_line )
+static HINF test_file_contents( const char *data, int size, UINT *err_line )
{
DWORD res;
HANDLE handle = CreateFileA( tmpfilename, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0 );
if (handle == INVALID_HANDLE_VALUE) return 0;
- if (!WriteFile( handle, data, strlen(data), &res, NULL )) trace( "write error\n" );
+ if (size < 0) size = strlen(data);
+ if (!WriteFile( handle, data, size, &res, NULL )) trace( "write error\n" );
CloseHandle( handle );
return SetupOpenInfFileA( tmpfilename, 0, INF_STYLE_WIN4, err_line );
}
@@ -159,7 +160,7 @@ static void test_invalid_files(void)
{
SetLastError( 0xdeadbeef );
err_line = 0xdeadbeef;
- hinf = test_file_contents( invalid_files[i].data, &err_line );
+ hinf = test_file_contents( invalid_files[i].data, -1, &err_line );
err = GetLastError();
trace( "hinf=%p err=0x%x line=%d\n", hinf, err, err_line );
if (invalid_files[i].error) /* should fail */
@@ -233,7 +234,7 @@ static void test_section_names(void)
for (i = 0; i < ARRAY_SIZE(section_names); i++)
{
SetLastError( 0xdeadbeef );
- hinf = test_file_contents( section_names[i].data, &err_line );
+ hinf = test_file_contents( section_names[i].data, -1, &err_line );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() );
if (hinf == INVALID_HANDLE_VALUE) continue;
@@ -273,7 +274,7 @@ static void test_enum_sections(void)
return;
}
- hinf = test_file_contents( contents, &err );
+ hinf = test_file_contents( contents, -1, &err );
ok( hinf != NULL, "Expected valid INF file\n" );
for (index = 0; ; index++)
@@ -424,7 +425,7 @@ static void test_key_names(void)
strcpy( buffer, STD_HEADER "[Test]\n" );
strcat( buffer, key_names[i].data );
SetLastError( 0xdeadbeef );
- hinf = test_file_contents( buffer, &err_line );
+ hinf = test_file_contents( buffer, -1, &err_line );
ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() );
if (hinf == INVALID_HANDLE_VALUE) continue;
@@ -560,7 +561,7 @@ static void test_pSetupGetField(void)
unicode = FALSE;
}
- hinf = test_file_contents( contents, &err );
+ hinf = test_file_contents( contents, -1, &err );
ok( hinf != NULL, "Expected valid INF file\n" );
ret = SetupFindFirstLineA( hinf, "FileBranchInfo", NULL, &context );
@@ -651,7 +652,7 @@ static void test_SetupGetIntField(void)
strcat( buffer, keys[i].key );
strcat( buffer, "=" );
strcat( buffer, keys[i].fields );
- hinf = test_file_contents( buffer, &err);
+ hinf = test_file_contents( buffer, -1, &err);
ok( hinf != NULL, "Expected valid INF file\n" );
SetupFindFirstLineA( hinf, "TestSection", keys[i].key, &context );
@@ -695,7 +696,7 @@ static void test_GLE(void)
int bufsize = MAX_INF_STRING_LENGTH;
DWORD retsize;
- hinf = test_file_contents( inf, &err );
+ hinf = test_file_contents( inf, -1, &err );
ok( hinf != NULL, "Expected valid INF file\n" );
SetLastError(0xdeadbeef);
@@ -791,6 +792,64 @@ static void test_GLE(void)
SetupCloseInfFile( hinf );
}
+static void test_SetupGetStringField(void)
+{
+ static const char infdata[] =
+ "[Version]\n"
+ "Signature=\"$CHICAGO$\"\n"
+ "[MSIinstaller]\n"
+ "Name1 = \"%COMPANY_NAME%.Admin\\InstallerData\\%PRODUCT_NAME%\\%VersionString%_%ProductCode1%\\Sources\\%SETUP_NAME%\"\n"
+ "Name2 = \"%COMPANY_NAME%.Admin\\InstallerData\\%PRODUCT_NAME%\\%VersionString%_%ProductCode2%\\Sources\\%SETUP_NAME%\"\n"
+ "Name3 = \"%COMPANY_NAME%.Admin\\InstallerData\\%PRODUCT_NAME%\\%VersionString%_%ProductCode3%\\Sources\\%SETUP_NAME%\"\n"
+ "Name4 = \"%COMPANY_NAME%.Admin\\InstallerData\\%PRODUCT_NAME%\\%VersionString2%_%ProductCode4%\\Sources\\%SETUP_NAME%\"\n"
+ "[Strings]\n"
+ "VersionString=1.2.3.45678\0\n"
+ "VersionString2=1.2.3.45678 \n"
+ "ProductCode1={11111111-1234-5678-1234-567812345678}\0\n"
+ "ProductCode2={22222222-1234-5678-1234\0-567812345678}\0\n"
+ "ProductCode3={33333333-1234-5678-1234-567812345678} \0\n"
+ "ProductCode4={44444444-1234-5678-1234-567812345678} \n"
+ "COMPANY_NAME = \"Company Name\"\n"
+ "PRODUCT_NAME = \"Product Name\"\n"
+ "SETUP_NAME = \"Setup.msi\"\n";
+ HINF hinf;
+ UINT err, ret;
+ INFCONTEXT context;
+ char buf[MAX_INF_STRING_LENGTH];
+
+ hinf = test_file_contents(infdata, sizeof(infdata), &err);
+ ok(hinf != NULL, "Expected valid INF file\n");
+
+ ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name1", &context);
+ ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
+ ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
+ ok(ret, "SetupGetStringField error %u\n", GetLastError());
+todo_wine
+ ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{11111111-1234-5678-1234-567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
+
+ ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name2", &context);
+ ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
+ ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
+ ok(ret, "SetupGetStringField error %u\n", GetLastError());
+todo_wine
+ ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{22222222-1234-5678-1234 -567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
+
+ ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name3", &context);
+ ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
+ ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
+ ok(ret, "SetupGetStringField error %u\n", GetLastError());
+todo_wine
+ ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{33333333-1234-5678-1234-567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
+
+ ret = SetupFindFirstLineA(hinf, "MSIinstaller", "Name4", &context);
+ ok(ret, "SetupFindFirstLine error %u\n", GetLastError());
+ ret = SetupGetStringFieldA(&context, 1, buf, sizeof(buf), NULL);
+ ok(ret, "SetupGetStringField error %u\n", GetLastError());
+ ok(!strcmp(buf, "Company Name.Admin\\InstallerData\\Product Name\\1.2.3.45678_{44444444-1234-5678-1234-567812345678}\\Sources\\Setup.msi"), "got %s\n", wine_dbgstr_a(buf));
+
+ SetupCloseInfFile(hinf);
+}
+
START_TEST(parser)
{
init_function_pointers();
@@ -801,6 +860,7 @@ START_TEST(parser)
test_close_inf_file();
test_pSetupGetField();
test_SetupGetIntField();
+ test_SetupGetStringField();
test_GLE();
DeleteFileA( tmpfilename );
}
--
2.26.2
1
0
[PATCH 3/3] include: Remove interfaces already define in msxml6.idl
by Alistair Leslie-Hughes 11 Sep '20
by Alistair Leslie-Hughes 11 Sep '20
11 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/msxml3/tests/schema.c | 5 ++
dlls/msxml3/uuid.c | 11 ++++
include/msxml2.idl | 109 -------------------------------------
3 files changed, 16 insertions(+), 109 deletions(-)
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
index 4637d62f8b..805f05cb71 100644
--- a/dlls/msxml3/tests/schema.c
+++ b/dlls/msxml3/tests/schema.c
@@ -32,6 +32,11 @@
#include "dispex.h"
#include "cguid.h"
+DEFINE_GUID(CLSID_MXXMLWriter60, 0x88d96a0f, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXAttributes60, 0x88d96a0e, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XMLSchemaCache60, 0x88d96a07, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+
#include "wine/test.h"
#define EXPECT_HR(hr,hr_exp) \
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
index 4abbe5e476..333d4f3d3c 100644
--- a/dlls/msxml3/uuid.c
+++ b/dlls/msxml3/uuid.c
@@ -41,6 +41,17 @@
#include "initguid.h"
#include "msxml2.h"
+/* Cannot include msxml6 here since we will get a duplicate LIBID_MSXML2 error. */
+DEFINE_GUID(CLSID_FreeThreadedDOMDocument60, 0x88d96a06, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_MXNamespaceManager60, 0x88d96a11, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_MXXMLWriter60, 0x88d96a0f, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXAttributes60, 0x88d96a0e, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XMLHTTP60, 0x88d96a0a, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XMLSchemaCache60, 0x88d96a07, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
+
/*
* Note that because of a #define in msxml2.h, we end up initializing
* CLSID_DOMDocument2 to be the v.3 version independent DOMDocument
diff --git a/include/msxml2.idl b/include/msxml2.idl
index 9bf840fb5a..c7d701ea65 100644
--- a/include/msxml2.idl
+++ b/include/msxml2.idl
@@ -1608,15 +1608,6 @@ coclass FreeThreadedDOMDocument40
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(88d96a06-f192-11d4-a65f-0040963251e5),
-]
-coclass FreeThreadedDOMDocument60
-{
- [default] interface IXMLDOMDocument3;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("Free threaded XML DOM Document"),
progid("Msxml2.FreeThreadedDOMDocument"),
@@ -1658,14 +1649,6 @@ coclass XMLHTTP40
[default] interface IXMLHTTPRequest;
}
-[
- uuid(88d96a0a-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLHTTP60
-{
- [default] interface IXMLHTTPRequest;
-}
-
[
helpstring("XML HTTP"),
progid("Msxml2.XMLHTTP"),
@@ -1698,14 +1681,6 @@ coclass ServerXMLHTTP40
[default] interface IServerXMLHTTPRequest2;
}
-[
- uuid(88d96a0b-f192-11d4-a65f-0040963251e5)
-]
-coclass ServerXMLHTTP60
-{
- [default] interface IServerXMLHTTPRequest2;
-}
-
[
helpstring("Server XML HTTP"),
progid("Msxml2.ServerXMLHTTP"),
@@ -1746,14 +1721,6 @@ coclass XMLSchemaCache40
[default] interface IXMLDOMSchemaCollection2;
}
-[
- uuid(88d96a07-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLSchemaCache60
-{
- [default] interface IXMLDOMSchemaCollection2;
-}
-
[
helpstring("XML Schema Cache"),
progid("Msxml2.XMLSchemaCache"),
@@ -1794,14 +1761,6 @@ coclass XSLTemplate40
[default] interface IXSLTemplate;
}
-[
- uuid(88d96a08-f192-11d4-a65f-0040963251e5)
-]
-coclass XSLTemplate60
-{
- [default] interface IXSLTemplate;
-}
-
[
helpstring("XSL Template"),
progid("Msxml2.XSLTemplate"),
@@ -3293,15 +3252,6 @@ coclass SAXXMLReader40
interface ISAXXMLReader;
}
-[
- uuid(88d96a0c-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXXMLReader60
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
-}
-
[
helpstring("SAX XML Reader"),
progid("Msxml2.SAXXMLReader"),
@@ -3376,26 +3326,6 @@ coclass MXHTMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a10-f192-11d4-a65f-0040963251e5)
-]
-coclass MXHTMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter 3.0"),
progid("Msxml2.MXXMLWriter.3.0"),
@@ -3440,26 +3370,6 @@ coclass MXXMLWriter40
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d96a0f-f192-11d4-a65f-0040963251e5)
-]
-coclass MXXMLWriter60
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter"),
progid("Msxml2.MXXMLWriter"),
@@ -3502,15 +3412,6 @@ coclass MXNamespaceManager40
interface IMXNamespaceManager;
}
-[
- uuid(88d96a11-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager60
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
[
helpstring("SAXAttributes 3.0"),
progid("Msxml2.SAXAttributes.3.0"),
@@ -3535,16 +3436,6 @@ coclass SAXAttributes40
interface ISAXAttributes;
}
-[
- uuid(88d96a0e-f192-11d4-a65f-0040963251e5)
-]
-coclass SAXAttributes60
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
[
helpstring("SAXAttributes"),
progid("Msxml2.SAXAttributes"),
--
2.28.0
1
0
11 Sep '20
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/mshtml/xmlhttprequest.c | 2 +-
dlls/msxml3/attribute.c | 1 +
dlls/msxml3/bsc.c | 1 +
dlls/msxml3/cdata.c | 1 +
dlls/msxml3/comment.c | 1 +
dlls/msxml3/dispex.c | 1 +
dlls/msxml3/docfrag.c | 1 +
dlls/msxml3/doctype.c | 1 +
dlls/msxml3/domdoc.c | 1 +
dlls/msxml3/domimpl.c | 1 +
dlls/msxml3/element.c | 1 +
dlls/msxml3/entityref.c | 1 +
dlls/msxml3/factory.c | 1 +
dlls/msxml3/httprequest.c | 1 +
dlls/msxml3/main.c | 1 +
dlls/msxml3/mxnamespace.c | 1 +
dlls/msxml3/mxwriter.c | 2 +-
dlls/msxml3/node.c | 1 +
dlls/msxml3/nodelist.c | 1 +
dlls/msxml3/nodemap.c | 1 +
dlls/msxml3/parseerror.c | 1 +
dlls/msxml3/pi.c | 1 +
dlls/msxml3/saxreader.c | 1 +
dlls/msxml3/schema.c | 1 +
dlls/msxml3/selection.c | 1 +
dlls/msxml3/stylesheet.c | 1 +
dlls/msxml3/tests/saxreader.c | 1 +
dlls/msxml3/text.c | 1 +
dlls/msxml3/xmldoc.c | 1 +
dlls/msxml3/xmlelem.c | 1 +
dlls/msxml3/xmlparser.c | 1 +
dlls/msxml3/xmlview.c | 1 +
include/msxml6.idl | 390 ----------------------------------
33 files changed, 32 insertions(+), 392 deletions(-)
diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c
index 80d09d9632..fc8a69b15b 100644
--- a/dlls/mshtml/xmlhttprequest.c
+++ b/dlls/mshtml/xmlhttprequest.c
@@ -31,7 +31,7 @@
#include "mshtml_private.h"
#include "htmlevent.h"
#include "initguid.h"
-#include "msxml6.h"
+#include "msxml2.h"
#include "objsafe.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
index c303969bc3..80252c7614 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -33,6 +33,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c
index 5cebe09333..a07c972be1 100644
--- a/dlls/msxml3/bsc.c
+++ b/dlls/msxml3/bsc.c
@@ -31,6 +31,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wininet.h"
#include "urlmon.h"
diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c
index c255b1b18b..c1456f84b5 100644
--- a/dlls/msxml3/cdata.c
+++ b/dlls/msxml3/cdata.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c
index 0317c4fc2d..fdedb21f7d 100644
--- a/dlls/msxml3/comment.c
+++ b/dlls/msxml3/comment.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c
index b1fb72847e..9858ddc0e8 100644
--- a/dlls/msxml3/dispex.c
+++ b/dlls/msxml3/dispex.c
@@ -31,6 +31,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml6did.h"
#include "wininet.h"
diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c
index b2dd3e5dec..8edd438731 100644
--- a/dlls/msxml3/docfrag.c
+++ b/dlls/msxml3/docfrag.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/doctype.c b/dlls/msxml3/doctype.c
index 79d74d9fcd..1584f181cf 100644
--- a/dlls/msxml3/doctype.c
+++ b/dlls/msxml3/doctype.c
@@ -33,6 +33,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 8d45c546fb..667622a43d 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -40,6 +40,7 @@
#include "winnls.h"
#include "ole2.h"
#include "olectl.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wininet.h"
#include "winreg.h"
diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c
index 74223d5d54..80fb789638 100644
--- a/dlls/msxml3/domimpl.c
+++ b/dlls/msxml3/domimpl.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c
index ecebd39fea..6587b70b53 100644
--- a/dlls/msxml3/element.c
+++ b/dlls/msxml3/element.c
@@ -33,6 +33,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c
index 5d5d424f25..5aeb944f15 100644
--- a/dlls/msxml3/entityref.c
+++ b/dlls/msxml3/entityref.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index 445cfbf730..b8452ff4b4 100644
--- a/dlls/msxml3/factory.c
+++ b/dlls/msxml3/factory.c
@@ -35,6 +35,7 @@
#include "ole2.h"
#include "msxml.h"
#include "msxml2.h"
+#include "msxml6.h"
#include "xmlparser.h"
/* undef the #define in msxml2 so that we can access the v.2 version
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 7286eb97bb..c02add35e1 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -39,6 +39,7 @@
#include "winuser.h"
#include "ole2.h"
#include "mshtml.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "objsafe.h"
#include "docobj.h"
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index ec204aeb3b..0e99f19541 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -51,6 +51,7 @@
#include "ole2.h"
#include "rpcproxy.h"
#include "msxml.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wine/unicode.h"
diff --git a/dlls/msxml3/mxnamespace.c b/dlls/msxml3/mxnamespace.c
index dc6ff9c85a..612b17f6e5 100644
--- a/dlls/msxml3/mxnamespace.c
+++ b/dlls/msxml3/mxnamespace.c
@@ -33,6 +33,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c
index 029e9aac0d..dc211ab9dc 100644
--- a/dlls/msxml3/mxwriter.c
+++ b/dlls/msxml3/mxwriter.c
@@ -30,7 +30,7 @@
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
-
+#include "msxml2.h"
#include "msxml6.h"
#include "wine/debug.h"
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 35777d6591..0034923ebe 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -49,6 +49,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/nodelist.c b/dlls/msxml3/nodelist.c
index 2c1d10efb6..714fbd8921 100644
--- a/dlls/msxml3/nodelist.c
+++ b/dlls/msxml3/nodelist.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml2did.h"
diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c
index a9fef4769d..a0c5cf2d30 100644
--- a/dlls/msxml3/nodemap.c
+++ b/dlls/msxml3/nodemap.c
@@ -33,6 +33,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml2did.h"
diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c
index 2ca0885708..e9f5407647 100644
--- a/dlls/msxml3/parseerror.c
+++ b/dlls/msxml3/parseerror.c
@@ -34,6 +34,7 @@
#include "winerror.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c
index cea9570808..04771c3596 100644
--- a/dlls/msxml3/pi.c
+++ b/dlls/msxml3/pi.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index fc27260cc2..000be7f21d 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -35,6 +35,7 @@
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wininet.h"
#include "urlmon.h"
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index e385b9b563..c2d1fd8845 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -42,6 +42,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wine/debug.h"
diff --git a/dlls/msxml3/selection.c b/dlls/msxml3/selection.c
index 31be4d8f10..703d8013f0 100644
--- a/dlls/msxml3/selection.c
+++ b/dlls/msxml3/selection.c
@@ -36,6 +36,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml2did.h"
diff --git a/dlls/msxml3/stylesheet.c b/dlls/msxml3/stylesheet.c
index 9863ed7aa4..b85541f064 100644
--- a/dlls/msxml3/stylesheet.c
+++ b/dlls/msxml3/stylesheet.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
index 986f429cc1..db39919a41 100644
--- a/dlls/msxml3/tests/saxreader.c
+++ b/dlls/msxml3/tests/saxreader.c
@@ -29,6 +29,7 @@
#include "windows.h"
#include "ole2.h"
#include "msxml2.h"
+#include "msxml6.h"
#include "msxml2did.h"
#include "ocidl.h"
#include "dispex.h"
diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c
index abd89dbd6b..4c8f5fb701 100644
--- a/dlls/msxml3/text.c
+++ b/dlls/msxml3/text.c
@@ -34,6 +34,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
index d0c65a44a3..3392d8c258 100644
--- a/dlls/msxml3/xmldoc.c
+++ b/dlls/msxml3/xmldoc.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "wininet.h"
#include "winreg.h"
diff --git a/dlls/msxml3/xmlelem.c b/dlls/msxml3/xmlelem.c
index 96b2007ce3..0b146945c2 100644
--- a/dlls/msxml3/xmlelem.c
+++ b/dlls/msxml3/xmlelem.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "ocidl.h"
diff --git a/dlls/msxml3/xmlparser.c b/dlls/msxml3/xmlparser.c
index 6fcdb82c56..b354ea2d27 100644
--- a/dlls/msxml3/xmlparser.c
+++ b/dlls/msxml3/xmlparser.c
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "msxml_private.h"
diff --git a/dlls/msxml3/xmlview.c b/dlls/msxml3/xmlview.c
index f1299ef957..f68109e810 100644
--- a/dlls/msxml3/xmlview.c
+++ b/dlls/msxml3/xmlview.c
@@ -30,6 +30,7 @@
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
+#include "msxml2.h"
#include "msxml6.h"
#include "mshtml.h"
#include "mshtmhst.h"
diff --git a/include/msxml6.idl b/include/msxml6.idl
index fe20d5c495..a966b83497 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -1418,42 +1418,6 @@ interface IXMLDOMParseErrorCollection : IDispatch
HRESULT _newEnum( [retval, out] IUnknown **ppunk);
}
-[
- uuid(F6D90F11-9C73-11D3-B32E-00C04F990BB4)
-]
-coclass DOMDocument
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(f5078f1b-c551-11d3-89b9-0000f81fe221)
-]
-coclass DOMDocument26
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(f5078f32-c551-11d3-89b9-0000f81fe221)
-]
-coclass DOMDocument30
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(88d969c0-f192-11d4-a65f-0040963251e5)
-]
-coclass DOMDocument40
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("XML DOM Document 6.0"),
progid("Msxml2.DOMDocument.6.0"),
@@ -1466,42 +1430,6 @@ coclass DOMDocument60
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(F6D90F12-9C73-11D3-B32E-00C04F990BB4)
-]
-coclass FreeThreadedDOMDocument
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(f5078f1c-c551-11d3-89b9-0000f81fe221)
-]
-coclass FreeThreadedDOMDocument26
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(f5078f33-c551-11d3-89b9-0000f81fe221)
-]
-coclass FreeThreadedDOMDocument30
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
-[
- uuid(88d969c1-f192-11d4-a65f-0040963251e5)
-]
-coclass FreeThreadedDOMDocument40
-{
- [default] interface IXMLDOMDocument2;
- [default, source] dispinterface XMLDOMDocumentEvents;
-}
-
[
helpstring("Free threaded XML DOM Document 6.0"),
progid("Msxml2.FreeThreadedDOMDocument.6.0"),
@@ -1514,38 +1442,6 @@ coclass FreeThreadedDOMDocument60
[default, source] dispinterface XMLDOMDocumentEvents;
}
-[
- uuid(f6d90f16-9c73-11d3-b32e-00c04f990bb4)
-]
-coclass XMLHTTP
-{
- [default] interface IXMLHTTPRequest;
-}
-
-[
- uuid(f5078f1e-c551-11d3-89b9-0000f81fe221)
-]
-coclass XMLHTTP26
-{
- [default] interface IXMLHTTPRequest;
-}
-
-[
- uuid(f5078f35-c551-11d3-89b9-0000f81fe221)
-]
-coclass XMLHTTP30
-{
- [default] interface IXMLHTTPRequest;
-}
-
-[
- uuid(88d969c5-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLHTTP40
-{
- [default] interface IXMLHTTPRequest;
-}
-
[
helpstring("XML HTTP 6.0"),
progid("Msxml2.XMLHTTP.6.0"),
@@ -1557,30 +1453,6 @@ coclass XMLHTTP60
[default] interface IXMLHTTPRequest;
}
-[
- uuid(afba6b42-5692-48ea-8141-dc517dcf0ef1)
-]
-coclass ServerXMLHTTP
-{
- [default] interface IServerXMLHTTPRequest;
-}
-
-[
- uuid(afb40ffd-b609-40a3-9828-f88bbe11e4e3)
-]
-coclass ServerXMLHTTP30
-{
- [default] interface IServerXMLHTTPRequest;
-}
-
-[
- uuid(88d969c6-f192-11d4-a65f-0040963251e5)
-]
-coclass ServerXMLHTTP40
-{
- [default] interface IServerXMLHTTPRequest2;
-}
-
[
helpstring("Server XML HTTP 6.0"),
progid("Msxml2.ServerXMLHTTP.6.0"),
@@ -1592,38 +1464,6 @@ coclass ServerXMLHTTP60
[default] interface IServerXMLHTTPRequest2;
}
-[
- uuid(373984c9-b845-449b-91e7-45ac83036ade)
-]
-coclass XMLSchemaCache
-{
- [default] interface IXMLDOMSchemaCollection;
-}
-
-[
- uuid(f5078f1d-c551-11d3-89b9-0000f81fe221)
-]
-coclass XMLSchemaCache26
-{
- [default] interface IXMLDOMSchemaCollection;
-}
-
-[
- uuid(f5078f34-c551-11d3-89b9-0000f81fe221)
-]
-coclass XMLSchemaCache30
-{
- [default] interface IXMLDOMSchemaCollection;
-}
-
-[
- uuid(88d969c2-f192-11d4-a65f-0040963251e5)
-]
-coclass XMLSchemaCache40
-{
- [default] interface IXMLDOMSchemaCollection2;
-}
-
[
helpstring("XML Schema Cache 6.0"),
progid("Msxml2.XMLSchemaCache.6.0"),
@@ -1635,38 +1475,6 @@ coclass XMLSchemaCache60
[default] interface IXMLDOMSchemaCollection2;
}
-[
- uuid(2933BF94-7B36-11d2-B20E-00C04F983E60)
-]
-coclass XSLTemplate
-{
- [default] interface IXSLTemplate;
-}
-
-[
- uuid(f5078f21-c551-11d3-89b9-0000f81fe221)
-]
-coclass XSLTemplate26
-{
- [default] interface IXSLTemplate;
-}
-
-[
- uuid(f5078f36-c551-11d3-89b9-0000f81fe221)
-]
-coclass XSLTemplate30
-{
- [default] interface IXSLTemplate;
-}
-
-[
- uuid(88d969c3-f192-11d4-a65f-0040963251e5)
-]
-coclass XSLTemplate40
-{
- [default] interface IXSLTemplate;
-}
-
[
helpstring("XSL Template 6.0"),
progid("Msxml2.XSLTemplate.6.0"),
@@ -3133,36 +2941,6 @@ interface ISchemaNotation : ISchemaItem
[out,retval] BSTR* uri);
}
-
-[
- uuid(079aa557-4a18-424a-8eee-e39f0a8d41b9)
-]
-coclass SAXXMLReader
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
- interface IMXReaderControl;
-}
-
-[
- uuid(3124c396-fb13-4836-a6ad-1317f1713688)
-]
-coclass SAXXMLReader30
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
- interface IMXReaderControl;
-}
-
-[
- uuid(7c6e29bc-8b8b-4c3d-859e-af6cd158be0f)
-]
-coclass SAXXMLReader40
-{
- [default] interface IVBSAXXMLReader;
- interface ISAXXMLReader;
-}
-
[
helpstring("SAX XML Reader 6.0"),
progid("Msxml2.SAXXMLReader.6.0"),
@@ -3175,66 +2953,6 @@ coclass SAXXMLReader60
interface ISAXXMLReader;
}
-[
- uuid(a4c23ec3-6b70-4466-9127-550077239978)
-]
-coclass MXHTMLWriter
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXErrorHandler;
- interface ISAXDTDHandler;
- interface ISAXLexicalHandler;
- interface ISAXDeclHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
-[
- uuid(853d1540-c1a7-4aa9-a226-4d3bd301146d)
-]
-coclass MXHTMLWriter30
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
-[
- uuid(88d969c9-f192-11d4-a65f-0040963251e5)
-]
-coclass MXHTMLWriter40
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXHTMLWriter 6.0"),
progid("Msxml2.MXHTMLWriter.6.0"),
@@ -3258,66 +2976,6 @@ coclass MXHTMLWriter60
interface IVBSAXLexicalHandler;
}
-[
- uuid(fc220ad8-a72a-4ee8-926e-0b7ad152a020)
-]
-coclass MXXMLWriter
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXErrorHandler;
- interface ISAXDTDHandler;
- interface ISAXLexicalHandler;
- interface ISAXDeclHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
-[
- uuid(3d813dfe-6c91-4a4e-8f41-04346a841d9c)
-]
-coclass MXXMLWriter30
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
-[
- uuid(88d969c8-f192-11d4-a65f-0040963251e5),
-]
-coclass MXXMLWriter40
-{
- [default] interface IMXWriter;
-
- interface ISAXContentHandler;
- interface ISAXDeclHandler;
- interface ISAXDTDHandler;
- interface ISAXErrorHandler;
- interface ISAXLexicalHandler;
-
- interface IVBSAXContentHandler;
- interface IVBSAXDeclHandler;
- interface IVBSAXDTDHandler;
- interface IVBSAXErrorHandler;
- interface IVBSAXLexicalHandler;
-}
-
[
helpstring("MXXMLWriter 6.0"),
progid("Msxml2.MXXMLWriter.6.0"),
@@ -3341,24 +2999,6 @@ coclass MXXMLWriter60
interface IVBSAXLexicalHandler;
}
-[
- uuid(88d969d5-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
-[
- uuid(88d969d6-f192-11d4-a65f-0040963251e5)
-]
-coclass MXNamespaceManager40
-{
- [default] interface IVBMXNamespaceManager;
- interface IMXNamespaceManager;
-}
-
[
helpstring("MXNamespaceManager 6.0"),
progid("Msxml2.MXNamespaceManager.6.0"),
@@ -3371,36 +3011,6 @@ coclass MXNamespaceManager60
interface IMXNamespaceManager;
}
-[
- uuid(4dd441ad-526d-4a77-9f1b-9841ed802fb0)
-]
-coclass SAXAttributes
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
-[
- uuid(3e784a01-f3ae-4dc0-9354-9526b9370eba)
-]
-coclass SAXAttributes30
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
-[
- uuid(88d969ca-f192-11d4-a65f-0040963251e5),
-]
-coclass SAXAttributes40
-{
- [default] interface IMXAttributes;
- interface IVBSAXAttributes;
- interface ISAXAttributes;
-}
-
[
helpstring("SAXAttributes 6.0"),
progid("Msxml2.SAXAttributes.6.0"),
--
2.28.0
1
0
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/msxml2.idl | 3 +++
include/msxml6.idl | 3 +++
2 files changed, 6 insertions(+)
diff --git a/include/msxml2.idl b/include/msxml2.idl
index cfafc42133..9bf840fb5a 100644
--- a/include/msxml2.idl
+++ b/include/msxml2.idl
@@ -133,6 +133,8 @@ typedef enum tagDOMNodeType
} DOMNodeType;
cpp_quote("#endif")
+cpp_quote("#ifndef __MSXML_SOMTYPES_DEFINED")
+cpp_quote("#define __MSXML_SOMTYPES_DEFINED")
typedef enum _SOMITEMTYPE
{
SOMITEM_SCHEMA = 0x1000,
@@ -260,6 +262,7 @@ typedef enum _SCHEMATYPEVARIETY
SCHEMATYPEVARIETY_LIST = 1,
SCHEMATYPEVARIETY_UNION = 2,
} SCHEMATYPEVARIETY;
+cpp_quote("#endif")
[
local,
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 1f657a8cde..fe20d5c495 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -133,6 +133,8 @@ typedef enum tagDOMNodeType
} DOMNodeType;
cpp_quote("#endif")
+cpp_quote("#ifndef __MSXML_SOMTYPES_DEFINED")
+cpp_quote("#define __MSXML_SOMTYPES_DEFINED")
typedef enum _SOMITEMTYPE
{
SOMITEM_SCHEMA = 0x1000,
@@ -260,6 +262,7 @@ typedef enum _SCHEMATYPEVARIETY
SCHEMATYPEVARIETY_LIST = 1,
SCHEMATYPEVARIETY_UNION = 2,
} SCHEMATYPEVARIETY;
+cpp_quote("#endif")
[
local,
--
2.28.0
1
0
[PATCH v4] wininet: Implement INTERNET_OPTION_SECURITY_CERTIFICATE flag for InternetQueryOption.
by Daniel Lehman 11 Sep '20
by Daniel Lehman 11 Sep '20
11 Sep '20
Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com>
---
'null' isn't translated
v4: handle english:
my spanish locale reports sys/usr lcid as 409/80a (spanish-honduras)
the testbot japan reports sys/usr lcid as 411/409
borrowing shlwapi/tests/string function to test for english
calling SetUserDefaultUILanguage can force the string to be english on non-english locales
---
dlls/wininet/http.c | 103 ++++++++++++++++++++++++++
dlls/wininet/resource.h | 11 +++
dlls/wininet/tests/http.c | 150 +++++++++++++++++++++++++++++++++++++-
dlls/wininet/wininet.rc | 11 +++
4 files changed, 273 insertions(+), 2 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 220493718c3..d83c6fe3659 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -54,6 +54,7 @@
#include "internet.h"
#include "zlib.h"
+#include "resource.h"
#include "wine/debug.h"
#include "wine/exception.h"
@@ -2277,6 +2278,108 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
return get_security_cert_struct(req, (INTERNET_CERTIFICATE_INFOA*)buffer);
}
+ case INTERNET_OPTION_SECURITY_CERTIFICATE: {
+ DWORD err;
+ int needed;
+ char subject[64];
+ char issuer[64];
+ char effective[64];
+ char expiration[64];
+ char protocol[64];
+ char signature[64];
+ char encryption[64];
+ char privacy[64];
+ char bits[16];
+ char strength[16];
+ char start_date[32];
+ char start_time[32];
+ char expiry_date[32];
+ char expiry_time[32];
+ SYSTEMTIME start, expiry;
+ INTERNET_CERTIFICATE_INFOA info;
+
+ if(!size)
+ return ERROR_INVALID_PARAMETER;
+
+ if(!req->netconn) {
+ *size = 0;
+ return ERROR_INTERNET_INVALID_OPERATION;
+ }
+
+ if(!buffer) {
+ *size = 1;
+ return ERROR_INSUFFICIENT_BUFFER;
+ }
+
+ if((err = get_security_cert_struct(req, &info)))
+ return err;
+
+ if (PRIMARYLANGID(GetUserDefaultUILanguage()) != LANG_ENGLISH)
+ FIXME("INTERNET_OPTION_SECURITY_CERTIFICATE currently English-only\n");
+
+ LoadStringA(WININET_hModule, IDS_CERT_SUBJECT, subject, sizeof(subject));
+ LoadStringA(WININET_hModule, IDS_CERT_ISSUER, issuer, sizeof(issuer));
+ LoadStringA(WININET_hModule, IDS_CERT_EFFECTIVE, effective, sizeof(effective));
+ LoadStringA(WININET_hModule, IDS_CERT_EXPIRATION, expiration, sizeof(expiration));
+ LoadStringA(WININET_hModule, IDS_CERT_PROTOCOL, protocol, sizeof(protocol));
+ LoadStringA(WININET_hModule, IDS_CERT_SIGNATURE, signature, sizeof(signature));
+ LoadStringA(WININET_hModule, IDS_CERT_ENCRYPTION, encryption, sizeof(encryption));
+ LoadStringA(WININET_hModule, IDS_CERT_PRIVACY, privacy, sizeof(privacy));
+ LoadStringA(WININET_hModule, info.dwKeySize >= 128 ? IDS_CERT_HIGH : IDS_CERT_LOW,
+ strength, sizeof(strength));
+ LoadStringA(WININET_hModule, IDS_CERT_BITS, bits, sizeof(bits));
+
+ FileTimeToSystemTime(&info.ftStart, &start);
+ FileTimeToSystemTime(&info.ftExpiry, &expiry);
+ GetDateFormatA(LOCALE_USER_DEFAULT, 0, &start, NULL, start_date, sizeof(start_date));
+ GetTimeFormatA(LOCALE_USER_DEFAULT, 0, &start, NULL, start_time, sizeof(start_time));
+ GetDateFormatA(LOCALE_USER_DEFAULT, 0, &expiry, NULL, expiry_date, sizeof(expiry_date));
+ GetTimeFormatA(LOCALE_USER_DEFAULT, 0, &expiry, NULL, expiry_time, sizeof(expiry_time));
+
+ needed = _scprintf("%s:\r\n%s\r\n"
+ "%s:\r\n%s\r\n"
+ "%s:\t%s %s\r\n"
+ "%s:\t%s %s\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t%s (%u %s)",
+ subject, info.lpszSubjectInfo,
+ issuer, info.lpszIssuerInfo,
+ effective, start_date, start_time,
+ expiration, expiry_date, expiry_time,
+ protocol, signature, encryption,
+ privacy, strength, info.dwKeySize, bits);
+
+ if(needed < *size) {
+ err = ERROR_SUCCESS;
+ *size = snprintf(buffer, *size,
+ "%s:\r\n%s\r\n"
+ "%s:\r\n%s\r\n"
+ "%s:\t%s %s\r\n"
+ "%s:\t%s %s\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t(null)\r\n"
+ "%s:\t%s (%u %s)",
+ subject, info.lpszSubjectInfo,
+ issuer, info.lpszIssuerInfo,
+ effective, start_date, start_time,
+ expiration, expiry_date, expiry_time,
+ protocol, signature, encryption,
+ privacy, strength, info.dwKeySize, bits);
+ }else {
+ err = ERROR_INSUFFICIENT_BUFFER;
+ *size = 1;
+ }
+
+ LocalFree(info.lpszSubjectInfo);
+ LocalFree(info.lpszIssuerInfo);
+ LocalFree(info.lpszProtocolName);
+ LocalFree(info.lpszSignatureAlgName);
+ LocalFree(info.lpszEncryptionAlgName);
+ return err;
+ }
case INTERNET_OPTION_CONNECT_TIMEOUT:
if (*size < sizeof(DWORD))
return ERROR_INSUFFICIENT_BUFFER;
diff --git a/dlls/wininet/resource.h b/dlls/wininet/resource.h
index 256a374af08..a9ccd19cf3d 100644
--- a/dlls/wininet/resource.h
+++ b/dlls/wininet/resource.h
@@ -38,3 +38,14 @@
#define IDS_CERT_DATE_INVALID 0x502
#define IDS_CERT_CN_INVALID 0x503
#define IDS_CERT_ERRORS 0x504
+#define IDS_CERT_SUBJECT 0x505
+#define IDS_CERT_ISSUER 0x506
+#define IDS_CERT_EFFECTIVE 0x507
+#define IDS_CERT_EXPIRATION 0x508
+#define IDS_CERT_PROTOCOL 0x509
+#define IDS_CERT_SIGNATURE 0x50a
+#define IDS_CERT_ENCRYPTION 0x50b
+#define IDS_CERT_PRIVACY 0x50c
+#define IDS_CERT_HIGH 0x50d
+#define IDS_CERT_LOW 0x50e
+#define IDS_CERT_BITS 0x50f
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index c07d60d2a9d..43d4ae45ef2 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -171,6 +171,26 @@ static INTERNET_STATUS_CALLBACK (WINAPI *pInternetSetStatusCallbackA)(HINTERNET
static INTERNET_STATUS_CALLBACK (WINAPI *pInternetSetStatusCallbackW)(HINTERNET ,INTERNET_STATUS_CALLBACK);
static BOOL (WINAPI *pInternetGetSecurityInfoByURLA)(LPSTR,PCCERT_CHAIN_CONTEXT*,DWORD*);
+static BOOL is_lang_english(void)
+{
+ static HMODULE hkernel32 = NULL;
+ static LANGID (WINAPI *pGetThreadUILanguage)(void) = NULL;
+ static LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL;
+
+ if (!hkernel32)
+ {
+ hkernel32 = GetModuleHandleA("kernel32.dll");
+ pGetThreadUILanguage = (void*)GetProcAddress(hkernel32, "GetThreadUILanguage");
+ pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
+ }
+ if (pGetThreadUILanguage)
+ return PRIMARYLANGID(pGetThreadUILanguage()) == LANG_ENGLISH;
+ if (pGetUserDefaultUILanguage)
+ return PRIMARYLANGID(pGetUserDefaultUILanguage()) == LANG_ENGLISH;
+
+ return PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH;
+}
+
static int strcmp_wa(LPCWSTR strw, const char *stra)
{
WCHAR buf[512];
@@ -6112,6 +6132,58 @@ static const cert_struct_test_t test_winehq_com_cert = {
"webmaster(a)winehq.org"
};
+static const char *cert_string_fmt =
+ "Subject:\r\n%s\r\n"
+ "Issuer:\r\n%s\r\n"
+ "Effective Date:\t%s %s\r\n"
+ "Expiration Date:\t%s %s\r\n"
+ "Security Protocol:\t%s\r\n"
+ "Signature Type:\t%s\r\n"
+ "Encryption Type:\t%s\r\n"
+ "Privacy Strength:\t%s (%u bits)";
+
+static void test_cert_struct_string(HINTERNET req, const INTERNET_CERTIFICATE_INFOA *info)
+{
+ SYSTEMTIME start, expiry;
+ char expiry_date[32];
+ char expiry_time[32];
+ char start_date[32];
+ char start_time[32];
+ char expect[512];
+ char actual[512];
+ DWORD size;
+ BOOL res;
+
+ size = sizeof(actual);
+ SetLastError(0xdeadbeef);
+ memset(actual, 0x55, sizeof(actual));
+ res = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE, actual, &size);
+ ok(res, "InternetQueryOption failed: %u\n", GetLastError());
+
+ FileTimeToSystemTime(&info->ftStart, &start);
+ FileTimeToSystemTime(&info->ftExpiry, &expiry);
+
+ GetDateFormatA(LOCALE_USER_DEFAULT, 0, &start, NULL, start_date, sizeof(start_date));
+ GetTimeFormatA(LOCALE_USER_DEFAULT, 0, &start, NULL, start_time, sizeof(start_time));
+ GetDateFormatA(LOCALE_USER_DEFAULT, 0, &expiry, NULL, expiry_date, sizeof(expiry_date));
+ GetTimeFormatA(LOCALE_USER_DEFAULT, 0, &expiry, NULL, expiry_time, sizeof(expiry_time));
+
+ snprintf(expect, sizeof(expect), cert_string_fmt, info->lpszSubjectInfo, info->lpszIssuerInfo,
+ start_date, start_time, expiry_date, expiry_time,
+ info->lpszSignatureAlgName, info->lpszEncryptionAlgName, info->lpszProtocolName,
+ info->dwKeySize >= 128 ? "High" : "Low", info->dwKeySize);
+ ok(size == strlen(actual), "size = %u\n", size);
+ ok(!strcmp(actual, expect), "expected:\n%s\nactual:\n%s\n", expect, actual);
+
+ --size;
+ SetLastError(0xdeadbeef);
+ memset(actual, 0x55, sizeof(actual));
+ res = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE, actual, &size);
+ ok(!res && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError());
+ ok(size == 1, "unexpected size: %u\n", size);
+ ok(actual[0] == 0x55, "unexpected byte: %02x\n", actual[0]);
+}
+
static void test_cert_struct(HINTERNET req, const cert_struct_test_t *test)
{
INTERNET_CERTIFICATE_INFOA info;
@@ -6138,6 +6210,10 @@ static void test_cert_struct(HINTERNET req, const cert_struct_test_t *test)
ok(!info.lpszProtocolName, "lpszProtocolName = %s\n", info.lpszProtocolName);
ok(info.dwKeySize >= 128 && info.dwKeySize <= 256, "dwKeySize = %u\n", info.dwKeySize);
+ if (is_lang_english())
+ test_cert_struct_string(req, &info);
+ else
+ win_skip("Skipping tests that are English-only\n");
release_cert_info(&info);
}
@@ -6217,7 +6293,7 @@ static void test_security_flags(void)
INTERNET_CERTIFICATE_INFOA *cert;
HINTERNET ses, conn, req;
DWORD size, flags;
- char buf[100];
+ char buf[512];
BOOL res;
if (!https_support)
@@ -6378,6 +6454,30 @@ static void test_security_flags(void)
}
HeapFree(GetProcessHeap(), 0, cert);
+ SetLastError(0xdeadbeef);
+ res = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE, NULL, NULL);
+ ok(!res && GetLastError() == ERROR_INVALID_PARAMETER, "InternetQueryOption failed: %d\n", GetLastError());
+
+ size = 0;
+ SetLastError(0xdeadbeef);
+ res = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE, NULL, &size);
+ ok(!res && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError());
+ ok(size == 1, "unexpected size: %u\n", size);
+
+ size = 42;
+ SetLastError(0xdeadbeef);
+ memset(buf, 0x55, sizeof(buf));
+ res = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE, buf, &size);
+ ok(!res && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError());
+ ok(size == 1, "unexpected size: %u\n", size);
+ ok(buf[0] == 0x55, "unexpected byte: %02x\n", buf[0]);
+
+ size = sizeof(buf);
+ SetLastError(0xdeadbeef);
+ res = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE, buf, &size);
+ ok(res && GetLastError() == ERROR_SUCCESS, "InternetQueryOption failed: %d\n", GetLastError());
+ ok(size < sizeof(buf), "unexpected size: %u\n", size);
+
CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTING_TO_SERVER, 2);
CHECK_NOTIFIED2(INTERNET_STATUS_CONNECTED_TO_SERVER, 2);
CHECK_NOTIFIED2(INTERNET_STATUS_CLOSING_CONNECTION, 2);
@@ -6562,9 +6662,10 @@ static void test_secure_connection(void)
static const WCHAR get[] = {'G','E','T',0};
static const WCHAR testpage[] = {'/','t','e','s','t','s','/','h','e','l','l','o','.','h','t','m','l',0};
HINTERNET ses, con, req;
- DWORD size, flags, err;
+ DWORD size, size2, flags, err;
INTERNET_CERTIFICATE_INFOA *certificate_structA = NULL;
INTERNET_CERTIFICATE_INFOW *certificate_structW = NULL;
+ char certstr1[512], certstr2[512];
BOOL ret;
ses = InternetOpenA("Gizmo5", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
@@ -6629,6 +6730,19 @@ static void test_secure_connection(void)
}
HeapFree(GetProcessHeap(), 0, certificate_structW);
+ SetLastError(0xdeadbeef);
+ size = sizeof(certstr1);
+ ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE, certstr1, &size);
+ ok(ret && GetLastError() == ERROR_SUCCESS, "InternetQueryOption failed: %d\n", GetLastError());
+
+ SetLastError(0xdeadbeef);
+ size2 = sizeof(certstr2);
+ ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE, certstr2, &size2);
+ ok(ret && GetLastError() == ERROR_SUCCESS, "InternetQueryOption failed: %d\n", GetLastError());
+
+ ok(size == size2, "expected same size\n");
+ ok(!strcmp(certstr1, certstr2), "expected same string\n");
+
InternetCloseHandle(req);
InternetCloseHandle(con);
InternetCloseHandle(ses);
@@ -7517,6 +7631,37 @@ static void test_concurrent_header_access(void)
CloseHandle( wait );
}
+static void test_cert_string(void)
+{
+ HINTERNET ses, con, req;
+ char actual[512];
+ DWORD size;
+ BOOL res;
+
+ ses = InternetOpenA( "winetest", 0, NULL, NULL, 0 );
+ ok( ses != NULL, "InternetOpenA failed\n" );
+
+ con = InternetConnectA( ses, "test.winehq.org", INTERNET_DEFAULT_HTTP_PORT, NULL, NULL,
+ INTERNET_SERVICE_HTTP, 0, 0 );
+ ok( con != NULL, "InternetConnectA failed %u\n", GetLastError() );
+
+ req = HttpOpenRequestA( con, NULL, "/", NULL, NULL, NULL, 0, 0 );
+ ok( req != NULL, "HttpOpenRequestA failed %u\n", GetLastError() );
+
+ size = sizeof(actual);
+ SetLastError( 0xdeadbeef );
+ memset( actual, 0x55, sizeof(actual) );
+ res = InternetQueryOptionA( req, INTERNET_OPTION_SECURITY_CERTIFICATE, actual, &size );
+ ok( !res && GetLastError() == ERROR_INTERNET_INVALID_OPERATION,
+ "InternetQueryOption failed: %u\n", GetLastError() );
+ ok( size == 0, "unexpected size: %u\n", size );
+ ok( actual[0] == 0x55, "unexpected byte: %02x\n", actual[0] );
+
+ InternetCloseHandle( req );
+ InternetCloseHandle( con );
+ InternetCloseHandle( ses );
+}
+
START_TEST(http)
{
HMODULE hdll;
@@ -7566,5 +7711,6 @@ START_TEST(http)
test_connection_failure();
test_default_service_port();
test_concurrent_header_access();
+ test_cert_string();
free_events();
}
diff --git a/dlls/wininet/wininet.rc b/dlls/wininet/wininet.rc
index b6e35629ca2..485c80793e0 100644
--- a/dlls/wininet/wininet.rc
+++ b/dlls/wininet/wininet.rc
@@ -29,6 +29,17 @@ STRINGTABLE
IDS_CERT_DATE_INVALID "The date on the certificate is invalid."
IDS_CERT_CN_INVALID "The name on the certificate does not match the site."
IDS_CERT_ERRORS "There is at least one unspecified security problem with this certificate."
+ IDS_CERT_SUBJECT "Subject"
+ IDS_CERT_ISSUER "Issuer"
+ IDS_CERT_EFFECTIVE "Effective Date"
+ IDS_CERT_EXPIRATION "Expiration Date"
+ IDS_CERT_PROTOCOL "Security Protocol"
+ IDS_CERT_SIGNATURE "Signature Type"
+ IDS_CERT_ENCRYPTION "Encryption Type"
+ IDS_CERT_PRIVACY "Privacy Strength"
+ IDS_CERT_HIGH "High"
+ IDS_CERT_LOW "Low"
+ IDS_CERT_BITS "bits"
}
IDD_PROXYDLG DIALOG 36, 24, 220, 146
--
2.25.1
2
1
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/ws2_32/socket.c | 99 ++++++++++++++++++++++++++++++++++----------
1 file changed, 77 insertions(+), 22 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index b7a570043cd..44214630296 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -267,26 +267,22 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
LPWSABUF lpControlBuffer );
-/* critical section to protect some non-reentrant net function */
-static CRITICAL_SECTION csWSgetXXXbyYYY;
-static CRITICAL_SECTION_DEBUG critsect_debug =
-{
- 0, 0, &csWSgetXXXbyYYY,
- { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": csWSgetXXXbyYYY") }
-};
-static CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 };
+#define DECLARE_CRITICAL_SECTION(cs) \
+ static CRITICAL_SECTION cs; \
+ static CRITICAL_SECTION_DEBUG cs##_debug = \
+ { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
+ 0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
+ static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 }
+
+DECLARE_CRITICAL_SECTION(csWSgetXXXbyYYY);
+DECLARE_CRITICAL_SECTION(cs_if_addr_cache);
+DECLARE_CRITICAL_SECTION(cs_socket_list);
static in_addr_t *if_addr_cache;
static unsigned int if_addr_cache_size;
-static CRITICAL_SECTION cs_if_addr_cache;
-static CRITICAL_SECTION_DEBUG cs_if_addr_cache_debug =
-{
- 0, 0, &cs_if_addr_cache,
- { &cs_if_addr_cache_debug.ProcessLocksList, &cs_if_addr_cache_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": cs_if_addr_cache") }
-};
-static CRITICAL_SECTION cs_if_addr_cache = { &cs_if_addr_cache_debug, -1, 0, 0, 0, 0 };
+
+static SOCKET *socket_list;
+static unsigned int socket_list_size;
union generic_unix_sockaddr
{
@@ -481,6 +477,48 @@ static inline const char *debugstr_optval(const char *optval, int optlenval)
#define SOCKET2HANDLE(s) ((HANDLE)(s))
#define HANDLE2SOCKET(h) ((SOCKET)(h))
+static BOOL socket_list_add(SOCKET socket)
+{
+ unsigned int i, new_size;
+ SOCKET *new_array;
+
+ EnterCriticalSection(&cs_socket_list);
+ for (i = 0; i < socket_list_size; ++i)
+ {
+ if (!socket_list[i])
+ {
+ socket_list[i] = socket;
+ LeaveCriticalSection(&cs_socket_list);
+ return TRUE;
+ }
+ }
+ new_size = max(socket_list_size * 2, 8);
+ if (!(new_array = heap_realloc(socket_list, new_size * sizeof(*socket_list))))
+ return FALSE;
+ socket_list = new_array;
+ memset(socket_list + socket_list_size, 0, (new_size - socket_list_size) * sizeof(*socket_list));
+ socket_list[socket_list_size] = socket;
+ socket_list_size = new_size;
+ LeaveCriticalSection(&cs_socket_list);
+ return TRUE;
+}
+
+static void socket_list_remove(SOCKET socket)
+{
+ unsigned int i;
+
+ EnterCriticalSection(&cs_socket_list);
+ for (i = 0; i < socket_list_size; ++i)
+ {
+ if (socket_list[i] == socket)
+ {
+ socket_list[i] = 0;
+ break;
+ }
+ }
+ LeaveCriticalSection(&cs_socket_list);
+}
+
/****************************************************************
* Async IO declarations
****************************************************************/
@@ -2832,6 +2870,11 @@ SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr, int *addrlen32)
SERVER_END_REQ;
if (!err)
{
+ if (!socket_list_add(as))
+ {
+ CloseHandle(SOCKET2HANDLE(as));
+ return SOCKET_ERROR;
+ }
if (addr && addrlen32 && WS_getpeername(as, addr, addrlen32))
{
WS_closesocket(as);
@@ -3483,6 +3526,7 @@ int WINAPI WS_closesocket(SOCKET s)
if (fd >= 0)
{
release_sock_fd(s, fd);
+ socket_list_remove(s);
if (CloseHandle(SOCKET2HANDLE(s)))
res = 0;
}
@@ -7558,10 +7602,16 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
}
/* hack for WSADuplicateSocket */
- if (lpProtocolInfo && lpProtocolInfo->dwServiceFlags4 == 0xff00ff00) {
- ret = lpProtocolInfo->dwServiceFlags3;
- TRACE("\tgot duplicate %04lx\n", ret);
- return ret;
+ if (lpProtocolInfo && lpProtocolInfo->dwServiceFlags4 == 0xff00ff00)
+ {
+ ret = lpProtocolInfo->dwServiceFlags3;
+ TRACE("\tgot duplicate %04lx\n", ret);
+ if (!socket_list_add(ret))
+ {
+ CloseHandle(SOCKET2HANDLE(ret));
+ return INVALID_SOCKET;
+ }
+ return ret;
}
if (lpProtocolInfo)
@@ -7685,7 +7735,12 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
}
}
#endif
- return ret;
+ if (!socket_list_add(ret))
+ {
+ CloseHandle(SOCKET2HANDLE(ret));
+ return INVALID_SOCKET;
+ }
+ return ret;
}
if (err == WSAEACCES) /* raw socket denied */
--
2.28.0
2
4
10 Sep '20
Based on a patch by Francesco Noferi.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=48396
Signed-off-by: Myah Caron <qsniyg(a)protonmail.com>
---
Supersedes 192424.
v2:
- Fix test failures
- Remove useless else { ok = TRUE; } block
I used "Based on a patch by" rather than "From:" (in the last patch), as while the structure is similar to Francesco's patch, the implementation is completely different (adapted from WCMD_copy).
programs/cmd/builtins.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index d2f2ea517a0..934e55ac587 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -3033,15 +3033,28 @@ void WCMD_move (void)
WCHAR copycmd[MAXSTRING];
DWORD len;
- /* /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
+ /* Default whether automatic overwriting is on. If we are interactive then
+ we prompt by default, otherwise we overwrite by default
+ /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
if (wcsstr (quals, parmNoY))
force = FALSE;
else if (wcsstr (quals, parmY))
force = TRUE;
else {
static const WCHAR copyCmdW[] = {'C','O','P','Y','C','M','D','\0'};
+ /* By default, we will force the overwrite in batch mode and ask for
+ * confirmation in interactive mode. */
+ force = !interactive;
+ /* If COPYCMD is set, then we force the overwrite with /Y and ask for
+ * confirmation with /-Y. If COPYCMD is neither of those, then we use the
+ * default behavior. */
len = GetEnvironmentVariableW(copyCmdW, copycmd, ARRAY_SIZE(copycmd));
- force = (len && len < ARRAY_SIZE(copycmd) && !lstrcmpiW(copycmd, parmY));
+ if (len && len < ARRAY_SIZE(copycmd)) {
+ if (!lstrcmpiW (copycmd, parmY))
+ force = TRUE;
+ else if (!lstrcmpiW (copycmd, parmNoY))
+ force = FALSE;
+ }
}
/* Prompt if overwriting */
--
2.28.0
1
0
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=48397
Signed-off-by: Myah Caron <qsniyg(a)protonmail.com>
---
programs/cmd/builtins.c | 15 +++++----------
programs/cmd/tests/test_builtins.cmd.exp | 4 ++--
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 70ccddebc11..d2f2ea517a0 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -3003,6 +3003,7 @@ void WCMD_move (void)
WCHAR src[MAX_PATH];
DWORD attribs;
BOOL ok = TRUE;
+ DWORD flags = 0;
WINE_TRACE("Processing file '%s'\n", wine_dbgstr_w(fd.cFileName));
@@ -3051,20 +3052,14 @@ void WCMD_move (void)
question = WCMD_format_string(WCMD_LoadMessage(WCMD_OVERWRITE), dest);
ok = WCMD_ask_confirm(question, FALSE, NULL);
LocalFree(question);
-
- /* So delete the destination prior to the move */
- if (ok) {
- if (!DeleteFileW(dest)) {
- WCMD_print_error ();
- errorlevel = 1;
- ok = FALSE;
- }
- }
}
+
+ if (ok)
+ flags |= MOVEFILE_REPLACE_EXISTING;
}
if (ok) {
- status = MoveFileW(src, dest);
+ status = MoveFileExW(src, dest, flags);
} else {
status = TRUE;
}
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index fb84de2f5d5..f75839fdbe8 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -1343,8 +1343,8 @@ original file still present
------------ Testing move ------------
--- file move
file move succeeded
-(a)todo_wine@file move with overwrite succeeded(a)or_broken@file overwrite impossible!
-(a)todo_wine@bar(a)or_broken@baz
+file move with overwrite succeeded(a)or_broken@file overwrite impossible!
+bar(a)or_broken@baz
read-only files are moveable
file moved in subdirectory
moving a file to itself is a no-op(a)or_broken@moving a file to itself should be a no-op!
--
2.28.0
1
0
[PATCH v3] d3dcompiler/tests: Test d3d12 interface in test_reflection_bound_resources().
by Paul Gofman 10 Sep '20
by Paul Gofman 10 Sep '20
10 Sep '20
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v3:
- get desc by index where appropriate;
- also test d3d11 from d3d12 interface.
dlls/d3dcompiler_43/tests/reflection.c | 293 +++++++++++++++++--------
1 file changed, 201 insertions(+), 92 deletions(-)
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c
index f856aee43d6..0f660aab624 100644
--- a/dlls/d3dcompiler_43/tests/reflection.c
+++ b/dlls/d3dcompiler_43/tests/reflection.c
@@ -1084,10 +1084,11 @@ static void test_reflection_desc_ps_output(void)
}
/*
- * fxc.exe /E PS /Tps_4_0 /Fx
+ * fxc.exe /E PS /Tps_4_0 /Fo
*/
#if 0
-Texture2D tex1;
+Texture2D tex1[2];
+Texture2D tex2;
SamplerState sam
{
Filter = MIN_MAG_MIP_LINEAR;
@@ -1107,7 +1108,7 @@ cbuffer c2
float4 PS(float2 uv : TEXCOORD0) : sv_target
{
- float4 q = tex1.Sample(sam, uv);
+ float4 q = tex1[0].Sample(sam, uv) + tex1[1].Sample(sam, uv) + tex2.Sample(sam, uv);
q.x = q.x + x;
q.w = q.w + y[0] + y[1] + t;
return q;
@@ -1115,53 +1116,62 @@ float4 PS(float2 uv : TEXCOORD0) : sv_target
#endif
static const DWORD test_reflection_bound_resources_blob[] =
{
-0x43425844, 0xe4af0279, 0x690268fc, 0x76bf6a72, 0xe5aff43b, 0x00000001, 0x000003f4, 0x00000005,
-0x00000034, 0x000001e8, 0x0000021c, 0x00000250, 0x00000378, 0x46454452, 0x000001ac, 0x00000002,
-0x000000ac, 0x00000004, 0x0000001c, 0xffff0400, 0x00000100, 0x0000017a, 0x0000009c, 0x00000003,
-0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x000000a0, 0x00000002,
-0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000c, 0x000000a5, 0x00000000,
-0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x000000a8, 0x00000000,
-0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x006d6173, 0x31786574,
-0x00316300, 0xab003263, 0x000000a5, 0x00000003, 0x000000dc, 0x00000030, 0x00000000, 0x00000000,
-0x000000a8, 0x00000001, 0x00000160, 0x00000010, 0x00000000, 0x00000000, 0x00000124, 0x00000000,
-0x00000004, 0x00000002, 0x00000128, 0x00000000, 0x00000138, 0x00000010, 0x00000014, 0x00000002,
-0x0000013c, 0x00000000, 0x0000014c, 0x00000024, 0x00000004, 0x00000000, 0x00000150, 0x00000000,
-0xabab0078, 0x00030000, 0x00010001, 0x00000000, 0x00000000, 0xabab0079, 0x00030000, 0x00010001,
-0x00000002, 0x00000000, 0xabab007a, 0x00020000, 0x00010001, 0x00000000, 0x00000000, 0x00000178,
-0x00000000, 0x00000004, 0x00000002, 0x00000128, 0x00000000, 0x694d0074, 0x736f7263, 0x2074666f,
-0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39,
-0x31332e32, 0xab003131, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000,
-0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f,
-0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
-0x0000000f, 0x745f7673, 0x65677261, 0xabab0074, 0x52444853, 0x00000120, 0x00000040, 0x00000048,
-0x04000059, 0x00208e46, 0x00000000, 0x00000003, 0x04000059, 0x00208e46, 0x00000001, 0x00000001,
-0x0300005a, 0x00106000, 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062,
-0x00101032, 0x00000000, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x09000045,
-0x001000f2, 0x00000000, 0x00101046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000,
-0x08000000, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000000, 0x00000001,
-0x08000000, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000000, 0x00000002,
-0x08000000, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000001, 0x00000000,
-0x08000000, 0x00102012, 0x00000000, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, 0x00000000,
-0x05000036, 0x00102062, 0x00000000, 0x00100656, 0x00000000, 0x0100003e, 0x54415453, 0x00000074,
-0x00000007, 0x00000001, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000001,
-0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
-0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x43425844, 0x003472ed, 0xe3436185, 0xcc1faad3, 0xfdac0a07, 0x00000001, 0x000004b0, 0x00000005,
+ 0x00000034, 0x00000204, 0x00000238, 0x0000026c, 0x00000434, 0x46454452, 0x000001c8, 0x00000002,
+ 0x000000d0, 0x00000005, 0x0000001c, 0xffff0400, 0x00000100, 0x0000019e, 0x000000bc, 0x00000003,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x000000c0, 0x00000002,
+ 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000002, 0x0000000c, 0x000000c5, 0x00000002,
+ 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000c, 0x000000ca, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x000000cd, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x006d6173, 0x31786574,
+ 0x78657400, 0x31630032, 0x00326300, 0x000000ca, 0x00000003, 0x00000100, 0x00000030, 0x00000000,
+ 0x00000000, 0x000000cd, 0x00000001, 0x00000184, 0x00000010, 0x00000000, 0x00000000, 0x00000148,
+ 0x00000000, 0x00000004, 0x00000002, 0x0000014c, 0x00000000, 0x0000015c, 0x00000010, 0x00000014,
+ 0x00000002, 0x00000160, 0x00000000, 0x00000170, 0x00000024, 0x00000004, 0x00000000, 0x00000174,
+ 0x00000000, 0xabab0078, 0x00030000, 0x00010001, 0x00000000, 0x00000000, 0xabab0079, 0x00030000,
+ 0x00010001, 0x00000002, 0x00000000, 0xabab007a, 0x00020000, 0x00010001, 0x00000000, 0x00000000,
+ 0x0000019c, 0x00000000, 0x00000004, 0x00000002, 0x0000014c, 0x00000000, 0x694d0074, 0x736f7263,
+ 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, 0x2e303120,
+ 0xabab0031, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+ 0x00000003, 0x00000000, 0x00000303, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c,
+ 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f,
+ 0x745f7673, 0x65677261, 0xabab0074, 0x52444853, 0x000001c0, 0x00000040, 0x00000070, 0x04000059,
+ 0x00208e46, 0x00000000, 0x00000003, 0x04000059, 0x00208e46, 0x00000001, 0x00000001, 0x0300005a,
+ 0x00106000, 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000,
+ 0x00000001, 0x00005555, 0x04001858, 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032,
+ 0x00000000, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2,
+ 0x00000000, 0x00101046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000045,
+ 0x001000f2, 0x00000001, 0x00101046, 0x00000000, 0x00107e46, 0x00000001, 0x00106000, 0x00000000,
+ 0x07000000, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x09000045,
+ 0x001000f2, 0x00000001, 0x00101046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000000,
+ 0x07000000, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x08000000,
+ 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000000, 0x00000001, 0x08000000,
+ 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000000, 0x00000002, 0x08000000,
+ 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0020800a, 0x00000001, 0x00000000, 0x08000000,
+ 0x00102012, 0x00000000, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, 0x00000000, 0x05000036,
+ 0x00102062, 0x00000000, 0x00100656, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b,
+ 0x00000002, 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
-static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result[] =
+static const D3D12_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result[] =
{
{"sam", D3D_SIT_SAMPLER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
- {"tex1", D3D_SIT_TEXTURE, 0, 1, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff},
+ {"tex1", D3D_SIT_TEXTURE, 0, 2, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff},
+ {"tex2", D3D_SIT_TEXTURE, 2, 1, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff, 0, 2},
{"c1", D3D_SIT_CBUFFER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
- {"c2", D3D_SIT_CBUFFER, 1, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
+ {"c2", D3D_SIT_CBUFFER, 1, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0, 0, 1},
};
-static void test_reflection_bound_resources(const DWORD *blob, const D3D11_SHADER_INPUT_BIND_DESC *result,
+static void test_reflection_bound_resources(const DWORD *blob, const D3D12_SHADER_INPUT_BIND_DESC *result,
unsigned int result_count, unsigned int target_version)
{
- const D3D11_SHADER_INPUT_BIND_DESC *pdesc;
- D3D11_SHADER_INPUT_BIND_DESC desc;
+ ID3D12ShaderReflection *ref12 = NULL, *ref12_from_d3d11 = NULL, *ref11_from_d3d12 = NULL;
+ const D3D12_SHADER_INPUT_BIND_DESC *pdesc;
+ D3D12_SHADER_INPUT_BIND_DESC desc12;
+ D3D11_SHADER_INPUT_BIND_DESC desc11;
ID3D11ShaderReflection *ref11;
HRESULT hr, expected_hr;
unsigned int i;
@@ -1178,25 +1188,41 @@ static void test_reflection_bound_resources(const DWORD *blob, const D3D11_SHADE
if (hr == E_INVALIDARG)
return;
+#if D3D_COMPILER_VERSION
+ call_reflect(blob, blob[6], &IID_ID3D12ShaderReflection, (void **)&ref12);
+ ref11->lpVtbl->QueryInterface(ref11, &IID_ID3D12ShaderReflection, (void **)&ref12_from_d3d11);
+ ok((!ref12 && !ref12_from_d3d11) || (ref12 && ref12_from_d3d11), "Got unexpected interfaces %p, %p.\n",
+ ref12, ref12_from_d3d11);
+
+ if (ref12)
+ {
+ ok(ref12 != (void *)ref11, "Got unexpected interfaces %p, %p.\n", ref11, ref12);
+ ok(ref12_from_d3d11 == (void *)ref11, "Got unexpected interfaces %p, %p.\n",
+ ref11, ref12_from_d3d11);
+ ref12->lpVtbl->QueryInterface(ref12, &IID_ID3D11ShaderReflection, (void **)&ref11_from_d3d12);
+ ok(!!ref11_from_d3d12, "Got zero interface.\n");
+ }
+#endif
+
/* check invalid cases */
hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0, NULL);
- ok(hr == E_INVALIDARG, "GetResourceBindingDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
- hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0xffffffff, &desc);
- ok(hr == E_INVALIDARG, "GetResourceBindingDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0xffffffff, &desc11);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
#if D3D_COMPILER_VERSION
- hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, NULL, &desc);
- ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, NULL, &desc11);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "sam", NULL);
- ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "invalid", NULL);
- ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
- hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "invalid", &desc);
- ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
+ hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "invalid", &desc11);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %x.\n", hr);
#endif
/* GetResourceBindingDesc */
@@ -1204,31 +1230,68 @@ static void test_reflection_bound_resources(const DWORD *blob, const D3D11_SHADE
{
pdesc = &result[i];
- hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, i, &desc);
- ok(hr == S_OK, "GetResourceBindingDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
-
- ok(!strcmp(desc.Name, pdesc->Name), "GetResourceBindingDesc(%u) Name failed, got \"%s\", expected \"%s\"\n",
- i, desc.Name, pdesc->Name);
- ok(desc.Type == pdesc->Type, "GetResourceBindingDesc(%u) Type failed, got %x, expected %x\n",
- i, desc.Type, pdesc->Type);
- ok(desc.BindPoint == pdesc->BindPoint, "GetResourceBindingDesc(%u) BindPoint failed, got %u, expected %u\n",
- i, desc.BindPoint, pdesc->BindPoint);
- ok(desc.BindCount == pdesc->BindCount, "GetResourceBindingDesc(%u) BindCount failed, got %u, expected %u\n",
- i, desc.BindCount, pdesc->BindCount);
+ hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, i, &desc11);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc11.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc11.Name, i);
+ ok(desc11.Type == pdesc->Type, "Got unexpected Type %#x, i %u.\n", desc11.Type, i);
+ ok(desc11.BindPoint == pdesc->BindPoint, "Got unexpected BindPoint %u, i %u.\n", desc11.BindPoint, i);
+ ok(desc11.BindCount == pdesc->BindCount, "Got unexpected BindCount %u, i %u.\n", desc11.BindCount, i);
#if D3D_COMPILER_VERSION
expected = pdesc->uFlags;
#else
expected = 0;
todo_wine_if(pdesc->uFlags)
#endif
- ok(desc.uFlags == expected, "(%u): Got unexpected uFlags %#x, expected %#x.\n",
- i, desc.uFlags, expected);
- ok(desc.ReturnType == pdesc->ReturnType, "GetResourceBindingDesc(%u) ReturnType failed, got %x, expected %x\n",
- i, desc.ReturnType, pdesc->ReturnType);
- ok(desc.Dimension == pdesc->Dimension, "GetResourceBindingDesc(%u) Dimension failed, got %x, expected %x\n",
- i, desc.Dimension, pdesc->Dimension);
- ok(desc.NumSamples == pdesc->NumSamples, "GetResourceBindingDesc(%u) NumSamples failed, got %u, expected %u\n",
- i, desc.NumSamples, pdesc->NumSamples);
+ ok(desc11.uFlags == expected, "Got unexpected uFlags %#x, i %u.\n", desc11.uFlags, i);
+ ok(desc11.ReturnType == pdesc->ReturnType, "Got unexpected ReturnType %#x, i %u.\n", desc11.ReturnType, i);
+ ok(desc11.Dimension == pdesc->Dimension, "Got unexpected Dimenstion %#x, i %u.\n", desc11.Dimension, i);
+ ok(desc11.NumSamples == pdesc->NumSamples, "Got unexpected NumSamples %u, i %u.\n", desc11.NumSamples, i);
+
+ if (ref12)
+ {
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+
+ hr = ref12->lpVtbl->GetResourceBindingDesc(ref12, i, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ ok(desc12.Space == pdesc->Space, "Got unexpected Space %u, i %u.\n", desc12.Space, i);
+ ok(desc12.uID == pdesc->uID, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+ hr = ref12_from_d3d11->lpVtbl->GetResourceBindingDesc(ref12_from_d3d11, i, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ /* Native d3dcompiler_47 returns the same interface pointer when queried for ID3D12ShaderReflection
+ * from ID3D11ShaderReflection. Space field still gets the correct value on x64 due to
+ * D3D11_SHADER_INPUT_BIND_DESC padding. */
+ expected = offsetof(D3D12_SHADER_INPUT_BIND_DESC, Space) < sizeof(D3D11_SHADER_INPUT_BIND_DESC)
+ ? pdesc->Space : 0xdeadbeef;
+ ok(desc12.Space == expected, "Got unexpected Space %u, i %u.\n",
+ desc12.Space, i);
+ ok(desc12.uID == 0xdeadbeef, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+ hr = ref11_from_d3d12->lpVtbl->GetResourceBindingDesc(ref11_from_d3d12, i, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ ok(desc12.Space == pdesc->Space, "Got unexpected Space %u, i %u.\n", desc12.Space, i);
+ ok(desc12.uID == pdesc->uID, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+ }
}
#if D3D_COMPILER_VERSION
@@ -1237,30 +1300,76 @@ static void test_reflection_bound_resources(const DWORD *blob, const D3D11_SHADE
{
pdesc = &result[i];
- hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, pdesc->Name, &desc);
- ok(hr == S_OK, "GetResourceBindingDescByName(%u) failed, got %x, expected %x\n", i, hr, S_OK);
-
- ok(!strcmp(desc.Name, pdesc->Name), "GetResourceBindingDescByName(%u) Name failed, got \"%s\", expected \"%s\"\n",
- i, desc.Name, pdesc->Name);
- ok(desc.Type == pdesc->Type, "GetResourceBindingDescByName(%u) Type failed, got %x, expected %x\n",
- i, desc.Type, pdesc->Type);
- ok(desc.BindPoint == pdesc->BindPoint, "GetResourceBindingDescByName(%u) BindPoint failed, got %u, expected %u\n",
- i, desc.BindPoint, pdesc->BindPoint);
- ok(desc.BindCount == pdesc->BindCount, "GetResourceBindingDescByName(%u) BindCount failed, got %u, expected %u\n",
- i, desc.BindCount, pdesc->BindCount);
- ok(desc.uFlags == pdesc->uFlags, "GetResourceBindingDescByName(%u) uFlags failed, got %u, expected %u\n",
- i, desc.uFlags, pdesc->uFlags);
- ok(desc.ReturnType == pdesc->ReturnType, "GetResourceBindingDescByName(%u) ReturnType failed, got %x, expected %x\n",
- i, desc.ReturnType, pdesc->ReturnType);
- ok(desc.Dimension == pdesc->Dimension, "GetResourceBindingDescByName(%u) Dimension failed, got %x, expected %x\n",
- i, desc.Dimension, pdesc->Dimension);
- ok(desc.NumSamples == pdesc->NumSamples, "GetResourceBindingDescByName(%u) NumSamples failed, got %u, expected %u\n",
- i, desc.NumSamples, pdesc->NumSamples);
+ hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, pdesc->Name, &desc11);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc11.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc11.Name, i);
+ ok(desc11.Type == pdesc->Type, "Got unexpected Type %#x, i %u.\n", desc11.Type, i);
+ ok(desc11.BindPoint == pdesc->BindPoint, "Got unexpected BindPoint %u, i %u.\n", desc11.BindPoint, i);
+ ok(desc11.BindCount == pdesc->BindCount, "Got unexpected BindCount failed %u, i %u.\n", desc11.BindCount, i);
+ ok(desc11.uFlags == pdesc->uFlags, "Got unexpected uFlags %#x, i %u.\n", desc11.uFlags, i);
+ ok(desc11.ReturnType == pdesc->ReturnType, "Got unexpected ReturnType %#x, i %u.\n", desc11.ReturnType, i);
+ ok(desc11.Dimension == pdesc->Dimension, "Got unexpected Dimenstion %#x, i %u.\n", desc11.Dimension, i);
+ ok(desc11.NumSamples == pdesc->NumSamples, "Got unexpected NumSamples %u, i %u.\n", desc11.NumSamples, i);
+
+ if (ref12)
+ {
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+
+ hr = ref12->lpVtbl->GetResourceBindingDescByName(ref12, pdesc->Name, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ ok(desc12.Space == pdesc->Space, "Got unexpected Space %u, i %u.\n", desc12.Space, i);
+ ok(desc12.uID == pdesc->uID, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+ hr = ref12_from_d3d11->lpVtbl->GetResourceBindingDescByName(ref12_from_d3d11, pdesc->Name, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ expected = offsetof(D3D12_SHADER_INPUT_BIND_DESC, Space) < sizeof(D3D11_SHADER_INPUT_BIND_DESC)
+ ? pdesc->Space : 0xdeadbeef;
+ ok(desc12.Space == expected, "Got unexpected Space %u, i %u.\n",
+ desc12.Space, i);
+ ok(desc12.uID == 0xdeadbeef, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+
+ memset(&desc12, 0, sizeof(desc12));
+ desc12.Space = 0xdeadbeef;
+ desc12.uID = 0xdeadbeef;
+ hr = ref11_from_d3d12->lpVtbl->GetResourceBindingDescByName(ref11_from_d3d12, pdesc->Name, &desc12);
+ ok(hr == S_OK, "Got unexpected hr %x, i %u.\n", hr, i);
+ ok(!strcmp(desc12.Name, pdesc->Name), "Got unexpected Name \"%s\", i %u.\n", desc12.Name, i);
+ ok(!memcmp(&desc12.Type, &desc11.Type, sizeof(desc11) - offsetof(D3D11_SHADER_INPUT_BIND_DESC, Type)),
+ "D3D11 and D3D12 descs do not match.\n");
+ ok(desc12.Space == pdesc->Space, "Got unexpected Space %u, i %u.\n", desc12.Space, i);
+ ok(desc12.uID == pdesc->uID, "Got unexpected uID %#x, i %u.\n", desc12.uID, i);
+ }
}
#endif
+ if (ref12)
+ {
+ count = ref11_from_d3d12->lpVtbl->Release(ref11_from_d3d12);
+ ok(count == 1, "Got unexpected ref count %u.\n", count);
+
+ count = ref12->lpVtbl->Release(ref12);
+ ok(!count, "Got unexpected ref count %u.\n", count);
+
+ count = ref12_from_d3d11->lpVtbl->Release(ref12_from_d3d11);
+ ok(count == 1, "Got unexpected ref count %u.\n", count);
+ }
+
count = ref11->lpVtbl->Release(ref11);
- ok(count == 0, "Release failed %u\n", count);
+ ok(!count, "Got unexpected ref count %u.\n", count);
}
#if D3D_COMPILER_VERSION
@@ -2006,12 +2115,12 @@ static const DWORD test_reflection_bound_resources_sm51_blob[] =
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
-static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_sm51_result[] =
+static const D3D12_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_sm51_result[] =
{
{"sam", D3D_SIT_SAMPLER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
- {"tex1", D3D_SIT_TEXTURE, 1, 1, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff},
+ {"tex1", D3D_SIT_TEXTURE, 1, 1, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff, 1, 0},
{"c1", D3D_SIT_CBUFFER, 0, 1, D3D_SIF_USERPACKED, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
- {"c2", D3D_SIT_CBUFFER, 0, 1, D3D_SIF_USERPACKED, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
+ {"c2", D3D_SIT_CBUFFER, 0, 1, D3D_SIF_USERPACKED, 0, D3D_SRV_DIMENSION_UNKNOWN, 0, 1, 1},
};
static BOOL load_d3dreflect(void)
--
2.26.2
2
1