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
2cbd6a63
Commit
2cbd6a63
authored
Mar 12, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Added internal function for loading xml from IMoniker.
parent
ecf31f2c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
21 deletions
+39
-21
bsc.c
dlls/msxml3/bsc.c
+17
-15
domdoc.c
dlls/msxml3/domdoc.c
+11
-3
msxml_private.h
dlls/msxml3/msxml_private.h
+3
-1
saxreader.c
dlls/msxml3/saxreader.c
+8
-2
No files found.
dlls/msxml3/bsc.c
View file @
2cbd6a63
...
...
@@ -242,12 +242,9 @@ static const struct IBindStatusCallbackVtbl bsc_vtbl =
bsc_OnObjectAvailable
};
HRESULT
bind_url
(
LPCWSTR
url
,
HRESULT
(
*
onDataAvailable
)(
void
*
,
char
*
,
DWORD
),
void
*
obj
,
bsc_t
**
ret
)
HRESULT
create_moniker_from_url
(
LPCWSTR
url
,
IMoniker
**
mon
)
{
WCHAR
fileUrl
[
INTERNET_MAX_URL_LENGTH
];
bsc_t
*
bsc
;
IBindCtx
*
pbc
;
HRESULT
hr
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
url
));
...
...
@@ -270,6 +267,18 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
url
=
fileUrl
;
}
return
CreateURLMonikerEx
(
NULL
,
url
,
mon
,
0
);
}
HRESULT
bind_url
(
IMoniker
*
mon
,
HRESULT
(
*
onDataAvailable
)(
void
*
,
char
*
,
DWORD
),
void
*
obj
,
bsc_t
**
ret
)
{
bsc_t
*
bsc
;
IBindCtx
*
pbc
;
HRESULT
hr
;
TRACE
(
"%p
\n
"
,
mon
);
hr
=
CreateBindCtx
(
0
,
&
pbc
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -287,17 +296,10 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
hr
=
RegisterBindStatusCallback
(
pbc
,
&
bsc
->
IBindStatusCallback_iface
,
NULL
,
0
);
if
(
SUCCEEDED
(
hr
))
{
IMoniker
*
moniker
;
hr
=
CreateURLMoniker
(
NULL
,
url
,
&
moniker
);
if
(
SUCCEEDED
(
hr
))
{
IStream
*
stream
;
hr
=
IMoniker_BindToStorage
(
moniker
,
pbc
,
NULL
,
&
IID_IStream
,
(
LPVOID
*
)
&
stream
);
IMoniker_Release
(
moniker
);
if
(
stream
)
IStream_Release
(
stream
);
}
IStream
*
stream
;
hr
=
IMoniker_BindToStorage
(
mon
,
pbc
,
NULL
,
&
IID_IStream
,
(
LPVOID
*
)
&
stream
);
if
(
stream
)
IStream_Release
(
stream
);
IBindCtx_Release
(
pbc
);
}
...
...
dlls/msxml3/domdoc.c
View file @
2cbd6a63
...
...
@@ -1996,12 +1996,13 @@ static HRESULT domdoc_onDataAvailable(void *obj, char *ptr, DWORD len)
return
S_OK
;
}
static
HRESULT
doread
(
domdoc
*
This
,
LPWSTR
filename
)
HRESULT
domdoc_load_moniker
(
IXMLDOMDocument3
*
iface
,
IMoniker
*
mon
)
{
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
bsc_t
*
bsc
;
HRESULT
hr
;
hr
=
bind_url
(
filename
,
domdoc_onDataAvailable
,
This
,
&
bsc
);
hr
=
bind_url
(
mon
,
domdoc_onDataAvailable
,
This
,
&
bsc
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -2145,7 +2146,14 @@ static HRESULT WINAPI domdoc_load(
if
(
filename
)
{
hr
=
doread
(
This
,
filename
);
IMoniker
*
mon
;
hr
=
create_moniker_from_url
(
filename
,
&
mon
);
if
(
SUCCEEDED
(
hr
)
)
{
hr
=
domdoc_load_moniker
(
iface
,
mon
);
IMoniker_Release
(
mon
);
}
if
(
FAILED
(
hr
)
)
This
->
error
=
E_FAIL
;
...
...
dlls/msxml3/msxml_private.h
View file @
2cbd6a63
...
...
@@ -487,8 +487,10 @@ static inline const CLSID* SchemaCache_version(MSXML_VERSION v)
typedef
struct
bsc_t
bsc_t
;
HRESULT
bind_url
(
LPCWSTR
,
HRESULT
(
*
onDataAvailable
)(
void
*
,
char
*
,
DWORD
),
void
*
,
bsc_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_moniker_from_url
(
LPCWSTR
,
IMoniker
**
)
DECLSPEC_HIDDEN
;
HRESULT
bind_url
(
IMoniker
*
,
HRESULT
(
*
onDataAvailable
)(
void
*
,
char
*
,
DWORD
),
void
*
,
bsc_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
detach_bsc
(
bsc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
domdoc_load_moniker
(
IXMLDOMDocument3
*
,
IMoniker
*
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_variant
(
const
VARIANT
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/msxml3/saxreader.c
View file @
2cbd6a63
...
...
@@ -2423,13 +2423,19 @@ static HRESULT internal_parseURL(
const
WCHAR
*
url
,
BOOL
vbInterface
)
{
IMoniker
*
mon
;
bsc_t
*
bsc
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
url
));
if
(
vbInterface
)
hr
=
bind_url
(
url
,
internal_vbonDataAvailable
,
This
,
&
bsc
);
else
hr
=
bind_url
(
url
,
internal_onDataAvailable
,
This
,
&
bsc
);
hr
=
create_moniker_from_url
(
url
,
&
mon
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
vbInterface
)
hr
=
bind_url
(
mon
,
internal_vbonDataAvailable
,
This
,
&
bsc
);
else
hr
=
bind_url
(
mon
,
internal_onDataAvailable
,
This
,
&
bsc
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
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