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
42d2477e
Commit
42d2477e
authored
Jun 24, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dac2ea3e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
113 additions
and
122 deletions
+113
-122
Makefile.in
dlls/urlmon/Makefile.in
+2
-0
axinstall.c
dlls/urlmon/axinstall.c
+17
-17
binding.c
dlls/urlmon/binding.c
+2
-2
file.c
dlls/urlmon/file.c
+2
-2
http.c
dlls/urlmon/http.c
+4
-4
internet.c
dlls/urlmon/internet.c
+2
-2
mimefilter.c
dlls/urlmon/mimefilter.c
+8
-8
mk.c
dlls/urlmon/mk.c
+2
-2
protocol.c
dlls/urlmon/protocol.c
+1
-1
sec_mgr.c
dlls/urlmon/sec_mgr.c
+19
-23
session.c
dlls/urlmon/session.c
+6
-6
umon.c
dlls/urlmon/umon.c
+2
-2
uri.c
dlls/urlmon/uri.c
+42
-48
urlmon_main.c
dlls/urlmon/urlmon_main.c
+3
-3
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-2
No files found.
dlls/urlmon/Makefile.in
View file @
42d2477e
...
...
@@ -4,6 +4,8 @@ IMPORTS = uuid ole32 oleaut32 shell32 rpcrt4 shlwapi wininet user32 advapi32
EXTRADEFS
=
-D_URLMON_
DELAYIMPORTS
=
advpack
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
axinstall.c
\
bindctx.c
\
...
...
dlls/urlmon/axinstall.c
View file @
42d2477e
...
...
@@ -84,8 +84,8 @@ static HRESULT extract_cab_file(install_ctx_t *ctx)
return
hres
;
}
path_len
=
strlenW
(
ctx
->
tmp_dir
);
file_len
=
strlenW
(
ctx
->
file_name
);
path_len
=
l
strlenW
(
ctx
->
tmp_dir
);
file_len
=
l
strlenW
(
ctx
->
file_name
);
ctx
->
install_file
=
heap_alloc
((
path_len
+
file_len
+
2
)
*
sizeof
(
WCHAR
));
if
(
!
ctx
->
install_file
)
return
E_OUTOFMEMORY
;
...
...
@@ -149,13 +149,13 @@ static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, siz
static
const
WCHAR
expand_dirW
[]
=
{
'%'
,
'E'
,
'X'
,
'T'
,
'R'
,
'A'
,
'C'
,
'T'
,
'_'
,
'D'
,
'I'
,
'R'
,
'%'
};
while
((
ptr
=
strchrW
(
ptr
,
'%'
)))
{
while
((
ptr
=
wcschr
(
ptr
,
'%'
)))
{
if
(
buf
)
memcpy
(
buf
+
len
,
prev_ptr
,
ptr
-
prev_ptr
);
len
+=
ptr
-
prev_ptr
;
if
(
!
strncmpiW
(
ptr
,
expand_dirW
,
ARRAY_SIZE
(
expand_dirW
)))
{
len2
=
strlenW
(
ctx
->
tmp_dir
);
if
(
!
wcsnicmp
(
ptr
,
expand_dirW
,
ARRAY_SIZE
(
expand_dirW
)))
{
len2
=
l
strlenW
(
ctx
->
tmp_dir
);
if
(
buf
)
memcpy
(
buf
+
len
,
ctx
->
tmp_dir
,
len2
*
sizeof
(
WCHAR
));
len
+=
len2
;
...
...
@@ -172,8 +172,8 @@ static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, siz
}
if
(
buf
)
strcpyW
(
buf
+
len
,
prev_ptr
);
*
size
=
len
+
strlenW
(
prev_ptr
)
+
1
;
l
strcpyW
(
buf
+
len
,
prev_ptr
);
*
size
=
len
+
l
strlenW
(
prev_ptr
)
+
1
;
}
static
HRESULT
process_hook_section
(
install_ctx_t
*
ctx
,
const
WCHAR
*
sect_name
)
...
...
@@ -189,8 +189,8 @@ static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
if
(
!
len
)
return
S_OK
;
for
(
key
=
buf
;
*
key
;
key
+=
strlenW
(
key
)
+
1
)
{
if
(
!
strcmpiW
(
key
,
runW
))
{
for
(
key
=
buf
;
*
key
;
key
+=
l
strlenW
(
key
)
+
1
)
{
if
(
!
wcsicmp
(
key
,
runW
))
{
WCHAR
*
cmd
;
size_t
size
;
...
...
@@ -233,7 +233,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
if
(
len
)
{
default_install
=
FALSE
;
for
(
key
=
buf
;
*
key
;
key
+=
strlenW
(
key
)
+
1
)
{
for
(
key
=
buf
;
*
key
;
key
+=
l
strlenW
(
key
)
+
1
)
{
TRACE
(
"[Setup Hooks] key: %s
\n
"
,
debugstr_w
(
key
));
len
=
GetPrivateProfileStringW
(
setup_hooksW
,
key
,
NULL
,
sect_name
,
ARRAY_SIZE
(
sect_name
),
...
...
@@ -253,7 +253,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
if
(
len
)
{
default_install
=
FALSE
;
for
(
key
=
buf
;
*
key
;
key
+=
strlenW
(
key
)
+
1
)
{
for
(
key
=
buf
;
*
key
;
key
+=
l
strlenW
(
key
)
+
1
)
{
TRACE
(
"[Add.Code] key: %s
\n
"
,
debugstr_w
(
key
));
len
=
GetPrivateProfileStringW
(
add_codeW
,
key
,
NULL
,
sect_name
,
ARRAY_SIZE
(
sect_name
),
...
...
@@ -343,7 +343,7 @@ static void update_counter(install_ctx_t *ctx, HWND hwnd)
}
else
{
WCHAR
buf
[
100
];
LoadStringW
(
urlmon_instance
,
IDS_AXINSTALL_INSTALLN
,
buf
,
ARRAY_SIZE
(
buf
));
s
printfW
(
text
,
buf
,
ctx
->
counter
);
s
wprintf
(
text
,
ARRAY_SIZE
(
text
)
,
buf
,
ctx
->
counter
);
}
SetDlgItemTextW
(
hwnd
,
ID_AXINSTALL_INSTALL_BTN
,
text
);
...
...
@@ -445,22 +445,22 @@ static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
if
(
SUCCEEDED
(
hres
))
{
const
WCHAR
*
ptr
,
*
ptr2
,
*
ext
;
ptr
=
strrchrW
(
path
,
'/'
);
ptr
=
wcsrchr
(
path
,
'/'
);
if
(
!
ptr
)
ptr
=
path
;
else
ptr
++
;
ptr2
=
strrchrW
(
ptr
,
'\\'
);
ptr2
=
wcsrchr
(
ptr
,
'\\'
);
if
(
ptr2
)
ptr
=
ptr2
+
1
;
ctx
->
file_name
=
ptr
;
ext
=
strrchrW
(
ptr
,
'.'
);
ext
=
wcsrchr
(
ptr
,
'.'
);
if
(
!
ext
)
ext
=
ptr
;
if
(
!
strcmpiW
(
ext
,
cab_extW
))
{
if
(
!
wcsicmp
(
ext
,
cab_extW
))
{
hres
=
install_cab_file
(
ctx
);
}
else
{
FIXME
(
"Unsupported extension %s
\n
"
,
debugstr_w
(
ext
));
...
...
@@ -477,7 +477,7 @@ static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
WCHAR
buf
[
1024
],
fmt
[
1024
];
LoadStringW
(
urlmon_instance
,
IDS_AXINSTALL_FAILURE
,
fmt
,
ARRAY_SIZE
(
fmt
));
s
printfW
(
buf
,
fmt
,
hres
);
s
wprintf
(
buf
,
ARRAY_SIZE
(
buf
)
,
fmt
,
hres
);
MessageBoxW
(
ctx
->
hwnd
,
buf
,
NULL
,
MB_OK
);
}
...
...
dlls/urlmon/binding.c
View file @
42d2477e
...
...
@@ -199,10 +199,10 @@ static LPWSTR get_mime_clsid(LPCWSTR mime, CLSID *clsid)
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
' '
,
'T'
,
'y'
,
'p'
,
'e'
,
'\\'
};
static
const
WCHAR
clsidW
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
len
=
strlenW
(
mime
)
+
1
;
len
=
l
strlenW
(
mime
)
+
1
;
key_name
=
heap_alloc
(
sizeof
(
mime_keyW
)
+
len
*
sizeof
(
WCHAR
));
memcpy
(
key_name
,
mime_keyW
,
sizeof
(
mime_keyW
));
strcpyW
(
key_name
+
ARRAY_SIZE
(
mime_keyW
),
mime
);
l
strcpyW
(
key_name
+
ARRAY_SIZE
(
mime_keyW
),
mime
);
res
=
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
key_name
,
&
hkey
);
heap_free
(
key_name
);
...
...
dlls/urlmon/file.c
View file @
42d2477e
...
...
@@ -312,7 +312,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
file_handle
=
CreateFileW
(
path
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file_handle
==
INVALID_HANDLE_VALUE
&&
(
ptr
=
strrchrW
(
path
,
'#'
)))
{
if
(
file_handle
==
INVALID_HANDLE_VALUE
&&
(
ptr
=
wcsrchr
(
path
,
'#'
)))
{
/* If path contains fragment part, try without it. */
*
ptr
=
0
;
file_handle
=
CreateFileW
(
path
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
...
...
@@ -333,7 +333,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
hres
=
IUri_GetExtension
(
pUri
,
&
ext
);
if
(
SUCCEEDED
(
hres
))
{
if
(
hres
==
S_OK
&&
*
ext
)
{
if
((
ptr
=
strchrW
(
ext
,
'#'
)))
if
((
ptr
=
wcschr
(
ext
,
'#'
)))
*
ptr
=
0
;
hres
=
find_mime_from_ext
(
ext
,
&
mime
);
if
(
SUCCEEDED
(
hres
))
{
...
...
dlls/urlmon/http.c
View file @
42d2477e
...
...
@@ -246,7 +246,7 @@ static ULONG send_http_request(HttpProtocol *This)
BOOL
res
;
send_buffer
.
lpcszHeader
=
This
->
full_header
;
send_buffer
.
dwHeadersLength
=
send_buffer
.
dwHeadersTotal
=
strlenW
(
This
->
full_header
);
send_buffer
.
dwHeadersLength
=
send_buffer
.
dwHeadersTotal
=
l
strlenW
(
This
->
full_header
);
if
(
This
->
base
.
bind_info
.
dwBindVerb
!=
BINDVERB_GET
)
{
switch
(
This
->
base
.
bind_info
.
stgmedData
.
tymed
)
{
...
...
@@ -408,7 +408,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
return
hres
;
}
len
=
addl_header
?
strlenW
(
addl_header
)
:
0
;
len
=
addl_header
?
l
strlenW
(
addl_header
)
:
0
;
This
->
full_header
=
heap_alloc
(
len
*
sizeof
(
WCHAR
)
+
sizeof
(
default_headersW
));
if
(
!
This
->
full_header
)
{
...
...
@@ -561,7 +561,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
content_type
=
query_http_info
(
This
,
HTTP_QUERY_CONTENT_TYPE
);
if
(
content_type
)
{
/* remove the charset, if present */
LPWSTR
p
=
strchrW
(
content_type
,
';'
);
LPWSTR
p
=
wcschr
(
content_type
,
';'
);
if
(
p
)
*
p
=
'\0'
;
IInternetProtocolSink_ReportProgress
(
This
->
base
.
protocol_sink
,
...
...
@@ -579,7 +579,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
content_length
=
query_http_info
(
This
,
HTTP_QUERY_CONTENT_LENGTH
);
if
(
content_length
)
{
This
->
base
.
content_length
=
atoiW
(
content_length
);
This
->
base
.
content_length
=
wcstol
(
content_length
,
NULL
,
10
);
heap_free
(
content_length
);
}
...
...
dlls/urlmon/internet.c
View file @
42d2477e
...
...
@@ -156,7 +156,7 @@ static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size,
if
(
flags
)
ERR
(
"wrong flags
\n
"
);
ptr
=
strchrW
(
url
,
':'
);
ptr
=
wcschr
(
url
,
':'
);
if
(
ptr
)
len
=
ptr
-
url
;
...
...
@@ -594,7 +594,7 @@ static HRESULT load_process_feature(INTERNETFEATURELIST feature)
return
E_UNEXPECTED
;
}
process_name
=
strrchrW
(
module_name
,
'\\'
);
process_name
=
wcsrchr
(
module_name
,
'\\'
);
if
(
!
process_name
)
{
ERR
(
"Invalid module file name: %s
\n
"
,
debugstr_w
(
module_name
));
return
E_UNEXPECTED
;
...
...
dlls/urlmon/mimefilter.c
View file @
42d2477e
...
...
@@ -548,12 +548,12 @@ static BOOL is_known_mime_type(const WCHAR *mime)
unsigned
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
mime_filters_any_pos
);
i
++
)
{
if
(
!
strcmpW
(
mime
,
mime_filters_any_pos
[
i
].
mime
))
if
(
!
wcscmp
(
mime
,
mime_filters_any_pos
[
i
].
mime
))
return
TRUE
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
mime_filters
);
i
++
)
{
if
(
!
strcmpW
(
mime
,
mime_filters
[
i
].
mime
))
if
(
!
wcscmp
(
mime
,
mime_filters
[
i
].
mime
))
return
TRUE
;
}
...
...
@@ -569,7 +569,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
if
(
!
proposed_mime
)
return
E_FAIL
;
len
=
strlenW
(
proposed_mime
)
+
1
;
len
=
l
strlenW
(
proposed_mime
)
+
1
;
*
ret_mime
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
!*
ret_mime
)
return
E_OUTOFMEMORY
;
...
...
@@ -578,15 +578,15 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
return
S_OK
;
}
if
(
proposed_mime
&&
(
!
strcmpW
(
proposed_mime
,
app_octetstreamW
)
||
!
strcmpW
(
proposed_mime
,
text_plainW
)))
if
(
proposed_mime
&&
(
!
wcscmp
(
proposed_mime
,
app_octetstreamW
)
||
!
wcscmp
(
proposed_mime
,
text_plainW
)))
proposed_mime
=
NULL
;
if
(
proposed_mime
)
{
ret
=
proposed_mime
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
mime_filters_any_pos
);
i
++
)
{
if
(
!
strcmpW
(
proposed_mime
,
mime_filters_any_pos
[
i
].
mime
))
{
if
(
!
wcscmp
(
proposed_mime
,
mime_filters_any_pos
[
i
].
mime
))
{
any_pos_mime
=
i
;
for
(
len
=
size
;
len
>
0
;
len
--
)
{
if
(
mime_filters_any_pos
[
i
].
filter
(
buf
+
size
-
len
,
len
))
...
...
@@ -600,7 +600,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
if
(
i
==
ARRAY_SIZE
(
mime_filters_any_pos
))
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
mime_filters
);
i
++
)
{
if
(
!
strcmpW
(
proposed_mime
,
mime_filters
[
i
].
mime
))
{
if
(
!
wcscmp
(
proposed_mime
,
mime_filters
[
i
].
mime
))
{
if
(
!
mime_filters
[
i
].
filter
(
buf
,
size
))
ret
=
NULL
;
break
;
...
...
@@ -663,7 +663,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
TRACE
(
"found %s for %s
\n
"
,
debugstr_w
(
ret
),
debugstr_an
((
const
char
*
)
buf
,
min
(
32
,
size
)));
len
=
strlenW
(
ret
)
+
1
;
len
=
l
strlenW
(
ret
)
+
1
;
*
ret_mime
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
!*
ret_mime
)
return
E_OUTOFMEMORY
;
...
...
dlls/urlmon/mk.c
View file @
42d2477e
...
...
@@ -286,13 +286,13 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
}
progid
=
path
+
1
;
/* skip '@' symbol */
colon_ptr
=
strchrW
(
path
,
':'
);
colon_ptr
=
wcschr
(
path
,
':'
);
if
(
!
colon_ptr
)
{
SysFreeString
(
path
);
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
}
len
=
strlenW
(
path
);
len
=
l
strlenW
(
path
);
display_name
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
display_name
,
path
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
...
...
dlls/urlmon/protocol.c
View file @
42d2477e
...
...
@@ -307,7 +307,7 @@ HINTERNET get_internet_session(IInternetBindInfo *bind_info)
void
update_user_agent
(
WCHAR
*
user_agent
)
{
if
(
internet_session
)
InternetSetOptionW
(
internet_session
,
INTERNET_OPTION_USER_AGENT
,
user_agent
,
strlenW
(
user_agent
));
InternetSetOptionW
(
internet_session
,
INTERNET_OPTION_USER_AGENT
,
user_agent
,
l
strlenW
(
user_agent
));
}
HRESULT
protocol_start
(
Protocol
*
protocol
,
IInternetProtocol
*
prot
,
IUri
*
uri
,
...
...
dlls/urlmon/sec_mgr.c
View file @
42d2477e
...
...
@@ -65,7 +65,7 @@ static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\
static
inline
BOOL
is_drive_path
(
const
WCHAR
*
path
)
{
return
is
alphaW
(
*
path
)
&&
*
(
path
+
1
)
==
':'
;
return
is
walpha
(
*
path
)
&&
*
(
path
+
1
)
==
':'
;
}
/* List of schemes types Windows seems to expect to be hierarchical. */
...
...
@@ -184,8 +184,8 @@ static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone)
static
BOOL
matches_domain_pattern
(
LPCWSTR
pattern
,
LPCWSTR
str
,
BOOL
implicit_wildcard
,
LPCWSTR
*
matched
)
{
BOOL
matches
=
FALSE
;
DWORD
pattern_len
=
strlenW
(
pattern
);
DWORD
str_len
=
strlenW
(
str
);
DWORD
pattern_len
=
l
strlenW
(
pattern
);
DWORD
str_len
=
l
strlenW
(
str
);
TRACE
(
"(%d) Checking if %s matches %s
\n
"
,
implicit_wildcard
,
debugstr_w
(
str
),
debugstr_w
(
pattern
));
...
...
@@ -201,7 +201,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
* So in this case 'str' would have to end with ".google.com" in order
* to map to this pattern.
*/
if
(
str_len
>=
pattern_len
+
1
&&
!
strcmpiW
(
str
+
(
str_len
-
pattern_len
+
1
),
pattern
+
1
))
{
if
(
str_len
>=
pattern_len
+
1
&&
!
wcsicmp
(
str
+
(
str_len
-
pattern_len
+
1
),
pattern
+
1
))
{
/* Check if there's another '.' inside of the "unmatched" portion
* of 'str'.
*
...
...
@@ -215,14 +215,10 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
* a match.
*/
const
WCHAR
*
ptr
;
if
(
str_len
>
pattern_len
+
1
&&
(
ptr
=
memrchrW
(
str
,
'.'
,
str_len
-
pattern_len
-
2
)))
{
if
(
implicit_wildcard
)
{
matches
=
TRUE
;
*
matched
=
ptr
+
1
;
}
}
else
{
for
(
ptr
=
str
+
str_len
-
pattern_len
;
ptr
>
str
;
ptr
--
)
if
(
ptr
[
-
1
]
==
'.'
)
break
;
if
(
ptr
==
str
||
implicit_wildcard
)
{
matches
=
TRUE
;
*
matched
=
s
tr
;
*
matched
=
p
tr
;
}
}
}
else
if
(
implicit_wildcard
&&
str_len
>
pattern_len
)
{
...
...
@@ -241,7 +237,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
*
* Doesn't match the pattern.
*/
if
(
str
[
str_len
-
pattern_len
-
1
]
==
'.'
&&
!
strcmpiW
(
str
+
(
str_len
-
pattern_len
),
pattern
))
{
if
(
str
[
str_len
-
pattern_len
-
1
]
==
'.'
&&
!
wcsicmp
(
str
+
(
str_len
-
pattern_len
),
pattern
))
{
matches
=
TRUE
;
*
matched
=
str
+
(
str_len
-
pattern_len
);
}
...
...
@@ -249,7 +245,7 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
/* The pattern doesn't have an implicit wildcard, or an explicit wildcard,
* so 'str' has to be an exact match to the 'pattern'.
*/
if
(
!
strcmpiW
(
str
,
pattern
))
{
if
(
!
wcsicmp
(
str
,
pattern
))
{
matches
=
TRUE
;
*
matched
=
str
;
}
...
...
@@ -409,7 +405,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
* The mapping would only happen if the "org" key had an explicit subkey
* called "www".
*/
if
(
check_domain
&&
!
domain_offset
&&
!
strchrW
(
host
,
matched
-
host
-
1
))
if
(
check_domain
&&
!
domain_offset
&&
!
wcschr
(
host
,
matched
-
host
-
1
))
found
=
get_zone_for_scheme
(
domain_key
,
schema
,
zone
);
}
RegCloseKey
(
domain_key
);
...
...
@@ -532,7 +528,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone)
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
strcmpiW
(
scheme
,
fileW
))
{
if
(
!
wcsicmp
(
scheme
,
fileW
))
{
BSTR
path
;
WCHAR
*
ptr
,
*
path_start
,
root
[
20
];
...
...
@@ -547,7 +543,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone)
else
path_start
=
path
;
if
((
ptr
=
strchrW
(
path_start
,
':'
))
&&
ptr
-
path_start
+
1
<
ARRAY_SIZE
(
root
))
{
if
((
ptr
=
wcschr
(
path_start
,
':'
))
&&
ptr
-
path_start
+
1
<
ARRAY_SIZE
(
root
))
{
UINT
type
;
memcpy
(
root
,
path_start
,
(
ptr
-
path_start
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -597,7 +593,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url)
hres
=
CoInternetGetSecurityUrl
(
url
,
&
secur_url
,
PSU_SECURITY_URL_ONLY
,
0
);
if
(
hres
!=
S_OK
)
{
DWORD
size
=
strlenW
(
url
)
*
sizeof
(
WCHAR
);
DWORD
size
=
l
strlenW
(
url
)
*
sizeof
(
WCHAR
);
secur_url
=
CoTaskMemAlloc
(
size
);
if
(
!
secur_url
)
...
...
@@ -1322,7 +1318,7 @@ static LPDWORD build_zonemap_from_reg(void)
data
=
new_data
;
}
data
[
used
]
=
atoiW
(
name
);
data
[
used
]
=
wcstol
(
name
,
NULL
,
10
);
}
}
if
(
used
)
{
...
...
@@ -1875,7 +1871,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
if
(
!
protocol_info
)
break
;
size
=
strlenW
(
url
)
+
1
;
size
=
l
strlenW
(
url
)
+
1
;
new_url
=
CoTaskMemAlloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
new_url
)
{
hres
=
E_OUTOFMEMORY
;
...
...
@@ -1904,7 +1900,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
}
}
if
(
parse_hres
!=
S_OK
||
!
strcmpW
(
url
,
new_url
))
if
(
parse_hres
!=
S_OK
||
!
wcscmp
(
url
,
new_url
))
break
;
CoTaskMemFree
(
alloc_url
);
...
...
@@ -1921,7 +1917,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
}
if
(
action
==
PSU_DEFAULT
&&
(
protocol_info
=
get_protocol_info
(
url
)))
{
size
=
strlenW
(
url
)
+
1
;
size
=
l
strlenW
(
url
)
+
1
;
new_url
=
CoTaskMemAlloc
(
size
*
sizeof
(
WCHAR
));
if
(
new_url
)
{
new_size
=
0
;
...
...
@@ -1964,7 +1960,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
}
if
(
!
alloc_url
)
{
size
=
strlenW
(
url
)
+
1
;
size
=
l
strlenW
(
url
)
+
1
;
alloc_url
=
CoTaskMemAlloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
alloc_url
)
return
E_OUTOFMEMORY
;
...
...
@@ -2001,7 +1997,7 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA
case
URL_SCHEME_FTP
:
case
URL_SCHEME_HTTP
:
case
URL_SCHEME_HTTPS
:
size
=
strlenW
(
secure_url
)
+
1
;
size
=
l
strlenW
(
secure_url
)
+
1
;
new_url
=
CoTaskMemAlloc
(
size
*
sizeof
(
WCHAR
));
if
(
new_url
)
hres
=
UrlGetPartW
(
secure_url
,
new_url
,
&
size
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
);
...
...
dlls/urlmon/session.c
View file @
42d2477e
...
...
@@ -64,7 +64,7 @@ static name_space *find_name_space(LPCWSTR protocol)
name_space
*
iter
;
LIST_FOR_EACH_ENTRY
(
iter
,
&
name_space_list
,
name_space
,
entry
)
{
if
(
!
strcmpiW
(
iter
->
protocol
,
protocol
))
if
(
!
wcsicmp
(
iter
->
protocol
,
protocol
))
return
iter
;
}
...
...
@@ -148,7 +148,7 @@ static HRESULT unregister_namespace(IClassFactory *cf, LPCWSTR protocol)
EnterCriticalSection
(
&
session_cs
);
LIST_FOR_EACH_ENTRY
(
iter
,
&
name_space_list
,
name_space
,
entry
)
{
if
(
iter
->
cf
==
cf
&&
!
strcmpiW
(
iter
->
protocol
,
protocol
))
{
if
(
iter
->
cf
==
cf
&&
!
wcsicmp
(
iter
->
protocol
,
protocol
))
{
list_remove
(
&
iter
->
entry
);
LeaveCriticalSection
(
&
session_cs
);
...
...
@@ -265,7 +265,7 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
EnterCriticalSection
(
&
session_cs
);
LIST_FOR_EACH_ENTRY
(
iter
,
&
mime_filter_list
,
mime_filter
,
entry
)
{
if
(
!
strcmpW
(
iter
->
mime
,
mime
))
{
if
(
!
wcscmp
(
iter
->
mime
,
mime
))
{
cf
=
iter
->
cf
;
break
;
}
...
...
@@ -408,7 +408,7 @@ static HRESULT WINAPI InternetSession_UnregisterMimeFilter(IInternetSession *ifa
EnterCriticalSection
(
&
session_cs
);
LIST_FOR_EACH_ENTRY
(
iter
,
&
mime_filter_list
,
mime_filter
,
entry
)
{
if
(
iter
->
cf
==
pCF
&&
!
strcmpW
(
iter
->
mime
,
pwzType
))
{
if
(
iter
->
cf
==
pCF
&&
!
wcscmp
(
iter
->
mime
,
pwzType
))
{
list_remove
(
&
iter
->
entry
);
LeaveCriticalSection
(
&
session_cs
);
...
...
@@ -561,8 +561,8 @@ static void ensure_useragent(void)
else
os_type
=
emptyW
;
s
printfW
(
buf
,
formatW
,
is_nt
,
info
.
dwMajorVersion
,
info
.
dwMinorVersion
,
os_type
);
len
=
strlenW
(
buf
);
s
wprintf
(
buf
,
ARRAY_SIZE
(
buf
)
,
formatW
,
is_nt
,
info
.
dwMajorVersion
,
info
.
dwMinorVersion
,
os_type
);
len
=
l
strlenW
(
buf
);
size
=
len
+
40
;
ret
=
heap_alloc
(
size
*
sizeof
(
WCHAR
));
...
...
dlls/urlmon/umon.c
View file @
42d2477e
...
...
@@ -804,7 +804,7 @@ HRESULT WINAPI MkParseDisplayNameEx(IBindCtx *pbc, LPCWSTR szDisplayName, ULONG
hres
=
CreateURLMoniker
(
NULL
,
szDisplayName
,
ppmk
);
if
(
SUCCEEDED
(
hres
))
{
*
pchEaten
=
strlenW
(
szDisplayName
);
*
pchEaten
=
l
strlenW
(
szDisplayName
);
return
hres
;
}
}
...
...
@@ -887,7 +887,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW
header
,
sizeof
(
header
),
NULL
,
NULL
))
return
E_FAIL
;
if
(
strlenW
(
cache_path
)
>
dwBufLength
)
if
(
l
strlenW
(
cache_path
)
>
dwBufLength
)
return
E_OUTOFMEMORY
;
lstrcpyW
(
szFileName
,
cache_path
);
...
...
dlls/urlmon/uri.c
View file @
42d2477e
This diff is collapsed.
Click to expand it.
dlls/urlmon/urlmon_main.c
View file @
42d2477e
...
...
@@ -608,7 +608,7 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
break
;
case
TYMED_FILE
:
if
(
src
->
u
.
lpszFileName
&&
!
src
->
pUnkForRelease
)
{
DWORD
size
=
(
strlenW
(
src
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
DWORD
size
=
(
l
strlenW
(
src
->
u
.
lpszFileName
)
+
1
)
*
sizeof
(
WCHAR
);
dst
->
u
.
lpszFileName
=
CoTaskMemAlloc
(
size
);
if
(
!
dst
->
u
.
lpszFileName
)
return
E_OUTOFMEMORY
;
...
...
@@ -674,7 +674,7 @@ HRESULT WINAPI CopyBindInfo(const BINDINFO *pcbiSrc, BINDINFO *pcbiDest)
size
=
FIELD_OFFSET
(
BINDINFO
,
szExtraInfo
)
+
sizeof
(
void
*
);
if
(
pcbiSrc
->
cbSize
>=
size
&&
pcbiDest
->
cbSize
>=
size
&&
pcbiSrc
->
szExtraInfo
)
{
size
=
(
strlenW
(
pcbiSrc
->
szExtraInfo
)
+
1
)
*
sizeof
(
WCHAR
);
size
=
(
l
strlenW
(
pcbiSrc
->
szExtraInfo
)
+
1
)
*
sizeof
(
WCHAR
);
pcbiDest
->
szExtraInfo
=
CoTaskMemAlloc
(
size
);
if
(
!
pcbiDest
->
szExtraInfo
)
return
E_OUTOFMEMORY
;
...
...
@@ -692,7 +692,7 @@ HRESULT WINAPI CopyBindInfo(const BINDINFO *pcbiSrc, BINDINFO *pcbiDest)
size
=
FIELD_OFFSET
(
BINDINFO
,
szCustomVerb
)
+
sizeof
(
void
*
);
if
(
pcbiSrc
->
cbSize
>=
size
&&
pcbiDest
->
cbSize
>=
size
&&
pcbiSrc
->
szCustomVerb
)
{
size
=
(
strlenW
(
pcbiSrc
->
szCustomVerb
)
+
1
)
*
sizeof
(
WCHAR
);
size
=
(
l
strlenW
(
pcbiSrc
->
szCustomVerb
)
+
1
)
*
sizeof
(
WCHAR
);
pcbiDest
->
szCustomVerb
=
CoTaskMemAlloc
(
size
);
if
(
!
pcbiDest
->
szCustomVerb
)
{
CoTaskMemFree
(
pcbiDest
->
szExtraInfo
);
...
...
dlls/urlmon/urlmon_main.h
View file @
42d2477e
...
...
@@ -31,7 +31,6 @@
#include "urlmon.h"
#include "wininet.h"
#include "wine/unicode.h"
#include "wine/heap.h"
#include "wine/list.h"
...
...
@@ -244,7 +243,7 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
if
(
str
)
{
DWORD
size
;
size
=
(
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
size
=
(
l
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
ret
=
heap_alloc
(
size
);
if
(
ret
)
memcpy
(
ret
,
str
,
size
);
...
...
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