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
9d9c3960
Commit
9d9c3960
authored
Feb 26, 2024
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement InvokeCommand() for the new menu.
parent
c2ee8627
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
new_menu.c
dlls/shell32/new_menu.c
+34
-2
No files found.
dlls/shell32/new_menu.c
View file @
9d9c3960
...
...
@@ -275,9 +275,41 @@ static HRESULT WINAPI context_menu_QueryContextMenu(IContextMenu3 *iface,
static
HRESULT
WINAPI
context_menu_InvokeCommand
(
IContextMenu3
*
iface
,
CMINVOKECOMMANDINFO
*
info
)
{
FIXME
(
"iface %p, info %p, stub!
\n
"
,
iface
,
info
);
struct
new_menu
*
menu
=
impl_from_IContextMenu3
(
iface
);
WCHAR
path
[
MAX_PATH
],
name
[
MAX_PATH
];
unsigned
int
id
;
return
E_NOTIMPL
;
TRACE
(
"menu %p, info %p.
\n
"
,
menu
,
info
);
id
=
(
UINT_PTR
)
info
->
lpVerb
-
1
;
if
(
id
>=
menu
->
item_count
)
{
ERR
(
"Invalid verb %p.
\n
"
,
info
->
lpVerb
);
return
E_FAIL
;
}
if
(
!
SHGetPathFromIDListW
(
menu
->
pidl
,
path
))
{
ERR
(
"Failed to get path.
\n
"
);
return
E_FAIL
;
}
for
(
unsigned
int
i
=
0
;;
++
i
)
{
if
(
!
i
)
swprintf
(
name
,
ARRAY_SIZE
(
name
),
L"%s/%s"
,
path
,
menu
->
items
[
id
].
name
);
else
swprintf
(
name
,
ARRAY_SIZE
(
name
),
L"%s/%s (%u)"
,
path
,
menu
->
items
[
id
].
name
,
i
);
if
(
CreateDirectoryW
(
name
,
NULL
))
return
S_OK
;
if
(
GetLastError
()
!=
ERROR_ALREADY_EXISTS
)
{
WARN
(
"Failed to create %s, error %lu.
\n
"
,
debugstr_w
(
name
),
GetLastError
());
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
}
}
static
HRESULT
WINAPI
context_menu_GetCommandString
(
IContextMenu3
*
iface
,
...
...
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