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
d31969b5
Commit
d31969b5
authored
Feb 22, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Check if protocol object implements IInternetProtocolInfo interface.
parent
46132ee2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
session.c
dlls/urlmon/session.c
+9
-14
No files found.
dlls/urlmon/session.c
View file @
d31969b5
...
...
@@ -55,7 +55,7 @@ static name_space *find_name_space(LPCWSTR protocol)
return
NULL
;
}
static
HRESULT
get_protocol_
iface
(
LPCWSTR
schema
,
DWORD
schema_len
,
CLSID
*
pclsid
,
IUnknown
**
ret
)
static
HRESULT
get_protocol_
cf
(
LPCWSTR
schema
,
DWORD
schema_len
,
CLSID
*
pclsid
,
IClassFactory
**
ret
)
{
WCHAR
str_clsid
[
64
];
HKEY
hkey
=
NULL
;
...
...
@@ -96,14 +96,14 @@ static HRESULT get_protocol_iface(LPCWSTR schema, DWORD schema_len, CLSID *pclsi
if
(
pclsid
)
*
pclsid
=
clsid
;
return
CoGetClassObject
(
&
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_I
Unknown
,
(
void
**
)
ret
);
return
CoGetClassObject
(
&
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_I
ClassFactory
,
(
void
**
)
ret
);
}
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
url
)
{
IInternetProtocolInfo
*
ret
=
NULL
;
IClassFactory
*
cf
;
name_space
*
ns
;
IUnknown
*
unk
;
WCHAR
schema
[
64
];
DWORD
schema_len
;
HRESULT
hres
;
...
...
@@ -124,19 +124,20 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
return
ret
;
}
hres
=
get_protocol_
iface
(
schema
,
schema_len
,
NULL
,
&
unk
);
hres
=
get_protocol_
cf
(
schema
,
schema_len
,
NULL
,
&
cf
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
IUnknown_Release
(
unk
);
hres
=
IClassFactory_QueryInterface
(
cf
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
if
(
FAILED
(
hres
))
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
IClassFactory_Release
(
cf
);
return
ret
;
}
HRESULT
get_protocol_handler
(
LPCWSTR
url
,
CLSID
*
clsid
,
IClassFactory
**
ret
)
{
IUnknown
*
unk
;
name_space
*
ns
;
WCHAR
schema
[
64
];
DWORD
schema_len
;
...
...
@@ -155,13 +156,7 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret)
return
S_OK
;
}
hres
=
get_protocol_iface
(
schema
,
schema_len
,
clsid
,
&
unk
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IClassFactory
,
(
void
**
)
ret
);
IUnknown_Release
(
unk
);
return
hres
;
return
get_protocol_cf
(
schema
,
schema_len
,
clsid
,
ret
);
}
static
HRESULT
WINAPI
InternetSession_QueryInterface
(
IInternetSession
*
iface
,
...
...
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