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
2e3f5243
Commit
2e3f5243
authored
Jan 04, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement createComment.
parent
48c0e684
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
domdoc.c
dlls/msxml3/domdoc.c
+23
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+10
-0
No files found.
dlls/msxml3/domdoc.c
View file @
2e3f5243
...
...
@@ -909,8 +909,29 @@ static HRESULT WINAPI domdoc_createComment(
BSTR
data
,
IXMLDOMComment
**
comment
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
domdoc
*
This
=
impl_from_IXMLDOMDocument2
(
iface
);
xmlNodePtr
xmlnode
;
xmlChar
*
xml_content
;
TRACE
(
"%p->(%s %p)
\n
"
,
iface
,
debugstr_w
(
data
),
comment
);
if
(
!
comment
)
return
E_INVALIDARG
;
*
comment
=
NULL
;
xml_content
=
xmlChar_from_wchar
((
WCHAR
*
)
data
);
xmlnode
=
xmlNewComment
(
xml_content
);
HeapFree
(
GetProcessHeap
(),
0
,
xml_content
);
if
(
!
xmlnode
)
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
*
comment
=
(
IXMLDOMComment
*
)
create_comment
(
xmlnode
);
return
S_OK
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
2e3f5243
...
...
@@ -135,6 +135,8 @@ static const WCHAR szstr2[] = { 's','t','r','2',0 };
static
const
WCHAR
szstar
[]
=
{
'*'
,
0
};
static
const
WCHAR
szfn1_txt
[]
=
{
'f'
,
'n'
,
'1'
,
'.'
,
't'
,
'x'
,
't'
,
0
};
static
WCHAR
szComment
[]
=
{
'A'
,
' '
,
'C'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
#define expect_bstr_eq_and_free(bstr, expect) { \
BSTR bstrExp = alloc_str_from_narrow(expect); \
ok(lstrcmpW(bstr, bstrExp) == 0, "String differs\n"); \
...
...
@@ -334,6 +336,7 @@ static void test_domdoc( void )
IXMLDOMElement
*
element
=
NULL
;
IXMLDOMNode
*
node
;
IXMLDOMText
*
nodetext
=
NULL
;
IXMLDOMComment
*
node_comment
=
NULL
;
VARIANT_BOOL
b
;
VARIANT
var
;
BSTR
str
;
...
...
@@ -498,6 +501,13 @@ static void test_domdoc( void )
IXMLDOMText_Release
(
nodetext
);
SysFreeString
(
str
);
/* test Create Comment */
r
=
IXMLDOMDocument_createComment
(
doc
,
NULL
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"returns %08x
\n
"
,
r
);
r
=
IXMLDOMDocument_createComment
(
doc
,
szComment
,
&
node_comment
);
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
IXMLDOMText_Release
(
node_comment
);
r
=
IXMLDOMDocument_Release
(
doc
);
ok
(
r
==
0
,
"document ref count incorrect
\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