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
a7852b51
Commit
a7852b51
authored
Oct 06, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Return correct error in get_protocol_handler for unknown protocol types.
parent
9b42e7f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
session.c
dlls/urlmon/session.c
+5
-4
protocol.c
dlls/urlmon/tests/protocol.c
+13
-2
No files found.
dlls/urlmon/session.c
View file @
a7852b51
...
...
@@ -92,7 +92,7 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
heap_free
(
wszKey
);
if
(
res
!=
ERROR_SUCCESS
)
{
TRACE
(
"Could not open protocol handler key
\n
"
);
return
E_FAIL
;
return
MK_E_SYNTAX
;
}
size
=
sizeof
(
str_clsid
);
...
...
@@ -100,7 +100,7 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
WARN
(
"Could not get protocol CLSID res=%d
\n
"
,
res
);
return
E_FAIL
;
return
MK_E_SYNTAX
;
}
hres
=
CLSIDFromString
(
str_clsid
,
&
clsid
);
...
...
@@ -115,7 +115,8 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
if
(
!
ret
)
return
S_OK
;
return
CoGetClassObject
(
&
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
ret
);
hres
=
CoGetClassObject
(
&
clsid
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
ret
);
return
SUCCEEDED
(
hres
)
?
S_OK
:
MK_E_SYNTAX
;
}
static
HRESULT
register_namespace
(
IClassFactory
*
cf
,
REFIID
clsid
,
LPCWSTR
protocol
,
BOOL
urlmon_protocol
)
...
...
@@ -247,7 +248,7 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, BOOL *urlmon_protocol, I
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
;
return
schema_len
?
hres
:
MK_E_SYNTAX
;
EnterCriticalSection
(
&
session_cs
);
...
...
dlls/urlmon/tests/protocol.c
View file @
a7852b51
...
...
@@ -3028,6 +3028,17 @@ static void test_CreateBinding(void)
hres
=
IInternetSession_UnregisterNameSpace
(
session
,
&
ClassFactory
,
wsz_test
);
ok
(
hres
==
S_OK
,
"UnregisterNameSpace failed: %08x
\n
"
,
hres
);
hres
=
IInternetSession_CreateBinding
(
session
,
NULL
,
test_url
,
NULL
,
NULL
,
&
protocol
,
0
);
ok
(
hres
==
S_OK
,
"CreateBinding failed: %08x
\n
"
,
hres
);
ok
(
protocol
!=
NULL
,
"protocol == NULL
\n
"
);
SET_EXPECT
(
QueryService_InternetProtocol
);
hres
=
IInternetProtocol_Start
(
protocol
,
test_url
,
&
protocol_sink
,
&
bind_info
,
0
,
0
);
ok
(
hres
==
MK_E_SYNTAX
,
"Start failed: %08x, expected MK_E_SYNTAX
\n
"
,
hres
);
CHECK_CALLED
(
QueryService_InternetProtocol
);
IInternetProtocol_Release
(
protocol
);
IInternetSession_Release
(
session
);
}
...
...
@@ -3181,8 +3192,8 @@ START_TEST(protocol)
pReleaseBindInfo
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"ReleaseBindInfo"
);
pCreateUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateUri"
);
if
(
!
pCoInternetGetSession
||
!
pReleaseBindInfo
)
{
win_skip
(
"Various needed functions not present
in IE 4.0
\n
"
);
if
(
!
GetProcAddress
(
hurlmon
,
"CompareSecurityIds"
)
)
{
win_skip
(
"Various needed functions not present
, too old IE
\n
"
);
return
;
}
...
...
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