Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
969f060e
Commit
969f060e
authored
Mar 05, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fix IVBSAXAttributes handling of retval BSTRs.
parent
3cce31b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
14 deletions
+134
-14
msxml_private.h
dlls/msxml3/msxml_private.h
+12
-0
mxwriter.c
dlls/msxml3/mxwriter.c
+122
-14
No files found.
dlls/msxml3/msxml_private.h
View file @
969f060e
...
...
@@ -457,6 +457,18 @@ static inline HRESULT return_bstr(const WCHAR *value, BSTR *p)
return
S_OK
;
}
static
inline
HRESULT
return_bstrn
(
const
WCHAR
*
value
,
int
len
,
BSTR
*
p
)
{
if
(
value
)
{
*
p
=
SysAllocStringLen
(
value
,
len
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
}
else
*
p
=
NULL
;
return
S_OK
;
}
static
inline
HRESULT
return_null_node
(
IXMLDOMNode
**
p
)
{
if
(
!
p
)
...
...
dlls/msxml3/mxwriter.c
View file @
969f060e
...
...
@@ -3155,25 +3155,61 @@ static HRESULT WINAPI VBSAXAttributes_get_length(IVBSAXAttributes* iface, int *l
static
HRESULT
WINAPI
VBSAXAttributes_getURI
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
uri
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
uriW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getURI
(
&
This
->
ISAXAttributes_iface
,
index
,
(
const
WCHAR
**
)
uri
,
&
len
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
uri
);
if
(
!
uri
)
return
E_POINTER
;
*
uri
=
NULL
;
hr
=
ISAXAttributes_getURI
(
&
This
->
ISAXAttributes_iface
,
index
,
&
uriW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
uriW
,
len
,
uri
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getLocalName
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
name
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
nameW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getLocalName
(
&
This
->
ISAXAttributes_iface
,
index
,
(
const
WCHAR
**
)
name
,
&
len
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
name
);
if
(
!
name
)
return
E_POINTER
;
*
name
=
NULL
;
hr
=
ISAXAttributes_getLocalName
(
&
This
->
ISAXAttributes_iface
,
index
,
&
nameW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
nameW
,
len
,
name
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getQName
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
qname
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
qnameW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getQName
(
&
This
->
ISAXAttributes_iface
,
index
,
(
const
WCHAR
**
)
qname
,
&
len
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
qname
);
if
(
!
qname
)
return
E_POINTER
;
*
qname
=
NULL
;
hr
=
ISAXAttributes_getQName
(
&
This
->
ISAXAttributes_iface
,
index
,
&
qnameW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
qnameW
,
len
,
qname
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getIndexFromName
(
IVBSAXAttributes
*
iface
,
BSTR
uri
,
BSTR
name
,
int
*
index
)
...
...
@@ -3190,58 +3226,130 @@ static HRESULT WINAPI VBSAXAttributes_getIndexFromQName(IVBSAXAttributes* iface,
SysStringLen
(
qname
),
index
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getType
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
type
)
static
HRESULT
WINAPI
VBSAXAttributes_getType
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
type
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getType
(
&
This
->
ISAXAttributes_iface
,
index
,
(
const
WCHAR
**
)
type
,
&
len
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
type
);
if
(
!
type
)
return
E_POINTER
;
*
type
=
NULL
;
hr
=
ISAXAttributes_getType
(
&
This
->
ISAXAttributes_iface
,
index
,
&
typeW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
typeW
,
len
,
type
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getTypeFromName
(
IVBSAXAttributes
*
iface
,
BSTR
uri
,
BSTR
name
,
BSTR
*
type
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getTypeFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
name
,
SysStringLen
(
name
),
(
const
WCHAR
**
)
type
,
&
len
);
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
uri
),
debugstr_w
(
name
),
type
);
if
(
!
type
)
return
E_POINTER
;
*
type
=
NULL
;
hr
=
ISAXAttributes_getTypeFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
name
,
SysStringLen
(
name
),
&
typeW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
typeW
,
len
,
type
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getTypeFromQName
(
IVBSAXAttributes
*
iface
,
BSTR
qname
,
BSTR
*
type
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getTypeFromQName
(
&
This
->
ISAXAttributes_iface
,
qname
,
SysStringLen
(
qname
),
(
const
WCHAR
**
)
type
,
&
len
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
qname
),
type
);
if
(
!
type
)
return
E_POINTER
;
*
type
=
NULL
;
hr
=
ISAXAttributes_getTypeFromQName
(
&
This
->
ISAXAttributes_iface
,
qname
,
SysStringLen
(
qname
),
&
typeW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
typeW
,
len
,
type
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getValue
(
IVBSAXAttributes
*
iface
,
int
index
,
BSTR
*
value
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getValue
(
&
This
->
ISAXAttributes_iface
,
index
,
(
const
WCHAR
**
)
value
,
&
len
);
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
NULL
;
hr
=
ISAXAttributes_getValue
(
&
This
->
ISAXAttributes_iface
,
index
,
&
valueW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
valueW
,
len
,
value
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getValueFromName
(
IVBSAXAttributes
*
iface
,
BSTR
uri
,
BSTR
name
,
BSTR
*
value
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getValueFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
name
,
SysStringLen
(
name
),
(
const
WCHAR
**
)
value
,
&
len
);
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
uri
),
debugstr_w
(
name
),
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
NULL
;
hr
=
ISAXAttributes_getValueFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
name
,
SysStringLen
(
name
),
&
valueW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
valueW
,
len
,
value
);
}
static
HRESULT
WINAPI
VBSAXAttributes_getValueFromQName
(
IVBSAXAttributes
*
iface
,
BSTR
qname
,
BSTR
*
value
)
{
mxattributes
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
len
;
return
ISAXAttributes_getValueFromQName
(
&
This
->
ISAXAttributes_iface
,
qname
,
SysStringLen
(
qname
),
(
const
WCHAR
**
)
value
,
&
len
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
qname
),
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
NULL
;
hr
=
ISAXAttributes_getValueFromQName
(
&
This
->
ISAXAttributes_iface
,
qname
,
SysStringLen
(
qname
),
&
valueW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
valueW
,
len
,
value
);
}
static
const
struct
IVBSAXAttributesVtbl
VBSAXAttributesVtbl
=
...
...
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