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
451a8a6d
Commit
451a8a6d
authored
Feb 07, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Set BINDF_NEEDFILE flag for all not urlmon protocols.
parent
2689b5a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
5 deletions
+36
-5
binding.c
dlls/urlmon/binding.c
+36
-5
No files found.
dlls/urlmon/binding.c
View file @
451a8a6d
...
@@ -1089,14 +1089,46 @@ static HRESULT get_protocol(Binding *This, LPCWSTR url)
...
@@ -1089,14 +1089,46 @@ static HRESULT get_protocol(Binding *This, LPCWSTR url)
return
hres
;
return
hres
;
}
}
static
BOOL
is_urlmon_protocol
(
LPCWSTR
url
)
{
static
const
WCHAR
wszCdl
[]
=
{
'c'
,
'd'
,
'l'
};
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
};
static
const
WCHAR
wszFtp
[]
=
{
'f'
,
't'
,
'p'
};
static
const
WCHAR
wszGopher
[]
=
{
'g'
,
'o'
,
'p'
,
'h'
,
'e'
,
'r'
};
static
const
WCHAR
wszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
};
static
const
WCHAR
wszHttps
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
};
static
const
WCHAR
wszMk
[]
=
{
'm'
,
'k'
};
static
const
struct
{
LPCWSTR
scheme
;
int
len
;
}
protocol_list
[]
=
{
{
wszCdl
,
sizeof
(
wszCdl
)
/
sizeof
(
WCHAR
)},
{
wszFile
,
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)},
{
wszFtp
,
sizeof
(
wszFtp
)
/
sizeof
(
WCHAR
)},
{
wszGopher
,
sizeof
(
wszGopher
)
/
sizeof
(
WCHAR
)},
{
wszHttp
,
sizeof
(
wszHttp
)
/
sizeof
(
WCHAR
)},
{
wszHttps
,
sizeof
(
wszHttps
)
/
sizeof
(
WCHAR
)},
{
wszMk
,
sizeof
(
wszMk
)
/
sizeof
(
WCHAR
)}
};
int
i
,
len
=
strlenW
(
url
);
for
(
i
=
0
;
i
<
sizeof
(
protocol_list
)
/
sizeof
(
protocol_list
[
0
]);
i
++
)
{
if
(
len
>=
protocol_list
[
i
].
len
&&
!
memcmp
(
url
,
protocol_list
[
i
].
scheme
,
protocol_list
[
i
].
len
*
sizeof
(
WCHAR
)))
return
TRUE
;
}
return
FALSE
;
}
static
HRESULT
Binding_Create
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
Binding
**
binding
)
static
HRESULT
Binding_Create
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
Binding
**
binding
)
{
{
Binding
*
ret
;
Binding
*
ret
;
int
len
;
int
len
;
HRESULT
hres
;
HRESULT
hres
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
if
(
!
IsEqualGUID
(
&
IID_IStream
,
riid
))
{
if
(
!
IsEqualGUID
(
&
IID_IStream
,
riid
))
{
FIXME
(
"Unsupported riid %s
\n
"
,
debugstr_guid
(
riid
));
FIXME
(
"Unsupported riid %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
@@ -1159,11 +1191,10 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
...
@@ -1159,11 +1191,10 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
ret
->
bindf
|=
BINDF_FROMURLMON
;
ret
->
bindf
|=
BINDF_FROMURLMON
;
len
=
strlenW
(
url
)
+
1
;
if
(
!
is_urlmon_protocol
(
url
))
if
(
len
<
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
||
memcmp
(
wszFile
,
url
,
sizeof
(
wszFile
)))
ret
->
bindf
|=
BINDF_NEEDFILE
;
ret
->
bindf
|=
BINDF_NEEDFILE
;
len
=
strlenW
(
url
)
+
1
;
ret
->
url
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
ret
->
url
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
url
,
url
,
len
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
url
,
url
,
len
*
sizeof
(
WCHAR
));
...
...
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