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
667eca5c
Commit
667eca5c
authored
Feb 25, 2024
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Stub IContextMenu3 on the New menu.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=24812
parent
1662fa9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
3 deletions
+87
-3
new_menu.c
dlls/shell32/new_menu.c
+85
-0
shlview.c
dlls/shell32/tests/shlview.c
+2
-3
No files found.
dlls/shell32/new_menu.c
View file @
667eca5c
...
...
@@ -27,6 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
struct
new_menu
{
IShellExtInit
IShellExtInit_iface
;
IContextMenu3
IContextMenu3_iface
;
LONG
refcount
;
};
...
...
@@ -43,6 +44,10 @@ static HRESULT WINAPI ext_init_QueryInterface(IShellExtInit *iface, REFIID iid,
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IShellExtInit
))
*
out
=
&
menu
->
IShellExtInit_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IContextMenu
)
||
IsEqualGUID
(
iid
,
&
IID_IContextMenu2
)
||
IsEqualGUID
(
iid
,
&
IID_IContextMenu3
))
*
out
=
&
menu
->
IContextMenu3_iface
;
else
{
*
out
=
NULL
;
...
...
@@ -94,6 +99,85 @@ static const IShellExtInitVtbl ext_init_vtbl =
ext_init_Initialize
,
};
static
struct
new_menu
*
impl_from_IContextMenu3
(
IContextMenu3
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
new_menu
,
IContextMenu3_iface
);
}
static
HRESULT
WINAPI
context_menu_QueryInterface
(
IContextMenu3
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
new_menu
*
menu
=
impl_from_IContextMenu3
(
iface
);
return
IShellExtInit_QueryInterface
(
&
menu
->
IShellExtInit_iface
,
iid
,
out
);
}
static
ULONG
WINAPI
context_menu_AddRef
(
IContextMenu3
*
iface
)
{
struct
new_menu
*
menu
=
impl_from_IContextMenu3
(
iface
);
return
IShellExtInit_AddRef
(
&
menu
->
IShellExtInit_iface
);
}
static
ULONG
WINAPI
context_menu_Release
(
IContextMenu3
*
iface
)
{
struct
new_menu
*
menu
=
impl_from_IContextMenu3
(
iface
);
return
IShellExtInit_Release
(
&
menu
->
IShellExtInit_iface
);
}
static
HRESULT
WINAPI
context_menu_QueryContextMenu
(
IContextMenu3
*
iface
,
HMENU
hmenu
,
UINT
index
,
UINT
min_id
,
UINT
max_id
,
UINT
flags
)
{
FIXME
(
"iface %p, hmenu %p, index %u, min_id %u, max_id %u, flags %#x, stub!
\n
"
,
iface
,
hmenu
,
index
,
min_id
,
max_id
,
flags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
context_menu_InvokeCommand
(
IContextMenu3
*
iface
,
CMINVOKECOMMANDINFO
*
info
)
{
FIXME
(
"iface %p, info %p, stub!
\n
"
,
iface
,
info
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
context_menu_GetCommandString
(
IContextMenu3
*
iface
,
UINT_PTR
id
,
UINT
type
,
UINT
*
reserved
,
char
*
string
,
UINT
size
)
{
FIXME
(
"iface %p, id %Iu, type %#x, reserved %p, string %p, size %u, stub!
\n
"
,
iface
,
id
,
type
,
reserved
,
string
,
size
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
context_menu_HandleMenuMsg
(
IContextMenu3
*
iface
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
FIXME
(
"iface %p, msg %#x, wparam %#Ix, lparam %#Ix, stub!
\n
"
,
iface
,
msg
,
wparam
,
lparam
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
context_menu_HandleMenuMsg2
(
IContextMenu3
*
iface
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
LRESULT
*
result
)
{
FIXME
(
"iface %p, msg %#x, wparam %#Ix, lparam %#Ix, result %p, stub!
\n
"
,
iface
,
msg
,
wparam
,
lparam
,
result
);
return
E_NOTIMPL
;
}
static
const
IContextMenu3Vtbl
context_menu_vtbl
=
{
context_menu_QueryInterface
,
context_menu_AddRef
,
context_menu_Release
,
context_menu_QueryContextMenu
,
context_menu_InvokeCommand
,
context_menu_GetCommandString
,
context_menu_HandleMenuMsg
,
context_menu_HandleMenuMsg2
,
};
HRESULT
WINAPI
new_menu_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
out
)
{
struct
new_menu
*
menu
;
...
...
@@ -106,6 +190,7 @@ HRESULT WINAPI new_menu_create(IUnknown *outer, REFIID iid, void **out)
return
E_OUTOFMEMORY
;
menu
->
IShellExtInit_iface
.
lpVtbl
=
&
ext_init_vtbl
;
menu
->
IContextMenu3_iface
.
lpVtbl
=
&
context_menu_vtbl
;
menu
->
refcount
=
1
;
TRACE
(
"Created New menu %p.
\n
"
,
menu
);
...
...
dlls/shell32/tests/shlview.c
View file @
667eca5c
...
...
@@ -1489,9 +1489,8 @@ static void test_newmenu(void)
IUnknown_Release
(
unk2
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IContextMenu3
,
(
void
**
)
&
unk2
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get IContextMenu3, hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IUnknown_Release
(
unk2
);
ok
(
hr
==
S_OK
,
"Failed to get IContextMenu3, hr %#lx.
\n
"
,
hr
);
IUnknown_Release
(
unk2
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IObjectWithSite
,
(
void
**
)
&
unk2
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get IObjectWithSite, hr %#lx.
\n
"
,
hr
);
...
...
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