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
03183590
Commit
03183590
authored
May 08, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Don't store IWinInetInfo reference in BindProtocol.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
73fd4b09
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
28 deletions
+28
-28
binding.c
dlls/urlmon/binding.c
+24
-5
bindprot.c
dlls/urlmon/bindprot.c
+1
-10
session.c
dlls/urlmon/session.c
+2
-11
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-2
No files found.
dlls/urlmon/binding.c
View file @
03183590
...
...
@@ -792,13 +792,23 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void
TRACE
(
"(%p)->(IID_IServiceProvider %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IServiceProvider_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWinInetInfo
,
riid
))
{
IWinInetInfo
*
wininet_info
;
HRESULT
hres
;
TRACE
(
"(%p)->(IID_IWinInetInfo %p)
\n
"
,
This
,
ppv
);
/* NOTE: This violidates COM rules, but tests prove that we should do it */
if
(
!
This
->
protocol
->
wininet_info
)
if
(
!
This
->
protocol
->
protocol_unk
)
return
E_NOINTERFACE
;
*
ppv
=
&
This
->
IWinInetHttpInfo_iface
;
if
(
This
->
protocol
->
protocol_unk
)
{
hres
=
IUnknown_QueryInterface
(
This
->
protocol
->
protocol_unk
,
&
IID_IWinInetInfo
,
(
void
**
)
&
wininet_info
);
if
(
SUCCEEDED
(
hres
))
{
IWinInetInfo_Release
(
wininet_info
);
*
ppv
=
&
This
->
IWinInetHttpInfo_iface
;
}
}
}
else
if
(
IsEqualGUID
(
&
IID_IWinInetHttpInfo
,
riid
))
{
IWinInetHttpInfo
*
http_info
;
HRESULT
hres
;
...
...
@@ -1313,13 +1323,22 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD
void
*
pBuffer
,
DWORD
*
pcbBuffer
)
{
Binding
*
This
=
impl_from_IWinInetHttpInfo
(
iface
);
IWinInetInfo
*
wininet_info
;
HRESULT
hres
;
TRACE
(
"(%p)->(%x %p %p)
\n
"
,
This
,
dwOption
,
pBuffer
,
pcbBuffer
);
if
(
!
This
->
protocol
->
wininet_info
)
if
(
!
This
->
protocol
->
protocol_unk
)
return
E_FAIL
;
return
IWinInetInfo_QueryOption
(
This
->
protocol
->
wininet_info
,
dwOption
,
pBuffer
,
pcbBuffer
);
hres
=
IUnknown_QueryInterface
(
This
->
protocol
->
protocol_unk
,
&
IID_IWinInetHttpInfo
,
(
void
**
)
&
wininet_info
);
if
(
FAILED
(
hres
))
return
E_FAIL
;
hres
=
IWinInetInfo_QueryOption
(
wininet_info
,
dwOption
,
pBuffer
,
pcbBuffer
);
IWinInetInfo_Release
(
wininet_info
);
return
hres
;
}
static
HRESULT
WINAPI
WinInetHttpInfo_QueryInfo
(
IWinInetHttpInfo
*
iface
,
DWORD
dwOption
,
...
...
dlls/urlmon/bindprot.c
View file @
03183590
...
...
@@ -330,10 +330,6 @@ static ULONG WINAPI BindProtocol_AddRef(IInternetProtocolEx *iface)
static
void
release_protocol_handler
(
BindProtocol
*
This
)
{
if
(
This
->
wininet_info
)
{
IWinInetInfo_Release
(
This
->
wininet_info
);
This
->
wininet_info
=
NULL
;
}
if
(
This
->
protocol_unk
)
{
IUnknown_Release
(
This
->
protocol_unk
);
This
->
protocol_unk
=
NULL
;
...
...
@@ -497,7 +493,6 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
IInternetProtocolEx
*
protocolex
;
IInternetPriority
*
priority
;
IServiceProvider
*
service_provider
;
BOOL
urlmon_protocol
=
FALSE
;
CLSID
clsid
=
IID_NULL
;
IUnknown
*
protocol_unk
=
NULL
;
LPOLESTR
clsid_str
;
...
...
@@ -529,7 +524,7 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
if
(
!
protocol
)
{
IClassFactory
*
cf
;
hres
=
get_protocol_handler
(
pUri
,
&
clsid
,
&
urlmon_protocol
,
&
cf
);
hres
=
get_protocol_handler
(
pUri
,
&
clsid
,
&
cf
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -562,10 +557,6 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
This
->
protocol_unk
=
protocol_unk
;
This
->
protocol
=
protocol
;
if
(
urlmon_protocol
)
{
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IWinInetInfo
,
(
void
**
)
&
This
->
wininet_info
);
}
set_binding_sink
(
This
,
pOIProtSink
,
pOIBindInfo
);
hres
=
IInternetProtocol_QueryInterface
(
protocol
,
&
IID_IInternetPriority
,
(
void
**
)
&
priority
);
...
...
dlls/urlmon/session.c
View file @
03183590
...
...
@@ -219,7 +219,7 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
return
ret
;
}
HRESULT
get_protocol_handler
(
IUri
*
uri
,
CLSID
*
clsid
,
BOOL
*
urlmon_protocol
,
IClassFactory
**
ret
)
HRESULT
get_protocol_handler
(
IUri
*
uri
,
CLSID
*
clsid
,
IClassFactory
**
ret
)
{
name_space
*
ns
;
BSTR
scheme
;
...
...
@@ -240,20 +240,11 @@ HRESULT get_protocol_handler(IUri *uri, CLSID *clsid, BOOL *urlmon_protocol, ICl
IClassFactory_AddRef
(
*
ret
);
if
(
clsid
)
*
clsid
=
ns
->
clsid
;
if
(
urlmon_protocol
)
*
urlmon_protocol
=
ns
->
urlmon
;
}
LeaveCriticalSection
(
&
session_cs
);
if
(
*
ret
)
{
hres
=
S_OK
;
}
else
{
if
(
urlmon_protocol
)
*
urlmon_protocol
=
FALSE
;
hres
=
get_protocol_cf
(
scheme
,
SysStringLen
(
scheme
),
clsid
,
ret
);
}
hres
=
*
ret
?
S_OK
:
get_protocol_cf
(
scheme
,
SysStringLen
(
scheme
),
clsid
,
ret
);
SysFreeString
(
scheme
);
return
hres
;
}
...
...
dlls/urlmon/urlmon_main.h
View file @
03183590
...
...
@@ -66,7 +66,7 @@ static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_ref
extern
HINSTANCE
urlmon_instance
;
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
IClassFactory
**
)
DECLSPEC_HIDDEN
;
IInternetProtocol
*
get_mime_filter
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
BOOL
is_registered_protocol
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
HRESULT
register_namespace
(
IClassFactory
*
,
REFIID
,
LPCWSTR
,
BOOL
)
DECLSPEC_HIDDEN
;
...
...
@@ -178,7 +178,6 @@ typedef struct {
IUnknown
*
protocol_unk
;
IInternetProtocol
*
protocol
;
IWinInetInfo
*
wininet_info
;
IInternetBindInfo
*
bind_info
;
IInternetProtocolSink
*
protocol_sink
;
...
...
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