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
0f76b418
Commit
0f76b418
authored
Jul 08, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Make bsc heap based object.
parent
223df167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
domdoc.c
dlls/msxml3/domdoc.c
+37
-5
No files found.
dlls/msxml3/domdoc.c
View file @
0f76b418
...
...
@@ -51,7 +51,14 @@ static const WCHAR SZ_VALUE_XSLPATTERN[] = {'X','S','L','P','a','t','t','e','r',
typedef
struct
{
const
struct
IBindStatusCallbackVtbl
*
lpVtbl
;
}
bsc
;
LONG
ref
;
}
bsc_t
;
static
inline
bsc_t
*
impl_from_IBindStatusCallback
(
IBindStatusCallback
*
iface
)
{
return
(
bsc_t
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
bsc_t
,
lpVtbl
));
}
static
HRESULT
WINAPI
bsc_QueryInterface
(
IBindStatusCallback
*
iface
,
...
...
@@ -73,13 +80,26 @@ static HRESULT WINAPI bsc_QueryInterface(
static
ULONG
WINAPI
bsc_AddRef
(
IBindStatusCallback
*
iface
)
{
return
2
;
bsc_t
*
This
=
impl_from_IBindStatusCallback
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
bsc_Release
(
IBindStatusCallback
*
iface
)
{
return
1
;
bsc_t
*
This
=
impl_from_IBindStatusCallback
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
bsc_OnStartBinding
(
...
...
@@ -165,7 +185,15 @@ static const struct IBindStatusCallbackVtbl bsc_vtbl =
bsc_OnObjectAvailable
};
static
bsc
domdoc_bsc
=
{
&
bsc_vtbl
};
static
bsc_t
*
create_bsc
(
void
)
{
bsc_t
*
bsc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
bsc
));
bsc
->
lpVtbl
=
&
bsc_vtbl
;
bsc
->
ref
=
1
;
return
bsc
;
}
typedef
struct
_domdoc
{
...
...
@@ -1295,6 +1323,7 @@ static xmlDocPtr doread( LPWSTR filename )
WCHAR
url
[
INTERNET_MAX_URL_LENGTH
];
BYTE
buf
[
4096
];
DWORD
read
,
written
;
bsc_t
*
bsc
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
filename
));
...
...
@@ -1317,10 +1346,12 @@ static xmlDocPtr doread( LPWSTR filename )
filename
=
url
;
}
bsc
=
create_bsc
();
hr
=
CreateBindCtx
(
0
,
&
pbc
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
RegisterBindStatusCallback
(
pbc
,
(
IBindStatusCallback
*
)
&
domdoc_bsc
.
lpVtbl
,
NULL
,
0
);
hr
=
RegisterBindStatusCallback
(
pbc
,
(
IBindStatusCallback
*
)
&
bsc
->
lpVtbl
,
NULL
,
0
);
if
(
SUCCEEDED
(
hr
))
{
IMoniker
*
moniker
;
...
...
@@ -1362,6 +1393,7 @@ static xmlDocPtr doread( LPWSTR filename )
GlobalUnlock
(
hglobal
);
}
}
IBindStatusCallback_Release
((
IBindStatusCallback
*
)
&
bsc
->
lpVtbl
);
IStream_Release
(
memstream
);
IStream_Release
(
stream
);
return
xmldoc
;
...
...
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