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
aaa8186a
Commit
aaa8186a
authored
Dec 17, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add custom handling for DISPID_VALUE for node list.
parent
d5e73555
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
19 deletions
+86
-19
nodelist.c
dlls/msxml3/nodelist.c
+50
-16
domdoc.c
dlls/msxml3/tests/domdoc.c
+36
-3
No files found.
dlls/msxml3/nodelist.c
View file @
aaa8186a
...
...
@@ -329,28 +329,62 @@ static HRESULT xmlnodelist_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD fl
TRACE
(
"(%p)->(%x %x %x %p %p %p)
\n
"
,
This
,
id
,
lcid
,
flags
,
params
,
res
,
ei
);
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
NULL
;
if
(
id
<
DISPID_DOM_COLLECTION_BASE
||
id
>
DISPID_DOM_COLLECTION_MAX
)
return
DISP_E_UNKNOWNNAME
;
switch
(
flags
)
if
(
id
>=
DISPID_DOM_COLLECTION_BASE
&&
id
<=
DISPID_DOM_COLLECTION_MAX
)
{
case
INVOKE_PROPERTYGET
:
switch
(
flags
)
{
IXMLDOMNode
*
disp
=
NULL
;
IXMLDOMNodeList_get_item
(
&
This
->
IXMLDOMNodeList_iface
,
id
-
DISPID_DOM_COLLECTION_BASE
,
&
disp
);
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
disp
;
break
;
case
DISPATCH_PROPERTYGET
:
{
IXMLDOMNode
*
disp
=
NULL
;
V_VT
(
res
)
=
VT_DISPATCH
;
IXMLDOMNodeList_get_item
(
&
This
->
IXMLDOMNodeList_iface
,
id
-
DISPID_DOM_COLLECTION_BASE
,
&
disp
);
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
disp
;
break
;
}
default:
{
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
break
;
}
}
default:
}
else
if
(
id
==
DISPID_VALUE
)
{
switch
(
flags
)
{
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
break
;
case
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_METHOD
:
{
IXMLDOMNode
*
item
;
VARIANT
index
;
HRESULT
hr
;
if
(
params
->
cArgs
-
params
->
cNamedArgs
!=
1
)
return
DISP_E_BADPARAMCOUNT
;
VariantInit
(
&
index
);
hr
=
VariantChangeType
(
&
index
,
params
->
rgvarg
,
0
,
VT_I4
);
if
(
FAILED
(
hr
))
{
FIXME
(
"failed to convert arg, %s
\n
"
,
debugstr_variant
(
params
->
rgvarg
));
return
hr
;
}
IXMLDOMNodeList_get_item
(
&
This
->
IXMLDOMNodeList_iface
,
V_I4
(
&
index
),
&
item
);
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
item
;
break
;
}
default:
{
FIXME
(
"DISPID_VALUE: unimplemented flags %x
\n
"
,
flags
);
break
;
}
}
}
else
return
DISP_E_UNKNOWNNAME
;
TRACE
(
"ret %p
\n
"
,
V_DISPATCH
(
res
));
...
...
dlls/msxml3/tests/domdoc.c
View file @
aaa8186a
...
...
@@ -10005,6 +10005,34 @@ static void test_dispex(void)
V_VT
(
&
arg
)
=
VT_I4
;
V_I2
(
&
arg
)
=
0
;
dispparams
.
cArgs
=
0
;
dispparams
.
cNamedArgs
=
0
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
rgvarg
=
&
arg
;
V_VT
(
&
ret
)
=
VT_EMPTY
;
V_DISPATCH
(
&
ret
)
=
(
void
*
)
0x1
;
hr
=
IDispatchEx_Invoke
(
dispex
,
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dispparams
,
&
ret
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_BADPARAMCOUNT
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
ret
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_DISPATCH
(
&
ret
)
==
(
void
*
)
0x1
,
"got %p
\n
"
,
V_DISPATCH
(
&
ret
));
V_VT
(
&
arg
)
=
VT_I4
;
V_I2
(
&
arg
)
=
0
;
dispparams
.
cArgs
=
2
;
dispparams
.
cNamedArgs
=
0
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
rgvarg
=
&
arg
;
V_VT
(
&
ret
)
=
VT_EMPTY
;
V_DISPATCH
(
&
ret
)
=
(
void
*
)
0x1
;
hr
=
IDispatchEx_Invoke
(
dispex
,
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dispparams
,
&
ret
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_BADPARAMCOUNT
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
ret
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_DISPATCH
(
&
ret
)
==
(
void
*
)
0x1
,
"got %p
\n
"
,
V_DISPATCH
(
&
ret
));
V_VT
(
&
arg
)
=
VT_I4
;
V_I2
(
&
arg
)
=
0
;
dispparams
.
cArgs
=
1
;
dispparams
.
cNamedArgs
=
0
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
...
...
@@ -10013,7 +10041,6 @@ static void test_dispex(void)
V_VT
(
&
ret
)
=
VT_EMPTY
;
V_DISPATCH
(
&
ret
)
=
(
void
*
)
0x1
;
hr
=
IDispatchEx_Invoke
(
dispex
,
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dispparams
,
&
ret
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
ret
)
==
VT_DISPATCH
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_DISPATCH
(
&
ret
)
==
NULL
,
"got %p
\n
"
,
V_DISPATCH
(
&
ret
));
...
...
@@ -10025,6 +10052,13 @@ todo_wine
ok
(
V_VT
(
&
ret
)
==
VT_DISPATCH
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_DISPATCH
(
&
ret
)
==
NULL
,
"got %p
\n
"
,
V_DISPATCH
(
&
ret
));
V_VT
(
&
ret
)
=
VT_EMPTY
;
V_DISPATCH
(
&
ret
)
=
(
void
*
)
0x1
;
hr
=
IDispatchEx_Invoke
(
dispex
,
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
,
&
dispparams
,
&
ret
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
ret
)
==
VT_DISPATCH
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_DISPATCH
(
&
ret
)
==
NULL
,
"got %p
\n
"
,
V_DISPATCH
(
&
ret
));
dispparams
.
cArgs
=
0
;
dispparams
.
cNamedArgs
=
0
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
...
...
@@ -10046,10 +10080,9 @@ todo_wine
V_I4
(
&
ret
)
=
1
;
hr
=
IDispatchEx_Invoke
(
dispex
,
DISPID_DOM_NODELIST_LENGTH
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dispparams
,
&
ret
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
{
ok
(
V_VT
(
&
ret
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
ret
));
ok
(
V_I4
(
&
ret
)
==
1
,
"got %d
\n
"
,
V_I4
(
&
ret
));
}
IXMLDOMNodeList_Release
(
node_list
);
/* IXMLDOMParseError */
...
...
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