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
2485f2d0
Commit
2485f2d0
authored
Nov 11, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comsvcs: Add IROTData stub for "new" moniker.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
015ad98f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
main.c
dlls/comsvcs/main.c
+46
-0
comsvcs.c
dlls/comsvcs/tests/comsvcs.c
+5
-0
No files found.
dlls/comsvcs/main.c
View file @
2485f2d0
...
...
@@ -54,6 +54,7 @@ typedef struct holder
struct
new_moniker
{
IMoniker
IMoniker_iface
;
IROTData
IROTData_iface
;
LONG
refcount
;
CLSID
clsid
;
};
...
...
@@ -75,6 +76,11 @@ static struct new_moniker *impl_from_IMoniker(IMoniker *iface)
return
CONTAINING_RECORD
(
iface
,
struct
new_moniker
,
IMoniker_iface
);
}
static
struct
new_moniker
*
impl_from_IROTData
(
IROTData
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
new_moniker
,
IROTData_iface
);
}
static
HRESULT
WINAPI
holder_QueryInterface
(
IHolder
*
iface
,
REFIID
riid
,
void
**
object
)
{
holder
*
This
=
impl_from_IHolder
(
iface
);
...
...
@@ -429,6 +435,8 @@ static const IClassFactoryVtbl comsvcscf_vtbl =
static
HRESULT
WINAPI
new_moniker_QueryInterface
(
IMoniker
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
new_moniker
*
moniker
=
impl_from_IMoniker
(
iface
);
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
...
...
@@ -440,6 +448,10 @@ static HRESULT WINAPI new_moniker_QueryInterface(IMoniker* iface, REFIID riid, v
{
*
obj
=
iface
;
}
else
if
(
IsEqualIID
(
&
IID_IROTData
,
riid
))
{
*
obj
=
&
moniker
->
IROTData_iface
;
}
if
(
*
obj
)
{
...
...
@@ -738,6 +750,39 @@ static const IMonikerVtbl new_moniker_vtbl =
new_moniker_IsSystemMoniker
};
static
HRESULT
WINAPI
new_moniker_rotdata_QueryInterface
(
IROTData
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
new_moniker
*
moniker
=
impl_from_IROTData
(
iface
);
return
IMoniker_QueryInterface
(
&
moniker
->
IMoniker_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
new_moniker_rotdata_AddRef
(
IROTData
*
iface
)
{
struct
new_moniker
*
moniker
=
impl_from_IROTData
(
iface
);
return
IMoniker_AddRef
(
&
moniker
->
IMoniker_iface
);
}
static
ULONG
WINAPI
new_moniker_rotdata_Release
(
IROTData
*
iface
)
{
struct
new_moniker
*
moniker
=
impl_from_IROTData
(
iface
);
return
IMoniker_Release
(
&
moniker
->
IMoniker_iface
);
}
static
HRESULT
WINAPI
new_moniker_rotdata_GetComparisonData
(
IROTData
*
iface
,
byte
*
data
,
ULONG
data_len
,
ULONG
*
length
)
{
FIXME
(
"%p, %p, %u, %p.
\n
"
,
iface
,
data
,
data_len
,
length
);
return
E_NOTIMPL
;
}
static
const
IROTDataVtbl
new_moniker_rotdata_vtbl
=
{
new_moniker_rotdata_QueryInterface
,
new_moniker_rotdata_AddRef
,
new_moniker_rotdata_Release
,
new_moniker_rotdata_GetComparisonData
,
};
static
const
BYTE
guid_conv_table
[
256
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 0x00 */
...
...
@@ -837,6 +882,7 @@ static HRESULT new_moniker_parse_displayname(IBindCtx *pbc, LPOLESTR name, ULONG
return
E_OUTOFMEMORY
;
moniker
->
IMoniker_iface
.
lpVtbl
=
&
new_moniker_vtbl
;
moniker
->
IROTData_iface
.
lpVtbl
=
&
new_moniker_rotdata_vtbl
;
moniker
->
refcount
=
1
;
moniker
->
clsid
=
guid
;
...
...
dlls/comsvcs/tests/comsvcs.c
View file @
2485f2d0
...
...
@@ -301,6 +301,7 @@ static void test_new_moniker(void)
BIND_OPTS2
bind_opts
;
ULARGE_INTEGER
size
;
DWORD
moniker_type
;
IROTData
*
rot_data
;
IBindCtx
*
bindctx
;
FILETIME
filetime
;
DWORD
hash
,
eaten
;
...
...
@@ -318,6 +319,10 @@ static void test_new_moniker(void)
ok
(
hr
==
S_OK
,
"Failed to parse display name, hr %#x.
\n
"
,
hr
);
ok
(
eaten
==
40
,
"Unexpected eaten length %u.
\n
"
,
eaten
);
hr
=
IMoniker_QueryInterface
(
moniker
,
&
IID_IROTData
,
(
void
**
)
&
rot_data
);
ok
(
hr
==
S_OK
,
"Failed to get IROTData, hr %#x.
\n
"
,
hr
);
IROTData_Release
(
rot_data
);
eaten
=
0
;
hr
=
IMoniker_ParseDisplayName
(
moniker
,
bindctx
,
NULL
,
(
WCHAR
*
)
L"new:20d04fe0-3aea-1069-a2d8-08002b30309d"
,
&
eaten
,
&
moniker2
);
...
...
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