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
9c9838d9
Commit
9c9838d9
authored
May 24, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use registered protocols.
parent
9fb647ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
27 deletions
+76
-27
binding.c
dlls/urlmon/binding.c
+1
-1
internet.c
dlls/urlmon/internet.c
+0
-16
session.c
dlls/urlmon/session.c
+73
-9
urlmon_main.h
dlls/urlmon/urlmon_main.h
+2
-1
No files found.
dlls/urlmon/binding.c
View file @
9c9838d9
...
...
@@ -789,7 +789,7 @@ static HRESULT get_protocol(Binding *This, LPCWSTR url)
return
S_OK
;
}
hres
=
get_protocol_
iface
(
url
,
&
unk
);
hres
=
get_protocol_
handler
(
url
,
&
unk
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/urlmon/internet.c
View file @
9c9838d9
...
...
@@ -61,22 +61,6 @@ static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size,
return
S_OK
;
}
static
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
url
)
{
IInternetProtocolInfo
*
ret
=
NULL
;
IUnknown
*
unk
;
HRESULT
hres
;
hres
=
get_protocol_iface
(
url
,
&
unk
);
if
(
FAILED
(
hres
))
return
NULL
;
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
IUnknown_Release
(
unk
);
return
ret
;
}
static
HRESULT
parse_security_url
(
LPCWSTR
url
,
DWORD
flags
,
LPWSTR
result
,
DWORD
size
,
DWORD
*
rsize
)
{
IInternetProtocolInfo
*
protocol_info
;
...
...
dlls/urlmon/session.c
View file @
9c9838d9
/*
* Copyright 2005
Jacek Caban
* Copyright 2005
-2006 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -42,11 +42,23 @@ typedef struct name_space {
static
name_space
*
name_space_list
=
NULL
;
HRESULT
get_protocol_iface
(
LPCWSTR
url
,
IUnknown
**
ret
)
static
IClassFactory
*
find_name_space
(
LPCWSTR
protocol
)
{
WCHAR
schema
[
64
],
str_clsid
[
64
];
name_space
*
iter
;
for
(
iter
=
name_space_list
;
iter
;
iter
=
iter
->
next
)
{
if
(
!
strcmpW
(
iter
->
protocol
,
protocol
))
return
iter
->
cf
;
}
return
NULL
;
}
static
HRESULT
get_protocol_iface
(
LPCWSTR
schema
,
DWORD
schema_len
,
IUnknown
**
ret
)
{
WCHAR
str_clsid
[
64
];
HKEY
hkey
=
NULL
;
DWORD
res
,
type
,
size
,
schema_len
;
DWORD
res
,
type
,
size
;
CLSID
clsid
;
LPWSTR
wszKey
;
HRESULT
hres
;
...
...
@@ -55,11 +67,6 @@ HRESULT get_protocol_iface(LPCWSTR url, IUnknown **ret)
{
'P'
,
'R'
,
'O'
,
'T'
,
'O'
,
'C'
,
'O'
,
'L'
,
'S'
,
'\\'
,
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
'r'
,
'\\'
};
static
const
WCHAR
wszCLSID
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
hres
=
CoInternetParseUrl
(
url
,
PARSE_SCHEMA
,
0
,
schema
,
sizeof
(
schema
)
/
sizeof
(
schema
[
0
]),
&
schema_len
,
0
);
if
(
FAILED
(
hres
)
||
!
schema_len
)
return
E_FAIL
;
wszKey
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
wszProtocolsKey
)
+
(
schema_len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
wszKey
,
wszProtocolsKey
,
sizeof
(
wszProtocolsKey
));
memcpy
(
wszKey
+
sizeof
(
wszProtocolsKey
)
/
sizeof
(
WCHAR
),
schema
,
(
schema_len
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -88,6 +95,63 @@ HRESULT get_protocol_iface(LPCWSTR url, IUnknown **ret)
return
CoGetClassObject
(
&
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
ret
);
}
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
url
)
{
IInternetProtocolInfo
*
ret
=
NULL
;
IClassFactory
*
cf
;
IUnknown
*
unk
;
WCHAR
schema
[
64
];
DWORD
schema_len
;
HRESULT
hres
;
hres
=
CoInternetParseUrl
(
url
,
PARSE_SCHEMA
,
0
,
schema
,
sizeof
(
schema
)
/
sizeof
(
schema
[
0
]),
&
schema_len
,
0
);
if
(
FAILED
(
hres
)
||
!
schema_len
)
return
NULL
;
cf
=
find_name_space
(
schema
);
if
(
cf
)
{
hres
=
IClassFactory_QueryInterface
(
cf
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
if
(
SUCCEEDED
(
hres
))
return
ret
;
hres
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
if
(
SUCCEEDED
(
hres
))
return
ret
;
}
hres
=
get_protocol_iface
(
schema
,
schema_len
,
&
unk
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IInternetProtocolInfo
,
(
void
**
)
&
ret
);
IUnknown_Release
(
unk
);
return
ret
;
}
HRESULT
get_protocol_handler
(
LPCWSTR
url
,
IUnknown
**
ret
)
{
IClassFactory
*
cf
;
WCHAR
schema
[
64
];
DWORD
schema_len
;
HRESULT
hres
;
hres
=
CoInternetParseUrl
(
url
,
PARSE_SCHEMA
,
0
,
schema
,
sizeof
(
schema
)
/
sizeof
(
schema
[
0
]),
&
schema_len
,
0
);
if
(
FAILED
(
hres
)
||
!
schema_len
)
return
schema_len
?
hres
:
E_FAIL
;
cf
=
find_name_space
(
schema
);
if
(
cf
)
{
hres
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
ret
);
if
(
SUCCEEDED
(
hres
))
return
hres
;
}
return
get_protocol_iface
(
schema
,
schema_len
,
ret
);
}
static
HRESULT
WINAPI
InternetSession_QueryInterface
(
IInternetSession
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
dlls/urlmon/urlmon_main.h
View file @
9c9838d9
...
...
@@ -54,7 +54,8 @@ typedef struct
HRESULT
UMCreateStreamOnCacheFile
(
LPCWSTR
pszURL
,
DWORD
dwSize
,
LPWSTR
pszFileName
,
HANDLE
*
phfile
,
IUMCacheStream
**
ppstr
);
void
UMCloseCacheFileStream
(
IUMCacheStream
*
pstr
);
HRESULT
get_protocol_iface
(
LPCWSTR
url
,
IUnknown
**
ret
);
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
url
);
HRESULT
get_protocol_handler
(
LPCWSTR
url
,
IUnknown
**
ret
);
HRESULT
start_binding
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
void
**
ppv
);
...
...
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