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
5673a582
Commit
5673a582
authored
Feb 10, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Feb 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml: Add ISupportErrorInfo for named node maps.
parent
adb1335e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
3 deletions
+65
-3
nodemap.c
dlls/msxml3/nodemap.c
+54
-3
domdoc.c
dlls/msxml3/tests/domdoc.c
+11
-0
No files found.
dlls/msxml3/nodemap.c
View file @
5673a582
...
...
@@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef
struct
_xmlnodemap
{
const
struct
IXMLDOMNamedNodeMapVtbl
*
lpVtbl
;
const
struct
ISupportErrorInfoVtbl
*
lpSEIVtbl
;
LONG
ref
;
IXMLDOMNode
*
node
;
}
xmlnodemap
;
...
...
@@ -50,19 +51,28 @@ static inline xmlnodemap *impl_from_IXMLDOMNamedNodeMap( IXMLDOMNamedNodeMap *if
return
(
xmlnodemap
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
xmlnodemap
,
lpVtbl
));
}
static
inline
xmlnodemap
*
impl_from_ISupportErrorInfo
(
ISupportErrorInfo
*
iface
)
{
return
(
xmlnodemap
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
xmlnodemap
,
lpSEIVtbl
));
}
static
HRESULT
WINAPI
xmlnodemap_QueryInterface
(
IXMLDOMNamedNodeMap
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
xmlnodemap
*
This
=
impl_from_IXMLDOMNamedNodeMap
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IXMLDOMElement
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IXMLDOMN
ode
)
)
IsEqualGUID
(
riid
,
&
IID_IXMLDOMN
amedNodeMap
)
)
{
*
ppvObject
=
iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ISupportErrorInfo
))
{
*
ppvObject
=
&
This
->
lpSEIVtbl
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -321,6 +331,46 @@ static const struct IXMLDOMNamedNodeMapVtbl xmlnodemap_vtbl =
xmlnodemap__newEnum
,
};
static
HRESULT
WINAPI
support_error_QueryInterface
(
ISupportErrorInfo
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
xmlnodemap
*
This
=
impl_from_ISupportErrorInfo
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
return
IXMLDOMNamedNodeMap_QueryInterface
((
IXMLDOMNamedNodeMap
*
)
&
This
->
lpVtbl
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
support_error_AddRef
(
ISupportErrorInfo
*
iface
)
{
xmlnodemap
*
This
=
impl_from_ISupportErrorInfo
(
iface
);
return
IXMLDOMNamedNodeMap_AddRef
((
IXMLDOMNamedNodeMap
*
)
&
This
->
lpVtbl
);
}
static
ULONG
WINAPI
support_error_Release
(
ISupportErrorInfo
*
iface
)
{
xmlnodemap
*
This
=
impl_from_ISupportErrorInfo
(
iface
);
return
IXMLDOMNamedNodeMap_Release
((
IXMLDOMNamedNodeMap
*
)
&
This
->
lpVtbl
);
}
static
HRESULT
WINAPI
support_error_InterfaceSupportsErrorInfo
(
ISupportErrorInfo
*
iface
,
REFIID
riid
)
{
FIXME
(
"(%p)->(%s)
\n
"
,
iface
,
debugstr_guid
(
riid
));
return
S_FALSE
;
}
static
const
struct
ISupportErrorInfoVtbl
support_error_vtbl
=
{
support_error_QueryInterface
,
support_error_AddRef
,
support_error_Release
,
support_error_InterfaceSupportsErrorInfo
};
IXMLDOMNamedNodeMap
*
create_nodemap
(
IXMLDOMNode
*
node
)
{
xmlnodemap
*
nodemap
;
...
...
@@ -330,6 +380,7 @@ IXMLDOMNamedNodeMap *create_nodemap( IXMLDOMNode *node )
return
NULL
;
nodemap
->
lpVtbl
=
&
xmlnodemap_vtbl
;
nodemap
->
lpSEIVtbl
=
&
support_error_vtbl
;
nodemap
->
node
=
node
;
nodemap
->
ref
=
1
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
5673a582
...
...
@@ -347,6 +347,17 @@ void test_domnode( void )
if
(
map
)
{
ISupportErrorInfo
*
support_error
;
r
=
IXMLDOMNamedNodeMap_QueryInterface
(
map
,
&
IID_ISupportErrorInfo
,
(
LPVOID
*
)
&
support_error
);
ok
(
r
==
S_OK
,
"ret %08lx
\n
"
,
r
);
r
=
ISupportErrorInfo_InterfaceSupportsErrorInfo
(
support_error
,
&
IID_IXMLDOMNamedNodeMap
);
todo_wine
{
ok
(
r
==
S_OK
,
"ret %08lx
\n
"
,
r
);
}
ISupportErrorInfo_Release
(
support_error
);
str
=
SysAllocString
(
szdl
);
r
=
IXMLDOMNamedNodeMap_getNamedItem
(
map
,
str
,
&
node
);
ok
(
r
==
S_OK
,
"getNamedItem returned wrong code
\n
"
);
...
...
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