1c2c66affSColin Finck 
2c2c66affSColin Finck #ifdef _MSC_VER
3c2c66affSColin Finck 
4c2c66affSColin Finck // Disabling spammy warnings when compiling with /W4 or /Wall
5c2c66affSColin Finck #pragma warning(disable:4100) // unreferenced formal parameter
6c2c66affSColin Finck #pragma warning(disable:4201) // nonstandard extension used
7c2c66affSColin Finck #pragma warning(disable:4265) // class has virtual functions, but destructor is not virtual
8c2c66affSColin Finck #pragma warning(disable:4365) // signed/unsigned mismatch
9c2c66affSColin Finck #pragma warning(disable:4514) // unreferenced inline function
10c2c66affSColin Finck #pragma warning(disable:4710) // function was not inlined
11c2c66affSColin Finck #pragma warning(disable:4820) // padding added
12c2c66affSColin Finck #pragma warning(disable:4946) // reinterpret_cast between related classes
13c2c66affSColin Finck 
14c2c66affSColin Finck // Disable some warnings in headers only
15c2c66affSColin Finck #pragma warning(push)
16c2c66affSColin Finck #pragma warning(disable:4244) // possible loss of data
17c2c66affSColin Finck #pragma warning(disable:4512) // assignment operator could not be gernerated
18c2c66affSColin Finck #endif
19c2c66affSColin Finck 
20c2c66affSColin Finck #include <stdio.h>
21c2c66affSColin Finck #include <tchar.h>
22c2c66affSColin Finck 
23c2c66affSColin Finck #define WIN32_NO_STATUS
24c2c66affSColin Finck #define _INC_WINDOWS
25c2c66affSColin Finck #define COM_NO_WINDOWS_H
26c2c66affSColin Finck 
27c2c66affSColin Finck #define COBJMACROS
28c2c66affSColin Finck 
29c2c66affSColin Finck //#define DEBUG_CCOMOBJECT
30c2c66affSColin Finck #define DEBUG_CCOMOBJECT_CREATION 1
31c2c66affSColin Finck #define DEBUG_CCOMOBJECT_DESTRUCTION 1
32c2c66affSColin Finck #define DEBUG_CCOMOBJECT_REFCOUNTING 1
33c2c66affSColin Finck 
34c2c66affSColin Finck #include <windef.h>
35c2c66affSColin Finck #include <winbase.h>
36c2c66affSColin Finck #include <winreg.h>
37c2c66affSColin Finck #include <wingdi.h>
38c2c66affSColin Finck #include <winnls.h>
39c2c66affSColin Finck #include <wincon.h>
40c2c66affSColin Finck #include <shellapi.h>
41c2c66affSColin Finck #include <shlobj.h>
42c2c66affSColin Finck #include <shlobj_undoc.h>
43c2c66affSColin Finck #include <shlwapi.h>
44c2c66affSColin Finck #include <shlguid_undoc.h>
45c2c66affSColin Finck #include <uxtheme.h>
46c2c66affSColin Finck #include <strsafe.h>
47c2c66affSColin Finck 
48c2c66affSColin Finck #include <atlbase.h>
49c2c66affSColin Finck #include <atlcom.h>
50c2c66affSColin Finck #include <atlwin.h>
51c2c66affSColin Finck #include <undocshell.h>
52c2c66affSColin Finck #include <undocuser.h>
53c2c66affSColin Finck 
54c2c66affSColin Finck #include <shellutils.h>
55*a6bf77e7SHermès Bélusca-Maïto #include <ui/rosctrls.h>
56c2c66affSColin Finck #include "../shresdef.h"
57c2c66affSColin Finck 
58c2c66affSColin Finck #include <wine/debug.h>
59c2c66affSColin Finck 
60c2c66affSColin Finck #if _MSC_VER
61c2c66affSColin Finck // Restore warnings
62c2c66affSColin Finck #pragma warning(pop)
63c2c66affSColin Finck #endif
64c2c66affSColin Finck 
65c2c66affSColin Finck #define USE_SYSTEM_MENUDESKBAR 0
66c2c66affSColin Finck #define USE_SYSTEM_MENUSITE 0
67c2c66affSColin Finck #define USE_SYSTEM_MENUBAND 0
68c2c66affSColin Finck #define USE_SYSTEM_MERGED_FOLDERS 0
69c2c66affSColin Finck 
70c2c66affSColin Finck #define MERGE_FOLDERS 1
71c2c66affSColin Finck 
72c2c66affSColin Finck #if USE_SYSTEM_MENUDESKBAR
73c2c66affSColin Finck #define CMenuDeskBar_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuDeskBar, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
74c2c66affSColin Finck #else
75c2c66affSColin Finck #define CMenuDeskBar_CreateInstance RSHELL_CMenuDeskBar_CreateInstance
76c2c66affSColin Finck #endif
77c2c66affSColin Finck 
78c2c66affSColin Finck #if USE_SYSTEM_MENUBAND
79c2c66affSColin Finck #define CMenuBand_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
80c2c66affSColin Finck #else
81c2c66affSColin Finck #define CMenuBand_CreateInstance RSHELL_CMenuBand_CreateInstance
82c2c66affSColin Finck #endif
83c2c66affSColin Finck 
84c2c66affSColin Finck #if USE_SYSTEM_MENUSITE
85c2c66affSColin Finck #define CMenuSite_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MenuBandSite, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
86c2c66affSColin Finck #else
87c2c66affSColin Finck #define CMenuSite_CreateInstance RSHELL_CMenuSite_CreateInstance
88c2c66affSColin Finck #endif
89c2c66affSColin Finck 
90c2c66affSColin Finck #if USE_SYSTEM_MERGED_FOLDERS
91c2c66affSColin Finck #define CMergedFolder_CreateInstance(riid, ppv) (CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER,riid, ppv))
92c2c66affSColin Finck #else
93c2c66affSColin Finck #define CMergedFolder_CreateInstance RSHELL_CMergedFolder_CreateInstance
94c2c66affSColin Finck #endif
95c2c66affSColin Finck 
96c2c66affSColin Finck extern "C"
97c2c66affSColin Finck {
98c2c66affSColin Finck extern HINSTANCE shell32_hInstance;
99c2c66affSColin Finck 
100c2c66affSColin Finck HRESULT WINAPI RSHELL_CStartMenu_CreateInstance(REFIID riid, void **ppv);
101c2c66affSColin Finck HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance(REFIID riid, LPVOID *ppv);
102c2c66affSColin Finck HRESULT WINAPI RSHELL_CMenuSite_CreateInstance(REFIID riid, LPVOID *ppv);
103c2c66affSColin Finck HRESULT WINAPI RSHELL_CMenuBand_CreateInstance(REFIID riid, LPVOID *ppv);
104c2c66affSColin Finck HRESULT WINAPI RSHELL_CMergedFolder_CreateInstance(REFIID riid, LPVOID *ppv);
105c2c66affSColin Finck 
106c2c66affSColin Finck }
107