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
5b7a55f6
Commit
5b7a55f6
authored
Jul 24, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Accept ISequentialStream as reader input.
parent
92110cbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
+30
-15
saxreader.c
dlls/msxml3/saxreader.c
+30
-15
No files found.
dlls/msxml3/saxreader.c
View file @
5b7a55f6
...
...
@@ -2295,7 +2295,7 @@ static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int siz
return
hr
;
}
static
HRESULT
internal_parseStream
(
saxreader
*
This
,
IStream
*
stream
,
BOOL
vbInterface
)
static
HRESULT
internal_parseStream
(
saxreader
*
This
,
IS
equentialS
tream
*
stream
,
BOOL
vbInterface
)
{
saxlocator
*
locator
;
HRESULT
hr
;
...
...
@@ -2304,7 +2304,7 @@ static HRESULT internal_parseStream(saxreader *This, IStream *stream, BOOL vbInt
int
ret
;
dataRead
=
0
;
hr
=
IStream_Read
(
stream
,
data
,
sizeof
(
data
),
&
dataRead
);
hr
=
IS
equentialS
tream_Read
(
stream
,
data
,
sizeof
(
data
),
&
dataRead
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
SAXLocator_create
(
This
,
&
locator
,
vbInterface
);
...
...
@@ -2331,7 +2331,7 @@ static HRESULT internal_parseStream(saxreader *This, IStream *stream, BOOL vbInt
while
(
1
)
{
dataRead
=
0
;
hr
=
IStream_Read
(
stream
,
data
,
sizeof
(
data
),
&
dataRead
);
hr
=
IS
equentialS
tream_Read
(
stream
,
data
,
sizeof
(
data
),
&
dataRead
);
if
(
FAILED
(
hr
))
break
;
ret
=
xmlParseChunk
(
locator
->
pParserCtxt
,
data
,
dataRead
,
0
);
...
...
@@ -2411,7 +2411,7 @@ static HRESULT internal_parse(
case
VT_UNKNOWN
:
case
VT_DISPATCH
:
{
IPersistStream
*
persistStream
;
IStream
*
stream
=
NULL
;
IS
equentialS
tream
*
stream
=
NULL
;
IXMLDOMDocument
*
xmlDoc
;
if
(
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
varInput
),
...
...
@@ -2430,29 +2430,44 @@ static HRESULT internal_parse(
if
(
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
varInput
),
&
IID_IPersistStream
,
(
void
**
)
&
persistStream
)
==
S_OK
)
{
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
IStream
*
stream_copy
;
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream_copy
);
if
(
hr
!=
S_OK
)
{
IPersistStream_Release
(
persistStream
);
return
hr
;
}
hr
=
IPersistStream_Save
(
persistStream
,
stream
,
TRUE
);
hr
=
IPersistStream_Save
(
persistStream
,
stream
_copy
,
TRUE
);
IPersistStream_Release
(
persistStream
);
if
(
hr
!=
S_OK
)
{
IStream_Release
(
stream
);
stream
=
NULL
;
}
if
(
hr
==
S_OK
)
IStream_QueryInterface
(
stream_copy
,
&
IID_ISequentialStream
,
(
void
**
)
&
stream
);
IStream_Release
(
stream_copy
);
}
/* try base interface first */
if
(
!
stream
)
{
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
varInput
),
&
IID_ISequentialStream
,
(
void
**
)
&
stream
);
if
(
!
stream
)
/* this should never happen if IStream is implemented properly, but just in case */
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
varInput
),
&
IID_IStream
,
(
void
**
)
&
stream
);
}
if
(
stream
||
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
varInput
),
&
IID_IStream
,
(
void
**
)
&
stream
)
==
S_OK
)
if
(
stream
)
{
hr
=
internal_parseStream
(
This
,
stream
,
vbInterface
);
IStream_Release
(
stream
);
break
;
ISequentialStream_Release
(
stream
);
}
else
{
WARN
(
"IUnknown* input doesn't support any of expected interfaces
\n
"
);
hr
=
E_INVALIDARG
;
}
break
;
}
default:
WARN
(
"vt %d not implemented
\n
"
,
V_VT
(
&
varInput
));
...
...
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