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
02bf65a7
Commit
02bf65a7
authored
May 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Better error handling in file protocol.
parent
3efe4e68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
file.c
dlls/urlmon/file.c
+3
-0
protocol.c
dlls/urlmon/tests/protocol.c
+10
-0
No files found.
dlls/urlmon/file.c
View file @
02bf65a7
...
@@ -119,6 +119,9 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
...
@@ -119,6 +119,9 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
ReleaseBindInfo
(
&
bindinfo
);
ReleaseBindInfo
(
&
bindinfo
);
if
(
!
szUrl
||
!*
szUrl
)
return
E_INVALIDARG
;
if
(
lstrlenW
(
szUrl
)
<
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
if
(
lstrlenW
(
szUrl
)
<
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
||
memcmp
(
szUrl
,
wszFile
,
sizeof
(
wszFile
)))
||
memcmp
(
szUrl
,
wszFile
,
sizeof
(
wszFile
)))
return
MK_E_SYNTAX
;
return
MK_E_SYNTAX
;
...
...
dlls/urlmon/tests/protocol.c
View file @
02bf65a7
...
@@ -1384,6 +1384,16 @@ static void test_file_protocol_fail(void)
...
@@ -1384,6 +1384,16 @@ static void test_file_protocol_fail(void)
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
CHECK_CALLED
(
ReportProgress_SENDINGREQUEST
);
CHECK_CALLED
(
ReportResult
);
CHECK_CALLED
(
ReportResult
);
SET_EXPECT
(
GetBindInfo
);
hres
=
IInternetProtocol_Start
(
protocol
,
NULL
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"Start failed: %08x, expected E_INVALIDARG
\n
"
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
SET_EXPECT
(
GetBindInfo
);
hres
=
IInternetProtocol_Start
(
protocol
,
emptyW
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"Start failed: %08x, expected E_INVALIDARG
\n
"
,
hres
);
CHECK_CALLED
(
GetBindInfo
);
IInternetProtocol_Release
(
protocol
);
IInternetProtocol_Release
(
protocol
);
}
}
...
...
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