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
fcc1dd01
Commit
fcc1dd01
authored
Nov 15, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Make get_protocol_handler IUri-based.
parent
b54ac3c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
bindprot.c
dlls/urlmon/bindprot.c
+1
-8
session.c
dlls/urlmon/session.c
+16
-13
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-1
No files found.
dlls/urlmon/bindprot.c
View file @
fcc1dd01
...
...
@@ -541,15 +541,8 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
if
(
!
protocol
)
{
IClassFactory
*
cf
;
IUnknown
*
unk
;
BSTR
raw_uri
;
/* FIXME: Avoid GetRawUri here */
hres
=
IUri_GetRawUri
(
pUri
,
&
raw_uri
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
get_protocol_handler
(
raw_uri
,
&
clsid
,
&
urlmon_protocol
,
&
cf
);
SysFreeString
(
raw_uri
);
hres
=
get_protocol_handler
(
pUri
,
&
clsid
,
&
urlmon_protocol
,
&
cf
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/urlmon/session.c
View file @
fcc1dd01
...
...
@@ -236,23 +236,22 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
return
ret
;
}
HRESULT
get_protocol_handler
(
LPCWSTR
url
,
CLSID
*
clsid
,
BOOL
*
urlmon_protocol
,
IClassFactory
**
ret
)
HRESULT
get_protocol_handler
(
IUri
*
uri
,
CLSID
*
clsid
,
BOOL
*
urlmon_protocol
,
IClassFactory
**
ret
)
{
name_space
*
ns
;
WCHAR
schema
[
64
];
DWORD
schema_len
;
BSTR
scheme
;
HRESULT
hres
;
*
ret
=
NULL
;
hres
=
CoInternetParseUrl
(
url
,
PARSE_SCHEMA
,
0
,
schema
,
sizeof
(
schema
)
/
sizeof
(
schema
[
0
]),
&
schema_len
,
0
);
if
(
FAILED
(
hres
)
||
!
schema_len
)
return
schema_len
?
hres
:
MK_E_SYNTAX
;
/* FIXME: Avoid GetSchemeName call for known schemes */
hres
=
IUri_GetSchemeName
(
uri
,
&
scheme
);
if
(
FAILED
(
hres
))
return
hres
;
EnterCriticalSection
(
&
session_cs
);
ns
=
find_name_space
(
schem
a
);
ns
=
find_name_space
(
schem
e
);
if
(
ns
)
{
*
ret
=
ns
->
cf
;
IClassFactory_AddRef
(
*
ret
);
...
...
@@ -264,12 +263,16 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, BOOL *urlmon_protocol, I
LeaveCriticalSection
(
&
session_cs
);
if
(
*
ret
)
return
S_OK
;
if
(
*
ret
)
{
hres
=
S_OK
;
}
else
{
if
(
urlmon_protocol
)
*
urlmon_protocol
=
FALSE
;
hres
=
get_protocol_cf
(
scheme
,
SysStringLen
(
scheme
),
clsid
,
ret
);
}
if
(
urlmon_protocol
)
*
urlmon_protocol
=
FALSE
;
return
get_protocol_cf
(
schema
,
schema_len
,
clsid
,
ret
);
SysFreeString
(
scheme
);
return
hres
;
}
IInternetProtocol
*
get_mime_filter
(
LPCWSTR
mime
)
...
...
dlls/urlmon/urlmon_main.h
View file @
fcc1dd01
...
...
@@ -66,7 +66,7 @@ static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_ref
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
);
HRESULT
get_protocol_handler
(
LPCWSTR
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
);
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
);
IInternetProtocol
*
get_mime_filter
(
LPCWSTR
);
BOOL
is_registered_protocol
(
LPCWSTR
);
void
register_urlmon_namespace
(
IClassFactory
*
,
REFIID
,
LPCWSTR
,
BOOL
);
...
...
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