Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d241788d
Commit
d241788d
authored
Mar 14, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Accept VT_UNKNOWN input for IXMLDOMSchemaCollection::add().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aaac0db6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
schema.c
dlls/msxml3/schema.c
+5
-5
schema.c
dlls/msxml3/tests/schema.c
+19
-0
No files found.
dlls/msxml3/schema.c
View file @
d241788d
...
...
@@ -1226,12 +1226,13 @@ static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2* iface, BSTR uri
break
;
case
VT_DISPATCH
:
case
VT_UNKNOWN
:
{
xmlDocPtr
doc
=
NULL
;
cache_entry
*
entry
;
CacheEntryType
type
;
IXMLDOMNode
*
domnode
=
NULL
;
I
Dispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IXMLDOMNode
,
(
void
**
)
&
domnode
);
I
Unknown_QueryInterface
(
V_UNKNOWN
(
&
var
),
&
IID_IXMLDOMNode
,
(
void
**
)
&
domnode
);
if
(
domnode
)
doc
=
xmlNodePtr_from_domnode
(
domnode
,
XML_DOCUMENT_NODE
)
->
doc
;
...
...
@@ -1275,10 +1276,9 @@ static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2* iface, BSTR uri
break
;
default:
{
heap_free
(
name
);
return
E_INVALIDARG
;
}
FIXME
(
"arg type is not supported, %s
\n
"
,
debugstr_variant
(
&
var
));
heap_free
(
name
);
return
E_INVALIDARG
;
}
heap_free
(
name
);
return
S_OK
;
...
...
dlls/msxml3/tests/schema.c
View file @
d241788d
...
...
@@ -506,6 +506,7 @@ static void test_schema_refs(void)
VARIANT_BOOL
b
;
BSTR
str
;
LONG
len
;
HRESULT
hr
;
doc
=
create_document
(
&
IID_IXMLDOMDocument2
);
if
(
!
doc
)
...
...
@@ -557,6 +558,24 @@ static void test_schema_refs(void)
ole_check
(
IXMLDOMSchemaCollection_get_length
(
cache
,
&
len
));
ok
(
len
==
0
,
"got %d
\n
"
,
len
);
/* same, but with VT_UNKNOWN type */
V_VT
(
&
v
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
&
v
)
=
(
IUnknown
*
)
doc
;
hr
=
IXMLDOMSchemaCollection_add
(
cache
,
NULL
,
v
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
len
=
-
1
;
hr
=
IXMLDOMSchemaCollection_get_length
(
cache
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
1
,
"got %d
\n
"
,
len
);
hr
=
IXMLDOMSchemaCollection_remove
(
cache
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
len
=
-
1
;
hr
=
IXMLDOMSchemaCollection_get_length
(
cache
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
len
==
0
,
"got %d
\n
"
,
len
);
str
=
SysAllocString
(
xdr_schema_uri
);
ole_check
(
IXMLDOMSchemaCollection_add
(
cache
,
str
,
_variantdoc_
(
doc
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment