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
7ca1ac73
Commit
7ca1ac73
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 retval BSTR handling for IVBSAXXMLReader.
parent
969f060e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
146 additions
and
35 deletions
+146
-35
saxreader.c
dlls/msxml3/saxreader.c
+146
-35
No files found.
dlls/msxml3/saxreader.c
View file @
7ca1ac73
...
...
@@ -705,7 +705,6 @@ static void update_position(saxlocator *This, BOOL fix_column)
}
/*** IVBSAXAttributes interface ***/
/*** IUnknown methods ***/
static
HRESULT
WINAPI
ivbsaxattributes_QueryInterface
(
IVBSAXAttributes
*
iface
,
REFIID
riid
,
...
...
@@ -719,16 +718,15 @@ static HRESULT WINAPI ivbsaxattributes_QueryInterface(
static
ULONG
WINAPI
ivbsaxattributes_AddRef
(
IVBSAXAttributes
*
iface
)
{
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
I
SAXLocator_AddRef
(
&
This
->
I
SAXLocator_iface
);
return
I
VBSAXLocator_AddRef
(
&
This
->
IVB
SAXLocator_iface
);
}
static
ULONG
WINAPI
ivbsaxattributes_Release
(
IVBSAXAttributes
*
iface
)
{
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
I
SAXLocator_Release
(
&
This
->
I
SAXLocator_iface
);
return
I
VBSAXLocator_Release
(
&
This
->
IVB
SAXLocator_iface
);
}
/*** IDispatch methods ***/
static
HRESULT
WINAPI
ivbsaxattributes_GetTypeInfoCount
(
IVBSAXAttributes
*
iface
,
UINT
*
pctinfo
)
{
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
...
...
@@ -745,13 +743,10 @@ static HRESULT WINAPI ivbsaxattributes_GetTypeInfo(
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
hr
=
get_typeinfo
(
IVBSAXAttributes_tid
,
ppTInfo
);
return
hr
;
return
get_typeinfo
(
IVBSAXAttributes_tid
,
ppTInfo
);
}
static
HRESULT
WINAPI
ivbsaxattributes_GetIDsOfNames
(
...
...
@@ -825,20 +820,45 @@ static HRESULT WINAPI ivbsaxattributes_getURI(
int
nIndex
,
BSTR
*
uri
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getURI
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
(
const
WCHAR
**
)
uri
,
&
len
);
const
WCHAR
*
uriW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
nIndex
,
uri
);
if
(
!
uri
)
return
E_POINTER
;
*
uri
=
NULL
;
hr
=
ISAXAttributes_getURI
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
&
uriW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
uriW
,
len
,
uri
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getLocalName
(
IVBSAXAttributes
*
iface
,
int
nIndex
,
BSTR
*
localN
ame
)
BSTR
*
n
ame
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getLocalName
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
(
const
WCHAR
**
)
localName
,
&
len
);
const
WCHAR
*
nameW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
nIndex
,
name
);
if
(
!
name
)
return
E_POINTER
;
*
name
=
NULL
;
hr
=
ISAXAttributes_getLocalName
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
&
nameW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
nameW
,
len
,
name
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getQName
(
...
...
@@ -846,9 +866,22 @@ static HRESULT WINAPI ivbsaxattributes_getQName(
int
nIndex
,
BSTR
*
QName
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getQName
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
(
const
WCHAR
**
)
QName
,
&
len
);
const
WCHAR
*
nameW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
nIndex
,
QName
);
if
(
!
QName
)
return
E_POINTER
;
*
QName
=
NULL
;
hr
=
ISAXAttributes_getQName
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
&
nameW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
nameW
,
len
,
QName
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getIndexFromName
(
...
...
@@ -877,9 +910,22 @@ static HRESULT WINAPI ivbsaxattributes_getType(
int
nIndex
,
BSTR
*
type
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getType
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
(
const
WCHAR
**
)
type
,
&
len
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
nIndex
,
type
);
if
(
!
type
)
return
E_POINTER
;
*
type
=
NULL
;
hr
=
ISAXAttributes_getType
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
&
typeW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
typeW
,
len
,
type
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getTypeFromName
(
...
...
@@ -888,10 +934,23 @@ static HRESULT WINAPI ivbsaxattributes_getTypeFromName(
BSTR
localName
,
BSTR
*
type
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getTypeFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
type
,
&
len
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
uri
),
debugstr_w
(
localName
),
type
);
if
(
!
type
)
return
E_POINTER
;
*
type
=
NULL
;
hr
=
ISAXAttributes_getTypeFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
&
typeW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
typeW
,
len
,
type
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getTypeFromQName
(
...
...
@@ -899,10 +958,23 @@ static HRESULT WINAPI ivbsaxattributes_getTypeFromQName(
BSTR
QName
,
BSTR
*
type
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getTypeFromQName
(
&
This
->
ISAXAttributes_iface
,
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
type
,
&
len
);
const
WCHAR
*
typeW
;
HRESULT
hr
;
int
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
ivbsaxattributes_getValue
(
...
...
@@ -910,9 +982,22 @@ static HRESULT WINAPI ivbsaxattributes_getValue(
int
nIndex
,
BSTR
*
value
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getValue
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
(
const
WCHAR
**
)
value
,
&
len
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
nIndex
,
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
NULL
;
hr
=
ISAXAttributes_getValue
(
&
This
->
ISAXAttributes_iface
,
nIndex
,
&
valueW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
valueW
,
len
,
value
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getValueFromName
(
...
...
@@ -921,10 +1006,23 @@ static HRESULT WINAPI ivbsaxattributes_getValueFromName(
BSTR
localName
,
BSTR
*
value
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getValueFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
(
const
WCHAR
**
)
value
,
&
len
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
len
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_w
(
uri
),
debugstr_w
(
localName
),
value
);
if
(
!
value
)
return
E_POINTER
;
*
value
=
NULL
;
hr
=
ISAXAttributes_getValueFromName
(
&
This
->
ISAXAttributes_iface
,
uri
,
SysStringLen
(
uri
),
localName
,
SysStringLen
(
localName
),
&
valueW
,
&
len
);
if
(
FAILED
(
hr
))
return
hr
;
return
return_bstrn
(
valueW
,
len
,
value
);
}
static
HRESULT
WINAPI
ivbsaxattributes_getValueFromQName
(
...
...
@@ -932,10 +1030,23 @@ static HRESULT WINAPI ivbsaxattributes_getValueFromQName(
BSTR
QName
,
BSTR
*
value
)
{
int
len
;
saxlocator
*
This
=
impl_from_IVBSAXAttributes
(
iface
);
return
ISAXAttributes_getValueFromQName
(
&
This
->
ISAXAttributes_iface
,
QName
,
SysStringLen
(
QName
),
(
const
WCHAR
**
)
value
,
&
len
);
const
WCHAR
*
valueW
;
HRESULT
hr
;
int
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
ivbsaxattributes_vtbl
=
...
...
@@ -3045,19 +3156,19 @@ static const struct IVBSAXXMLReaderVtbl VBSAXXMLReaderVtbl =
static
HRESULT
WINAPI
isaxxmlreader_QueryInterface
(
ISAXXMLReader
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
saxreader
*
This
=
impl_from_ISAXXMLReader
(
iface
);
return
saxxmlr
eader_QueryInterface
(
&
This
->
IVBSAXXMLReader_iface
,
riid
,
ppvObject
);
return
IVBSAXXMLR
eader_QueryInterface
(
&
This
->
IVBSAXXMLReader_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
isaxxmlreader_AddRef
(
ISAXXMLReader
*
iface
)
{
saxreader
*
This
=
impl_from_ISAXXMLReader
(
iface
);
return
saxxmlr
eader_AddRef
(
&
This
->
IVBSAXXMLReader_iface
);
return
IVBSAXXMLR
eader_AddRef
(
&
This
->
IVBSAXXMLReader_iface
);
}
static
ULONG
WINAPI
isaxxmlreader_Release
(
ISAXXMLReader
*
iface
)
{
saxreader
*
This
=
impl_from_ISAXXMLReader
(
iface
);
return
saxxmlr
eader_Release
(
&
This
->
IVBSAXXMLReader_iface
);
return
IVBSAXXMLR
eader_Release
(
&
This
->
IVBSAXXMLReader_iface
);
}
/*** ISAXXMLReader methods ***/
...
...
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