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
2e62330c
Commit
2e62330c
authored
Dec 28, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Move setting protocol_sink to separated function.
parent
c0361750
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
bindprot.c
dlls/urlmon/bindprot.c
+21
-6
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-0
No files found.
dlls/urlmon/bindprot.c
View file @
2e62330c
...
...
@@ -105,9 +105,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
IInternetProtocol_Release
(
This
->
protocol
);
if
(
This
->
bind_info
)
IInternetBindInfo_Release
(
This
->
bind_info
);
if
(
This
->
protocol_sink
)
IInternetProtocolSink_Release
(
This
->
protocol_sink
);
set_binding_sink
(
PROTOCOL
(
This
),
NULL
);
heap_free
(
This
);
URLMON_UnlockModule
();
...
...
@@ -172,10 +171,7 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
IInternetBindInfo_AddRef
(
pOIBindInfo
);
This
->
bind_info
=
pOIBindInfo
;
IInternetProtocolSink_AddRef
(
pOIProtSink
);
This
->
protocol_sink
=
pOIProtSink
;
IInternetProtocolSink_QueryInterface
(
pOIProtSink
,
&
IID_IServiceProvider
,
(
void
**
)
&
This
->
service_provider
);
set_binding_sink
(
PROTOCOL
(
This
),
pOIProtSink
);
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IInternetPriority
,
(
void
**
)
&
priority
);
if
(
SUCCEEDED
(
hres
))
{
...
...
@@ -268,6 +264,25 @@ static HRESULT WINAPI BindProtocol_UnlockRequest(IInternetProtocol *iface)
return
IInternetProtocol_UnlockRequest
(
This
->
protocol
);
}
void
set_binding_sink
(
IInternetProtocol
*
bind_protocol
,
IInternetProtocolSink
*
sink
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
bind_protocol
);
IInternetProtocolSink
*
prev_sink
;
IServiceProvider
*
service_provider
=
NULL
;
if
(
sink
)
IInternetProtocolSink_AddRef
(
sink
);
prev_sink
=
InterlockedExchangePointer
((
void
**
)
&
This
->
protocol_sink
,
sink
);
if
(
prev_sink
)
IInternetProtocolSink_Release
(
prev_sink
);
if
(
sink
)
IInternetProtocolSink_QueryInterface
(
sink
,
&
IID_IServiceProvider
,
(
void
**
)
&
service_provider
);
service_provider
=
InterlockedExchangePointer
((
void
**
)
&
This
->
service_provider
,
service_provider
);
if
(
service_provider
)
IServiceProvider_Release
(
service_provider
);
}
#undef PROTOCOL_THIS
static
const
IInternetProtocolVtbl
BindProtocolVtbl
=
{
...
...
dlls/urlmon/urlmon_main.h
View file @
2e62330c
...
...
@@ -71,6 +71,7 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret);
HRESULT
start_binding
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
void
**
ppv
);
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
);
void
set_binding_sink
(
IInternetProtocol
*
bind_protocol
,
IInternetProtocolSink
*
sink
);
static
inline
void
*
heap_alloc
(
size_t
len
)
{
...
...
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