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
1662fa9a
Commit
1662fa9a
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 CLSID_NewMenu.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=24812
parent
fe4f1382
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
10 deletions
+132
-10
Makefile.in
dlls/shell32/Makefile.in
+1
-0
new_menu.c
dlls/shell32/new_menu.c
+116
-0
shell32_classes.idl
dlls/shell32/shell32_classes.idl
+6
-0
shell32_main.h
dlls/shell32/shell32_main.h
+2
-0
shellole.c
dlls/shell32/shellole.c
+1
-0
shlview.c
dlls/shell32/tests/shlview.c
+6
-10
No files found.
dlls/shell32/Makefile.in
View file @
1662fa9a
...
...
@@ -23,6 +23,7 @@ SOURCES = \
enumidlist.c
\
folders.c
\
iconcache.c
\
new_menu.c
\
pidl.c
\
recyclebin.c
\
resources/audio.svg
\
...
...
dlls/shell32/new_menu.c
0 → 100644
View file @
1662fa9a
/*
* Copyright 2015 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "shobjidl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
struct
new_menu
{
IShellExtInit
IShellExtInit_iface
;
LONG
refcount
;
};
static
struct
new_menu
*
impl_from_IShellExtInit
(
IShellExtInit
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
new_menu
,
IShellExtInit_iface
);
}
static
HRESULT
WINAPI
ext_init_QueryInterface
(
IShellExtInit
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
new_menu
*
menu
=
impl_from_IShellExtInit
(
iface
);
TRACE
(
"menu %p, iid %s, out %p.
\n
"
,
menu
,
debugstr_guid
(
iid
),
out
);
if
(
IsEqualGUID
(
iid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
iid
,
&
IID_IShellExtInit
))
*
out
=
&
menu
->
IShellExtInit_iface
;
else
{
*
out
=
NULL
;
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
out
);
return
S_OK
;
}
static
ULONG
WINAPI
ext_init_AddRef
(
IShellExtInit
*
iface
)
{
struct
new_menu
*
menu
=
impl_from_IShellExtInit
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
menu
->
refcount
);
TRACE
(
"%p increasing refcount to %lu.
\n
"
,
menu
,
refcount
);
return
refcount
;
}
static
ULONG
WINAPI
ext_init_Release
(
IShellExtInit
*
iface
)
{
struct
new_menu
*
menu
=
impl_from_IShellExtInit
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
menu
->
refcount
);
TRACE
(
"%p decreasing refcount to %lu.
\n
"
,
menu
,
refcount
);
if
(
!
refcount
)
free
(
menu
);
return
refcount
;
}
static
HRESULT
WINAPI
ext_init_Initialize
(
IShellExtInit
*
iface
,
LPCITEMIDLIST
pidl
,
IDataObject
*
obj
,
HKEY
key
)
{
struct
new_menu
*
menu
=
impl_from_IShellExtInit
(
iface
);
TRACE
(
"menu %p, pidl %p, obj %p, key %p.
\n
"
,
menu
,
pidl
,
obj
,
key
);
return
S_OK
;
}
static
const
IShellExtInitVtbl
ext_init_vtbl
=
{
ext_init_QueryInterface
,
ext_init_AddRef
,
ext_init_Release
,
ext_init_Initialize
,
};
HRESULT
WINAPI
new_menu_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
out
)
{
struct
new_menu
*
menu
;
HRESULT
hr
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
(
menu
=
malloc
(
sizeof
(
*
menu
))))
return
E_OUTOFMEMORY
;
menu
->
IShellExtInit_iface
.
lpVtbl
=
&
ext_init_vtbl
;
menu
->
refcount
=
1
;
TRACE
(
"Created New menu %p.
\n
"
,
menu
);
hr
=
IShellExtInit_QueryInterface
(
&
menu
->
IShellExtInit_iface
,
iid
,
out
);
IShellExtInit_Release
(
&
menu
->
IShellExtInit_iface
);
return
hr
;
}
dlls/shell32/shell32_classes.idl
View file @
1662fa9a
...
...
@@ -183,3 +183,9 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
threading
(
apartment
),
uuid
(
75048700
-
ef1f
-
11
d0
-
9888
-
006097
deacf9
)
]
coclass
ActiveDesktop
{
interface
IActiveDesktop
; }
[
threading
(
apartment
),
uuid
(
d969a300
-
e7ff
-
11
d0
-
a93b
-
00
a0c90f2719
)
]
coclass
NewMenu
{}
dlls/shell32/shell32_main.h
View file @
1662fa9a
...
...
@@ -114,6 +114,8 @@ HRESULT WINAPI ApplicationAssociationRegistration_Constructor(IUnknown *outer, R
HRESULT
WINAPI
ApplicationDestinations_Constructor
(
IUnknown
*
outer
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
ApplicationDocumentLists_Constructor
(
IUnknown
*
outer
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
new_menu_create
(
IUnknown
*
outer
,
REFIID
iid
,
void
**
out
);
HRESULT
IShellLink_ConstructFromFile
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
LPCITEMIDLIST
pidl
,
IUnknown
**
ppv
);
LPEXTRACTICONA
IExtractIconA_Constructor
(
LPCITEMIDLIST
);
...
...
dlls/shell32/shellole.c
View file @
1662fa9a
...
...
@@ -70,6 +70,7 @@ static const struct {
{
&
CLSID_MyComputer
,
ISF_MyComputer_Constructor
},
{
&
CLSID_MyDocuments
,
MyDocuments_Constructor
},
{
&
CLSID_NetworkPlaces
,
ISF_NetworkPlaces_Constructor
},
{
&
CLSID_NewMenu
,
new_menu_create
},
{
&
CLSID_Printers
,
Printers_Constructor
},
{
&
CLSID_QueryAssociations
,
QueryAssociations_Constructor
},
{
&
CLSID_RecycleBin
,
RecycleBin_Constructor
},
...
...
dlls/shell32/tests/shlview.c
View file @
1662fa9a
...
...
@@ -1482,25 +1482,21 @@ static void test_newmenu(void)
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_NewMenu
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to create NewMenu object, hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
skip
(
"NewMenu is not supported.
\n
"
);
return
;
}
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IShellExtInit
,
(
void
**
)
&
unk2
);
ok
(
hr
==
S_OK
,
"Failed to get IShellExtInit, hr %#lx.
\n
"
,
hr
);
IUnknown_Release
(
unk2
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IContextMenu3
,
(
void
**
)
&
unk2
);
ok
(
hr
==
S_OK
,
"Failed to get IContextMenu3, hr %#lx.
\n
"
,
hr
);
IUnknown_Release
(
unk2
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get IContextMenu3, hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IUnknown_Release
(
unk2
);
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IObjectWithSite
,
(
void
**
)
&
unk2
);
ok
(
hr
==
S_OK
,
"Failed to get IObjectWithSite, hr %#lx.
\n
"
,
hr
);
IUnknown_Release
(
unk2
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get IObjectWithSite, hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IUnknown_Release
(
unk2
);
IUnknown_Release
(
unk
);
}
...
...
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