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