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
b6db0117
Commit
b6db0117
authored
Dec 20, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added IUriContainer stub implementation of URLMoniker object.
parent
e3a5ba54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
1 deletion
+66
-1
url.c
dlls/urlmon/tests/url.c
+21
-1
umon.c
dlls/urlmon/umon.c
+45
-0
No files found.
dlls/urlmon/tests/url.c
View file @
b6db0117
...
...
@@ -37,7 +37,7 @@
static
HRESULT
(
WINAPI
*
pCreateAsyncBindCtxEx
)(
IBindCtx
*
,
DWORD
,
IBindStatusCallback
*
,
IEnumFORMATETC
*
,
IBindCtx
**
,
DWORD
);
static
HRESULT
(
WINAPI
*
pCreateUri
)(
LPCWSTR
,
DWORD
,
DWORD_PTR
,
IUri
**
);
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
CLSID_IdentityUnmarshal
,
0x0000001b
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
...
...
@@ -3157,6 +3157,22 @@ static void test_StdURLMoniker(void)
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
display_name
);
ok
(
hres
==
E_OUTOFMEMORY
,
"GetDisplayName failed: %08x, expected E_OUTOFMEMORY
\n
"
,
hres
);
if
(
pCreateUri
)
{
IUriContainer
*
uri_container
;
IUri
*
uri
;
hres
=
IMoniker_QueryInterface
(
mon
,
&
IID_IUriContainer
,
(
void
**
)
&
uri_container
);
ok
(
hres
==
S_OK
,
"Coud not get IUriMoniker iface: %08x
\n
"
,
hres
);
uri
=
(
void
*
)
0xdeadbeef
;
hres
=
IUriContainer_GetIUri
(
uri_container
,
&
uri
);
ok
(
hres
==
S_FALSE
,
"GetIUri failed: %08x
\n
"
,
hres
);
ok
(
!
uri
,
"uri = %p, expected NULL
\n
"
,
uri
);
IUriContainer_Release
(
uri_container
);
}
IMoniker_Release
(
mon
);
}
...
...
@@ -3191,6 +3207,10 @@ START_TEST(url)
return
;
}
pCreateUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateUri"
);
if
(
!
pCreateUri
)
win_skip
(
"IUri not supported
\n
"
);
complete_event
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
complete_event2
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
thread_id
=
GetCurrentThreadId
();
...
...
dlls/urlmon/umon.c
View file @
b6db0117
...
...
@@ -33,6 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef
struct
{
const
IMonikerVtbl
*
lpIMonikerVtbl
;
IUriContainer
IUriContainer_iface
;
LONG
ref
;
...
...
@@ -63,6 +64,9 @@ static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, vo
}
else
if
(
IsEqualIID
(
&
IID_IAsyncMoniker
,
riid
))
{
TRACE
(
"(%p)->(IID_IAsyncMoniker %p)
\n
"
,
This
,
ppv
);
*
ppv
=
iface
;
}
else
if
(
IsEqualIID
(
&
IID_IUriContainer
,
riid
))
{
TRACE
(
"(%p)->(IID_IUriContainer %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IUriContainer_iface
;
}
else
{
WARN
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
...
...
@@ -454,6 +458,46 @@ static const IMonikerVtbl URLMonikerVtbl =
URLMoniker_IsSystemMoniker
};
static
inline
URLMoniker
*
impl_from_IUriContainer
(
IUriContainer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
URLMoniker
,
IUriContainer_iface
);
}
static
HRESULT
WINAPI
UriContainer_QueryInterface
(
IUriContainer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_QueryInterface
((
IMoniker
*
)
&
This
->
lpIMonikerVtbl
,
riid
,
ppv
);
}
static
ULONG
WINAPI
UriContainer_AddRef
(
IUriContainer
*
iface
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_AddRef
((
IMoniker
*
)
&
This
->
lpIMonikerVtbl
);
}
static
ULONG
WINAPI
UriContainer_Release
(
IUriContainer
*
iface
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
return
IMoniker_Release
((
IMoniker
*
)
&
This
->
lpIMonikerVtbl
);
}
static
HRESULT
WINAPI
UriContainer_GetIUri
(
IUriContainer
*
iface
,
IUri
**
ppIUri
)
{
URLMoniker
*
This
=
impl_from_IUriContainer
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppIUri
);
*
ppIUri
=
NULL
;
return
S_FALSE
;
}
static
const
IUriContainerVtbl
UriContainerVtbl
=
{
UriContainer_QueryInterface
,
UriContainer_AddRef
,
UriContainer_Release
,
UriContainer_GetIUri
};
static
URLMoniker
*
alloc_moniker
(
void
)
{
URLMoniker
*
ret
;
...
...
@@ -463,6 +507,7 @@ static URLMoniker *alloc_moniker(void)
return
NULL
;
ret
->
lpIMonikerVtbl
=
&
URLMonikerVtbl
;
ret
->
IUriContainer_iface
.
lpVtbl
=
&
UriContainerVtbl
;
ret
->
ref
=
1
;
ret
->
URLName
=
NULL
;
...
...
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