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
bc71921f
Commit
bc71921f
authored
Nov 14, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added stub for CoInternetParseIUri.
parent
bf228d4a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
0 deletions
+96
-0
uri.c
dlls/urlmon/tests/uri.c
+56
-0
uri.c
dlls/urlmon/uri.c
+38
-0
urlmon.spec
dlls/urlmon/urlmon.spec
+1
-0
urlmon.idl
include/urlmon.idl
+1
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
bc71921f
...
...
@@ -68,6 +68,7 @@ static HRESULT (WINAPI *pCreateIUriBuilder)(IUri*, DWORD, DWORD_PTR, IUriBuilder
static
HRESULT
(
WINAPI
*
pCoInternetCombineIUri
)(
IUri
*
,
IUri
*
,
DWORD
,
IUri
**
,
DWORD_PTR
);
static
HRESULT
(
WINAPI
*
pCoInternetGetSession
)(
DWORD
,
IInternetSession
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCoInternetCombineUrlEx
)(
IUri
*
,
LPCWSTR
,
DWORD
,
IUri
**
,
DWORD_PTR
);
static
HRESULT
(
WINAPI
*
pCoInternetParseIUri
)(
IUri
*
,
PARSEACTION
,
DWORD
,
LPWSTR
,
DWORD
,
DWORD
*
,
DWORD_PTR
);
static
const
WCHAR
http_urlW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
0
};
...
...
@@ -9441,6 +9442,57 @@ static void test_CoInternetCombineUrlEx_Pluggable(void) {
if
(
base
)
IUri_Release
(
base
);
}
static
void
test_CoInternetParseIUri_InvalidArgs
(
void
)
{
HRESULT
hr
;
IUri
*
uri
=
NULL
;
WCHAR
tmp
[
3
];
DWORD
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
NULL
,
PARSE_CANONICALIZE
,
0
,
tmp
,
3
,
&
result
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
hr
=
pCreateUri
(
http_urlW
,
0
,
0
,
&
uri
);
ok
(
SUCCEEDED
(
hr
),
"Error: CreateUri returned 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_CANONICALIZE
,
0
,
NULL
,
0
,
&
result
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_CANONICALIZE
,
0
,
tmp
,
3
,
NULL
,
0
);
ok
(
hr
==
E_POINTER
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_POINTER
);
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_SECURITY_URL
,
0
,
tmp
,
3
,
&
result
,
0
);
ok
(
hr
==
E_FAIL
,
"Error: CoInternetParseIUri returned 0x%08x expected 0x%08x.
\n
"
,
hr
,
E_FAIL
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_MIME
,
0
,
tmp
,
3
,
&
result
,
0
);
ok
(
hr
==
E_FAIL
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_FAIL
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_SERVER
,
0
,
tmp
,
3
,
&
result
,
0
);
ok
(
hr
==
E_FAIL
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_FAIL
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
result
=
-
1
;
hr
=
pCoInternetParseIUri
(
uri
,
PARSE_SECURITY_DOMAIN
,
0
,
tmp
,
3
,
&
result
,
0
);
ok
(
hr
==
E_FAIL
,
"Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_FAIL
);
ok
(
!
result
,
"Error: Expected 'result' to be 0, but was %d.
\n
"
,
result
);
}
if
(
uri
)
IUri_Release
(
uri
);
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -9451,6 +9503,7 @@ START_TEST(uri) {
pCreateIUriBuilder
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateIUriBuilder"
);
pCoInternetCombineIUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetCombineIUri"
);
pCoInternetCombineUrlEx
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetCombineUrlEx"
);
pCoInternetParseIUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetParseIUri"
);
if
(
!
pCreateUri
)
{
win_skip
(
"CreateUri is not present, skipping tests.
\n
"
);
...
...
@@ -9529,6 +9582,9 @@ START_TEST(uri) {
trace
(
"test CoInternetCombineUrlEx...
\n
"
);
test_CoInternetCombineUrlEx
();
trace
(
"test CoInternetParseIUri Invalid Args...
\n
"
);
test_CoInternetParseIUri_InvalidArgs
();
register_protocols
();
trace
(
"test CoInternetCombineIUri pluggable...
\n
"
);
...
...
dlls/urlmon/uri.c
View file @
bc71921f
...
...
@@ -6080,3 +6080,41 @@ HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DW
IUri_Release
(
relative
);
return
hr
;
}
/***********************************************************************
* CoInternetParseIUri (urlmon.@)
*/
HRESULT
WINAPI
CoInternetParseIUri
(
IUri
*
pIUri
,
PARSEACTION
ParseAction
,
DWORD
dwFlags
,
LPWSTR
pwzResult
,
DWORD
cchResult
,
DWORD
*
pcchResult
,
DWORD_PTR
dwReserved
)
{
HRESULT
hr
;
TRACE
(
"(%p %d %x %p %d %p %x)
\n
"
,
pIUri
,
ParseAction
,
dwFlags
,
pwzResult
,
cchResult
,
pcchResult
,
(
DWORD
)
dwReserved
);
if
(
!
pcchResult
)
return
E_POINTER
;
if
(
!
pwzResult
||
!
pIUri
)
{
*
pcchResult
=
0
;
return
E_INVALIDARG
;
}
switch
(
ParseAction
)
{
case
PARSE_SECURITY_URL
:
case
PARSE_MIME
:
case
PARSE_SERVER
:
case
PARSE_SECURITY_DOMAIN
:
*
pcchResult
=
0
;
hr
=
E_FAIL
;
break
;
default:
*
pcchResult
=
0
;
hr
=
E_NOTIMPL
;
FIXME
(
"(%p %d %x %p %d %p %x) Partial stub.
\n
"
,
pIUri
,
ParseAction
,
dwFlags
,
pwzResult
,
cchResult
,
pcchResult
,
(
DWORD
)
dwReserved
);
}
return
hr
;
}
dlls/urlmon/urlmon.spec
View file @
bc71921f
...
...
@@ -21,6 +21,7 @@
@ stdcall CoInternetGetSession(long ptr long)
@ stdcall CoInternetIsFeatureEnabled(long long)
@ stdcall CoInternetParseUrl(wstr long long wstr long ptr long)
@ stdcall CoInternetParseIUri(ptr long long wstr long ptr long)
@ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long)
@ stdcall CoInternetSetFeatureEnabled(long long long)
@ stub CompareSecurityIds
...
...
include/urlmon.idl
View file @
bc71921f
...
...
@@ -1935,6 +1935,7 @@ cpp_quote("HRESULT WINAPI CoInternetCompareUrl(LPCWSTR,LPCWSTR,DWORD);")
cpp_quote
(
"HRESULT WINAPI CoInternetCombineIUri(IUri*,IUri*,DWORD,IUri**,DWORD_PTR);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider*, IInternetZoneManager**, DWORD);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetParseUrl(LPCWSTR,PARSEACTION,DWORD,LPWSTR,DWORD,DWORD*,DWORD);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetParseIUri(IUri*,PARSEACTION,DWORD,LPWSTR,DWORD,DWORD*,DWORD_PTR);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetQueryInfo(LPCWSTR,QUERYOPTION,DWORD,LPVOID,DWORD,DWORD*,DWORD);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST,DWORD,BOOL);"
)
cpp_quote
(
"HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR,LPWSTR*,PSUACTION,DWORD);"
)
...
...
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