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
7ccbbd86
Commit
7ccbbd86
authored
Jun 25, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use CoInternetParseIUri instead of IUri::GetPath in file protocol handler implementation.
parent
8f3c3ca3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
file.c
dlls/urlmon/file.c
+6
-5
protocol.c
dlls/urlmon/tests/protocol.c
+18
-0
No files found.
dlls/urlmon/file.c
View file @
7ccbbd86
...
...
@@ -245,12 +245,13 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
DWORD
grfPI
,
HANDLE
*
dwReserved
)
{
FileProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
WCHAR
path
[
MAX_PATH
];
BINDINFO
bindinfo
;
DWORD
grfBINDF
=
0
;
DWORD
scheme
;
DWORD
scheme
,
size
;
LPWSTR
mime
=
NULL
;
WCHAR
null_char
=
0
;
BSTR
path
,
url
;
BSTR
url
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p %p %p %08x %p)
\n
"
,
This
,
pUri
,
pOIProtSink
,
...
...
@@ -288,14 +289,14 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_SENDINGREQUEST
,
&
null_char
);
hres
=
IUri_GetPath
(
pUri
,
&
path
);
size
=
0
;
hres
=
CoInternetParseIUri
(
pUri
,
PARSE_PATH_FROM_URL
,
0
,
path
,
sizeof
(
path
)
/
sizeof
(
WCHAR
),
&
size
,
0
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetPath
failed: %08x
\n
"
,
hres
);
WARN
(
"CoInternetParseIUri
failed: %08x
\n
"
,
hres
);
return
report_result
(
pOIProtSink
,
hres
,
0
);
}
hres
=
open_file
(
This
,
path
,
pOIProtSink
);
SysFreeString
(
path
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/urlmon/tests/protocol.c
View file @
7ccbbd86
...
...
@@ -2447,6 +2447,24 @@ static void test_file_protocol_url(LPCWSTR url)
IUri_Release
(
uri
);
IInternetProtocolEx_Release
(
protocolex
);
hres
=
pCreateUri
(
url
,
0
,
0
,
&
uri
);
ok
(
hres
==
S_OK
,
"CreateUri failed: %08x
\n
"
,
hres
);
hres
=
IClassFactory_CreateInstance
(
factory
,
NULL
,
&
IID_IInternetProtocolEx
,
(
void
**
)
&
protocolex
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocolEx: %08x
\n
"
,
hres
);
if
(
file_protocol_start
(
NULL
,
NULL
,
protocolex
,
uri
,
TRUE
))
{
hres
=
IInternetProtocolEx_Read
(
protocolex
,
buf
,
2
,
&
cb
);
ok
(
hres
==
S_OK
,
"Read failed: %08x
\n
"
,
hres
);
hres
=
IInternetProtocolEx_LockRequest
(
protocolex
,
0
);
ok
(
hres
==
S_OK
,
"LockRequest failed: %08x
\n
"
,
hres
);
hres
=
IInternetProtocolEx_UnlockRequest
(
protocolex
);
ok
(
hres
==
S_OK
,
"UnlockRequest failed: %08x
\n
"
,
hres
);
}
IUri_Release
(
uri
);
IInternetProtocolEx_Release
(
protocolex
);
}
else
{
win_skip
(
"Skipping file protocol StartEx tests
\n
"
);
}
...
...
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